I'm trying to set up a debugging environment and I've noticed something
weird.

I've been using ejbtags.jar, and I discovered that using the tag like so

 <ejb:useHome id="userManagerHome" type="net.coljac.aok.ejb.UserManagerHome"
location="ejb/UserManagerHome" />

Results in a JNDI Exception:
javax.servlet.jsp.JspException: NamingException: ejb/UserManagerHome not
found
        at com.evermind.ejb.taglib.UseHomeTag.doStartTag(UseHomeTag.java:37)

So, I've been using the tag with a fully qualified JNDI path:

 <ejb:useHome id="userManagerHome" type="net.coljac.aok.ejb.UserManagerHome"
location="java:comp/env/ejb/UserManagerHome" />

That works. I scratched my head over why this would be so for a while, but
moved on. Now, however, if I run Orion from inside JBuilder, the second
(verbose) version results in 

javax.servlet.jsp.JspException: NamingException: java:comp/env namespace is
only available from within a J2EE component
        at com.evermind.ejb.taglib.UseHomeTag.doStartTag(UseHomeTag.java:37)
...

and the first version works.

What about my setup could possibly account for this discrepancy? The web.xml
seems normal.

...
   <ejb-ref>
      <ejb-ref-name>ejb/UserManagerHome</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <home>net.coljac.aok.ejb.UserManagerHome</home>
      <remote>net.coljac.aok.ejb.UserManager</remote>
   </ejb-ref>
...

I'm not sure what the difference is. I tried running orion outside JBuilder
using the JBuilder version of the jdk, with "." as the classpath. JBuilder
has orion.jar and ejb.jar first in its classpath. 

Curious. If anyone has any ideas, I'm all ears.

Colin

----------------------------------------
Colin Jacobs
Senior Software Engineer
Optfor Derivatives, Inc.
http://www.opt4.com

I don't pretend to have all the answers. I don't
even pretend to know what the questions are. Hey,
where am I? -- Jack Handey

Reply via email to