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.