It is hard to tell for sure without seeing the structure of your EAR
file and the contents of the application.xml, but my guess is that the
manifest of the client JAR file specifies Main as the Main-Class.
During deployment GlassFish will scan managed objects to see if they
have annotations. The main class of an app client is such a managed
class so GlassFish is trying to locate that class to scan it for
annotations and it cannot find Main.class.
- Tim
Ronaldo Rigoni ... wrote:
>
> Hi everybody,
> On deploy of my application, GlassFish find a Main class in source
> folder of client module.
> This does'nt exists. Because this error happens? The main class is
> necessary?
>
> Regards
>
> The log error is:
>
> *FINE: Getting Main
> WARNING: Cannot load Main reason : Main
> java.lang.ClassNotFoundException: Main
> at
> com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:741)
> at
> com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:631)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> at
> com.sun.enterprise.deployment.annotation.impl.ModuleScanner.getElements(ModuleScanner.java:174)
> at
> com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:405)
> at
> com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:346)
> at
> com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:318)
> at
> com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:213)
> at
> com.sun.enterprise.deployment.archivist.ApplicationArchivist.readModulesDescriptors(ApplicationArchivist.java:321)
> at
> com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:338)
> at
> com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:358)
> at
> com.sun.enterprise.deployment.backend.AppDeployer.explodeArchive(AppDeployer.java:294)
> at
> com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:207)
> at
> com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
> at
> com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:191)
> at
> com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
> at
> com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)
> at
> com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:279)
> at
> com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:788)
> at
> com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
> at
> com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:223)
> *
>
>
>
> --
> []'s,
> Ronaldo Rigoni
> Desenvolvedor JEE
> Ministério da Educação - CESPE
>