Solution: ADF Essentials & Glassfish deployment error – could not find sub module as defined in application.xml

Randomly, I started to get this error in the server.log file of my glassfish 3 standalone server. I would first try to deployment my adf ear file from jdev 11g2 which fails with the following message in the deployment console:

Unable to add application
[03:15:40 PM] POST https://SERVERNAME:4848/management/domain/applications/application returned a response status of 400
[03:15:40 PM] Deployment cancelled.
[03:15:40 PM] —- Deployment incomplete —-.
[03:15:40 PM] Remote deployment failure
[03:15:40 PM] Unable to add application
[03:15:40 PM] POST https://SERVERNAME:4848/management/domain/applications/application returned a response status of 400

Then I proceeded to deploy directly from the glassfish web application console which also failed but pointed to the server.log file for additional information. The server.log file showed a message:
[#|2013-03-26T16:21:14.321-0400|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=87;_ThreadName=Thread-2;|Could not find sub module [MyApp_ViewController_webapp.war] as defined in application.xml
java.lang.IllegalArgumentException: Could not find sub module [MyApp_ViewController_webapp.war] as defined in application.xml
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.readModulesDescriptors(ApplicationArchivist.java:585)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:258

After a couple of hours of debugging and trying different modification to the descriptor, I decided to go on the server and delete all the applications directly as the folders still exist even if the application is not listed in the glassfish application console. My standalone install dir was:

C:\glassfish3\glassfish\domains\domain1\applications\MyApp

After explicitly deleting “MyApp” and redeploying from jdeveloper did this error go away which resulted in a successful deployment!

Advertisements

About wesfang

www.linkedin.com/in/wesfang/ https://twitter.com/wesleyfang
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Solution: ADF Essentials & Glassfish deployment error – could not find sub module as defined in application.xml

  1. Geo says:

    Good solution!!! It helped!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s