• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

deployment issue with manually created war and ear files

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
today's feeble attempt to support the empire
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic