This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes deployment issue with manually created war and ear files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "deployment issue with manually created war and ear files" Watch "deployment issue with manually created war and ear files" New topic
Author

deployment issue with manually created war and ear files

joe nesbitt
Greenhorn

Joined: Dec 05, 2009
Posts: 17
Hi all,

I am trying to run an existing application which has instructions to create war and ear files from command prompt. But the deployment works only if the ear is relative to application path. It errors out if the ear is located somewhere else.

The procedure that I followed:

I created the war file from application-name/web folder using jar command at the command prompt:

jar cf web.war .

when I check the war content, I see WEB-INF/classes and WEB-INF/web.xml

I move the war to the appilcation-name folder.

Then I go to the application-name folder and try creating a ear (The application-name folder already has META-INF folder with application.xml in it):
jar cf test.ear web.war META-INF

when I check the ear content, I see the following:

META-INF/
META-INF/MANIFEST.MF
web.war
META-INF/application.xml

I place the ear in a common location and point to it in the application server config files.

Now when I try to deploy, I get this error:

SEVERE: XMLApplicationServerConfig.sortApplicationConfigRefere
nces Error instantiating application at file:/C:/test/: Unable to get
ApplicationConfig for test : Unable to find/read file META-INF/application.
xml in C:\test (META-INF/application.xml)

Why is this happening...I do not understand as what I am missing here. But the deployment works fine if the ear is placed in the application-name folder itself.

Any help is highly appreciated.

Thanks in advance.

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9916
    
158

Looking at the error message, it seems like the server (which server is it), is not picking up the .ear and instead is considering C:/test as the application.

I place the ear in a common location and point to it in the application server config files.


Which config file and what did you change?


[My Blog] [JavaRanch Journal]
 
 
subject: deployment issue with manually created war and ear files
 
Similar Threads
META-INF?
problem while deploying ear
Please help me to create jar for ejb
error in running the sample application
problem in deploying .ear file in weblogic6.1