Search code examples
earglassfish-4

EAR structure for Java EE


Migrating an application from Glassfish 2.1.1 to Glassfish 4. Upon deploying the .ear to the server using the admin console, an error of the type (Archive of type xxxx.ear is not recognised) - while the same ear file is deployable to glassfish 2. Current structure of ear:

  • lib
  • META-INF
    • MANIFEST.MF
    • application.xml
  • xxx.war
  • xxx.war
  • xxx.war
  • xxx.war
  • xxx.war

According to https://docs.oracle.com/javaee/7/tutorial/packaging001.htm#BCGDJDFB, the file structure appears to be consistent with what is expected, so I'm not sure what I'm missing to get the error that is appearing.


Solution

  • The problem was the ear needed to be deployed to the full version of glassfish, not the web version. The .ear file was accepted in the full version of glassfish.