JNDI issue: XDoclet + WAS 5.1.1


Y

Yogesh

Hello all,

I'm having issues trying to deploy an application on WAS 5.1.1. The app
runs fine on BEA and JBoss servers, but throwing the following naming
exceptions on WebSphere:

javax.naming.NameNotFoundException: Context:
<SERVER_PATH>/servers/server1, name: ejb/TestManagerLocal: First
component in name TestManagerLocal not found. Root exception is
org.omg.CosNaming.NamingContextPackage.NotFound:
IDL:eek:mg.org/CosNaming/NamingContext/NotFound:1.0

The bean task for which the reference exception is being thrown looks
as follows in ejb-jar.xml:

<session >
<description><![CDATA[TransformationEngine]]></description>
<display-name>TestEngine</display-name>

<ejb-name>TestEngine</ejb-name>

<home>com.interfaces.TestEngineHome</home>
<remote>com.interfaces.TestEngine</remote>
<local-home>com.interfaces.TestEngineLocalHome</local-home>
<local>com.interfaces.TestEngineLocal</local>
<ejb-class>com.ejb.TestEngineSession</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>

<ejb-local-ref >
<ejb-ref-name>ejb/TestManagerLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>

<local-home>com.interfaces.TestManagerLocalHome</local-home>
<local>com.interfaces.TestManagerLocal</local>
<ejb-link>TestManager</ejb-link>
</ejb-local-ref>

</session>

Also, I am using XDoclet to generate all the mappings and interfaces.
For WAS, it generates ibm-ejb-jar-bnd.xmi, and it has the following
binding:

<ejbBindings
xmi:id="Session_bnd_1"
jndiName="ejb/test/TestEngine">

<ejbRefBindings xmi:id="EJBRefBnd_1"
jndiName="ejb/TestManagerLocal">
<bindingEjbRef href="META-INF/ejb-jar.xml#EJBLocalRef_1"/>
</ejbRefBindings>

<enterpriseBean
xmi:type="ejb:Session"
href="META-INF/ejb-jar.xml#Session_TestEngine" />
</ejbBindings>

Now I'm not sure whether WAS is picking up the binding from ejb-jar.xml
or ibm-ejb-jar-bnd.xmi, but it appears correctly on the admin interface
under EJB Bindings. Everything looks okay, but it appears as if
TestEngine is not able to find TestManager using JNDI lookup. The
XDoclet tags look as follows:

* @ejb.bean name="TestEngine"
* display-name="TestEngine"
* description="TestEngine"
* jndi-name="ejb/test/TestEngine"
* local-jndi-name="ejb/test/TestEngineLocal"
* type="Stateless"
* view-type="both"
* @ejb.util generate="physical"
* @ejb.ejb-ref ejb-name="TestManager"
* view-type = "local"
* ref-name = "ejb/TestManagerLocal"
* @oc4j.bean jndi-name="ejb/test/TestEngine"

Can someone come up with any ideas as I'm totally stuck? Any help will
be appreciated.

Thanks.
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top