• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 747
  • Last Modified:

Deploying ejb - multiple module descriptors error

Hi Experts,

I am adding ejb to my existing web app that consist of a few jsp, java files as well as web.xml and I am using weblogic server.
Now, I added ejb-jar.xml file and weblogic-ejb-jar.xml file and was trying to deploy(not using jar/ear file. I just drop entire dir in particular dir and used web application modules deployments menu option from weblogic’s admin console. Then I had the following error:

C:\bea81\user_projects\applications\AS8\WebRoot contains multiple module descriptors

This is the file dir:
WebRoot/META-INF/
                  Ejb-jar.xml
                  Weblogic-ejb-jar.xml
WebRoot/WEB-INF/      
                   Web.xml

I still need web.xml file because I have servlet controller. To me, it looks that I can’t have those 3 xml files in same application. Another unusual thing was that when I drop entire application dir, I was able to see radio button next to app dir name, but it didn’t show this time. So, I had to move into that app dir and then I was able to see radio button next to WebRoot dir.

So, what do I need to do in my case?

Thanks in advance.


0
dkim18
Asked:
dkim18
2 Solutions
 
jpolin1Commented:
I don't know anything about weblogic, but that doesn't seem right.
Can you package the ejb and the war into an ear?

It looks like you are trying to run an ejb in a web container.
0
 
owenli27Commented:
I am not 100% sure and I want to take a guess:
Here is normal WL structure I using:

myApp/dev/ejb/
myApp/dev/web/
my/deploy/ejb/META-INF/weblogic-ejb-jar.xml & ejb-jar.xml
my/deploy/web/WEB-INF/web.xml

Enterprise Application Modules include EJBs and Web Applications. The myApp/deploy/ejb  folder is called EJB module directory.
When you deploy application, WL will think any sources under WebRoot/ are belonged to both Web Module and EJB Module.
You have to create a EJB Module directory between WebRoot/  and  META-INF/... Good Luck
 
0
 
suprapto45Commented:
If I am not mistaken, when you build your EJB application, these two files are automatically created in your META-INF of your EJB project. Do you use the files that are generated by the WebLogic (assuming that you use WebLogic workshop)?

David
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
dkim18Author Commented:
I guess I wasn't fully understanding ejb and its deployment. Now, I was able to create jar file for ejb and deployed successfully by using weblogic's EJB modules deployment menu. And then I had to deploy client side seperately by using web application modules deployment menu. Is this correct way of doing this?
0
 
suprapto45Commented:
Well,

As you are doing separately, I am not too sure because normally I zip them into ear file. However, I guess that that is the right way to do it. Try it and let me know if it does not work

David
0
 
dkim18Author Commented:
well, it works even though I am having compile errors, but I don't think it is related.
0
 
suprapto45Commented:
This could be related to your other questions.
0
 
dkim18Author Commented:
since I got the result from client side, I deployed ejb at least, so I am closing this. Thanks all for your help.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now