This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes Error----web app could not find ejb module. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Error----web app could not find ejb module." Watch "Error----web app could not find ejb module." New topic
Author

Error----web app could not find ejb module.

Arjun Karthick
Ranch Hand

Joined: Jan 04, 2007
Posts: 77
Hi All,
I am trying to use webapplication that calls a ejb using weblogic container.

I get the following error: weblogic.deployment.EnvironmentException: [J2EE:160167]The module WebApp.war in application WebApp uses ejb-links but no EJB modules were found for this application.

The location of ejb is in C:\Data\Project\client\TestApp\build\TestApp.jar
The location of web-app is C:\Data\Project\TestWeb\WebApp.war

The DD looks like this


Please help me on the same.

Regards,
Arjun.
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
The name in the ejb-link element is composed of a path name which is relative to the WAR file containing the Web application that is referencing the EJB. Check that your path name is correct.


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Arjun Karthick
Ranch Hand

Joined: Jan 04, 2007
Posts: 77
Hi Roger,
I have given as
<ejb-link>../../clientpackage_new/TestApp/build/TestApp.jar#ClientEJB</ejb-link>

Still the error persist.

I have given the location of both ejb and web application in the previous post. Do you find any thing wrong in what i have given?

And one more doubt in servlet i have following code is there anything wrong in it.

Here the ClientEjb is the Ejb name. I have been previously trying with JNDI Name.

Can you please help in this ?
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
I need to understand how you are doing your deployment.

Have you built a single EAR file from your WAR and EJB JAR files, and then deployed the EAR file onto one server? If possible, this is the best deployment.

Or have you deployed your WAR file onto one server and the EJBs onto another server?
Arjun Karthick
Ranch Hand

Joined: Jan 04, 2007
Posts: 77
Hi,
I have the ejb as a jar and deployed in weblogic 9.1 And now i am trying to deploy the WAR in the same server,which will use the ejb as a service. I am forced to do so instead of WAR as it is my requirement.

thanks,
Arjun
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
web.xml===============


Remove the above from the web.xml . Its not needed as you are not deploying EJB module in the war, you should be directly able to do a JNDI lookup from the code of web app.


Amit Tank
Linked In
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error----web app could not find ejb module.