EJB on Weblogic7 : accessing Ejb thru *Local interface* fails due to JNDI lookup

M

Mumbai Joe

We are facing a problem while accessing an EJB deployed as a 'Local'
EJB. (ejb2.0)

There is an entity bean X which is working perfectly.
Now I tried creating an similar EJB for "Local" access. I created
LocalHome & Local interfaces and the bean class itself was copied from
bean X.

In descriptors, the local EJB was specified as ...
------------------------------------------------------------
<ejb-jar>
<enterprise-beans>

................
<entity>
<ejb-name> SiteUserEjbLocal </ejb-name>
<local-home> SiteUserLocalHome </local-home>
<local> SiteUserLocal </local>
<ejb-class> SiteUserEjb2 </ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class> SiteUserPK </prim-key-class>
<reentrant> False </reentrant>
</entity>

.....
</enterprise-beans>
<assembly-descriptor />
</ejb-jar>

------------------------------------------------------------
<weblogic-ejb-jar>
..........
<weblogic-enterprise-bean>
<ejb-name>SiteUserEjbLocal</ejb-name>
<local-jndi-name>SiteUserEjb2</local-jndi-name>
</weblogic-enterprise-bean>

.........
</weblogic-ejb-jar>

------------------------------------------------------------

Both bean X and new bean Y are packaged in same EJB jar and deployed
through weblogic console. The deployment is successful & console shows
EJB successful activated on target server.

However, on client side, the JNDI lookup for name 'SiteUserEjb2' fails
....
The error reported is
---------
Root exception is javax.naming.NameNotFoundException: Unable to
resolve 'app/ejb/WebUtils.jar#SiteUserEjb2/local-home' Resolved:
'app/ejb' Unresolved:'WebUtils.jar#SiteUserEjb2' ; remaining name
'WebUtils.jar#SiteUserEjb2/local-home'
<<no stack trace available>>
---------
I found another interesting thing :

We did a direct JNDI lookup using some other utility jndi program. The
program showed the JNDI name 'SiteUserEjb2' present in Weblogic's JNDI
tree -- but class of object bound was reported as
'javax.naming.LinkRef' whereas for all other EJBs, the class is
reported as 'weblogic.rmi.cluster.ClusterableRemoteObject'.

Any pointers ??

Thanks,
MJ
 

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

Members online

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,997
Latest member
mileyka

Latest Threads

Top