Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JNDI LOOKUP problem in EJB 3.0 +Websphere 7.0

465 views
Skip to first unread message

jaganm...@gmail.com

unread,
Apr 20, 2009, 1:00:36 PM4/20/09
to
Hi,
I created jar file for EJB's and war file for web module and combined both into ear file.
Placed ejb-jar.xml in EJB jar/META-INF .
While deploying ear file i have given jndi names for each bean and it is deployed successfully.
But when accessing application i am getting below error:
"com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is com.ibm.websphere.ejbcontainer.AmbiguousEJBReferenceException: The simple-binding-name 'ee/EmagiaFacader/remote'
for bean ee#ee.jar#EmagiaFacader is ambiguous because the bean implements multiple interfaces. Provide an interface specific binding or add # to the simple-binding-name on lookup.]"

To resolve above error i placed ibm-ejb-jar-bnd.xml in jar/META-INF and it is having code like as follows





But still i am getting below error.
"com.ibm.ws.exception.RuntimeWarning: com.ibm.ejs.container.EJBConfigurationException: The EmagiaFacader bean in the ee.jar module has specified the emagia.ejb.FacaderBI business interface, which does not exist for a business interface Java Naming and Directory Interface (JNDI) binding."

FacaderBI is a business interface which is in emagia.ejb package.

Sorry for this long post.
Please help me to resolve this. It is very urgent.
Please give solution.

Regards
Jagan.

Brian S Paskin

unread,
Apr 20, 2009, 3:31:42 PM4/20/09
to
Hi, it is stating that you are trying to do something that is invalid. Could you list your Objects and their JNDI names and where are you calling the Objects from, web, EJB, etc.

Regards,
Brian

jaganm...@gmail.com

unread,
Apr 21, 2009, 12:47:05 AM4/21/09
to
Bean
For the above bean JNDI name taken as "ee/EmagiaFacader/remote" .
And i am using the above JNDI name in client lookup code as follows.

ASProperties as = new ASProperties();
InitialContext ctx = new InitialContext(as.getProperties());
FacaderBI facaderRemote = (FacaderBI)ctx.lookup("ee/EmagiaFacader/remote");

Note: ASProperties.java is having IntialContext code, i am sending this file as attachment.
And i am calling EJB's from web modules also.

Please Check this and give me solution.

Regards
Jagan.

Brian S Paskin

unread,
Apr 21, 2009, 9:23:13 AM4/21/09
to
Hi, if you are calling the JNDI of the Remote interface, then you must cast it to the Remote Bean and not to the Business Interface and you should use the PortableRemoteObject.

Regards,
Brian

jaganm...@gmail.com

unread,
Apr 21, 2009, 11:50:05 AM4/21/09
to
Hi,

Here i have taken specific-binding-name only for ejb lookup (not remote interface jndi name).
And this same application is working fine in jboss server.
I tried by placing ibm-ejb-bnd-jar.xml also but getting same error (here tried with specific-binding-name and also).
I need to make it work with specific-binding-name because this same code need to work with jboss also.
Please help me.

Regards
Jagan.

Brian S Paskin

unread,
Apr 22, 2009, 10:15:21 AM4/22/09
to
I have no clue what you have or not entered in your xmi, xml files. You should not be modifying the xmi files directly. This is done through WebSphere and RAD/RSA processes.

Regards,
Brian

and...@us.ibm.com

unread,
Apr 27, 2009, 2:19:28 PM4/27/09
to
Hi Jagan,

Can you re-post the contents of your ejb-jar.xml and ibm-ejb-jar-bnd.xml files? It looks like the forum did not display the xml correctly. Alternatively, you could attach the files

This error indicates that the binding file shows a business interface that cannot be found (either ejb-jar.xml does not list it as a biz interface, the annotation is missing in the code, there is a typo in one of the xml files, etc).

Hope this helps,

Andy

0 new messages