we have an “old” JavaEE Application, which we want to port from the old Sun Application Server 9.1 to the current Glassfish 3.1. We updated the deployment descriptor xml files (renamed them, updated DocType, validated against DTD, nothing else). But when we try to the deploy into the GF3.1 we get this error:
JDO83008: CMP Compilation failed:
C:\workspace\glassfish31eclipsedefaultdomain\generated\ejb\archivetool-app-1.9.5\archivetool-ejb-1.9.5_jar\de\ems\archivetool\ejb\metadata\cd\eb\CdBean_821611534_ConcreteImpl.java:10:
cannot access de.ems.archivetool.ejb.framework.AbstractCMPBean
class file for de.ems.archivetool.ejb.framework.AbstractCMPBean not found
C:\workspace\glassfish31eclipsedefaultdomain\generated\ejb\archivetool-app-1.9.5\archivetool-ejb-1.9.5_jar\de\ems\archivetool\ejb\productdata\product\eb\ProductionLibraryBean40992531_ConcreteImpl.java:416:
cannot find symbol
symbol : class EBSBusinessException
location: package de.ems.archivetool.ejb.framework
WARNUNG: JDO83004: CMP Compilation failed. See log for details.
SCHWERWIEGEND: Exception while invoking class org.glassfish.ejb.startup.EjbDeployer prepare method
SCHWERWIEGEND: Exception while invoking class org.glassfish.javaee.full.deployment.EarDeployer prepare method
SCHWERWIEGEND: Exception while preparing the app
SCHWERWIEGEND: JDO83004: CMP Compilation failed. See log for details.
org.glassfish.deployment.common.DeploymentException: JDO83004: CMP Compilation failed. See log for details.
But we can still deploy in the old SUN App Server.
The application consists of 4 modules and a build module. Generally, the .ear file, consisting of the two EJB modules, one WAR module and one JAR module, is build with Maven without problems (UnitTest succeed etc).
(pom.xml and the resulting application.xml)
So, everything builds fine, but when we try to deploy the application to GF3.1 we get the “class file not found” error. The classes which are not found are within the JAR module and contain base classes for the EJB modules.
Does anyone has a starting point?
Regards,
Andreas
Ok, after hours of googeling, I finally found the exact answer to this problem here.
The important part is:
What you have to do is, let maven put the jar (and other dependencies) into a library folder in the ear container. You do this by adding this to your ear pom.xml:
This will put the jar module into a folder lib, and all depending ejbs will get the Class-Path entry in their MANIFEST.MF.
Hope that helps some of you with the same problem.