Are you running the servlet in orion or tomcat ?

Does the console in JBuilder say:

Orion/1.5.4 initialized (or whichever version you have)

You should be able to make it work by replacing the code:

java:comp/env/ejb/SPControllerHome

with:

SPControllerHome

It sounds to me like you are running tomcat which is external to your session bean 
(not in the container) and requires the external context lookup.  If this is the case, 
a better solution would be to debug the servlet in Orion which would mean starting 
Orion in JBuilder instead of tomcat.

Here is an article on how to set up JBuilder to debug Orion, I recommend the non-JPDA 
method.

http://kb.atlassian.com/content/orionsupport/articles/jbuilder-debugging.html

Tips:

1. Make sure that your project does not include both the BAS4.5 library and the new 
Orion one you create.
2. Include all jar files in the Orion home directory (including orion.jar)and the 
Orion lib directory excluding the tool jars (ejb-assembler.jar, admin.jar, etc.) in 
your Orion library.

I use JBuilder 5 to debug orion and it works great, JBuilder 6 should be the same.


Original Message:
-----------------
From: DORAN, GRANT [EMAIL PROTECTED]
Date: Mon, 18 Mar 2002 13:27:06 -0000
To: [EMAIL PROTECTED]
Subject: JNDI naming exception when running app on orion from JBuilder  


Hello,

I'm having a terrible time trying to get my application to debug from
JBuilder 6 Enterprise.
When I build the application using ANT and deploy it to orion, the servlet
can lookup the EJBs ok.
But when I run Orion in debug mode from JBuilder, it starts up ok, but fails
when the servlet tries to lookup the first EJB.
The line of code is:

      Object boundObject =
context.lookup("java:comp/env/ejb/SPControllerHome");

The output to the log as a result is:

javax.naming.NamingException: java:comp/env namespace is only available from
within a J2EE component
        at
com.sun.enterprise.naming.java.javaURLContext.getComponentContext(javaURLCon
text.java:395)
        at
com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:51)
        at javax.naming.InitialContext.lookup(InitialContext.java:350) 

Has anyone else had this problem?
Has anyone successfully configured JBuilder5 or 6 to debug orion with a full
J2EE app?

If  can't get this working, I'll have to change to Borland Appserver, which
will slow my development down even more.

Any help would be greatly appreciated.

Grant Doran
Contract Java Developer/Architect
Britannic Assurance

************
This email and any accompanying documents are intended only for the named recipient, 
are confidential and may be privileged. If you are not the intended recipient please 
notify us immediately by mailto:[EMAIL PROTECTED] and you must not copy, disclose 
or otherwise use this message. Unauthorised use is strictly prohibited and may be 
unlawful. The content of this email represents the view of the individual and not the 
company. The company reserves the right to monitor the content of all emails in 
accordance with lawful business practice.

Whilst attachments are virus checked before transmission, Britannic Assurance plc does 
not accept any liability in respect of any virus which is not detected.

Britannic Assurance plc, No.3002 is registered in England and maintains its registered 
office at 1 Wythall Green Way, Wythall, Birmingham B47 6WG.
Telephone: 0870 887 0001
Fax: 0870 887 0002
Website: www.britannicassurance.com

Britannic Assurance plc, Britannic Unit Linked Assurance Limited, Britannic ISA 
Managers Limited and Britannic Unit Trust Managers Limited are regulated by the 
Financial Services Authority. Each of these companies is a member of the Britannic 
marketing group which only advises on and sells its own life assurance, pension, unit 
trust and ISA products.
************

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .


Reply via email to