Hi,

When I try to access an EJB Session bean from my Axis2 service I get an exception: javax.naming.NamingException: env not bound. I have setup the web.xml file in axis2.war\WEB-INF to reference the ejb (with <ejb-ref > tags) and have added server specific tags in the same directory (jboss-web.xml). I had the same code working with Axis2 1.0 but have now moved to the nightly build (I used 6 Sep 06 at first, tried again with 8 Sep 06) because of a previous bug with Base64 encoding, which has since been fixed. The lookup still works in a servlet in the ear file deployed with the ejb code.

Is there something else that I need to do to be able to access ejb's from a service in Axis 2 nightly? Or is this something other people have found as well and is just a bug? I don't really see how it could be a bug with Axis2 since its just a jndi lookup - more like server setup. But then I also don't understand why it worked before?

Thanks,

Blaise


My Java code that throws the exception is:

javax.naming.InitialContext initialContext = new javax.naming.InitialContext(environment);
    try {
Object objRef = initialContext.lookup(jndiName); // This line throws NamingException from Axis2 service, but not servlet
  }

Extra ejb tag added at the end of web.xml in axis2.war/WEB-INF:

 <ejb-ref >
<description><![CDATA[Reference to the RegisterSession EJB]]></description>
    <ejb-ref-name>ejb/RegisterSession</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>newproj.interfaces.RegisterSessionHome</home>
    <remote>newproj.interfaces.RegisterSession</remote>
 </ejb-ref>

My setup is as follows:

default/deploy/webapps/axis2.war - the axis WAR
default/deploy/webapps/axis2.war/WEB-INF/services - location of my aar file
default/deploy/ - location of my ear file


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to