This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

deployment issue with manually created war and ear files

 
joe nesbitt
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic