org.glassfish.deployment.common.DeploymentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Exception deploying webapp (.war file) to glassfish v3 beta 69. The webapp is a fairly complex application, but it is just a war. There are no ejbs involved. I checked, and I do have glassfish ejb container & glassfish ejb lite container installed in the update tool. The error message seems to indicate an error with the packaging of the app, but it does deploy just fine on tomcat & GF v2.1. In any case, the exception reported is not very helpful since it doesn't seem point me in the right direction. Here is the specific exception: java.lang.RuntimeException: Unable to load EJB module. DeploymentContext does not contain any EJB Check archive to ensure correct packaging for c:\src\svn\trunk\gui\target\WEBAPP at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:134) at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:64) at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:153) at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:220) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:314) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:169) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1159) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1218) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1207) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:362) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:201) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:241) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:789) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:697) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:951) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:166) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.FixedThreadPool$BasicWorker.doWork(FixedThreadPool.java:431) at com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:410) at java.lang.Thread.run(Thread.java:619)
    via by dpb1,
  • Please see the attached application - it uses glassfish-embedded-all final (at least I think it is final, this is the jar with the latest date as of now) from http://download.java.net/maven/glassfish/org/glassfish/extras/glassfish-embedded-all/3.0.1. When the embedded EJB container is created with the call to: EJBContainer.createEJBContainer() the glassfish jar itself is on the classpath, and as it included META-INF/ejb-jar.xml is is treated as a valid EJB archive and the deployer tries to deploy its EJBs, which fails with: SEVERE: Exception while invoking class com.sun.enterprise.web.WebDeployer prepare method java.lang.NullPointerException at com.sun.enterprise.web.WebDeployer.loadMetaData(WebDeployer.java:107) at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:567) at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:264) at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:79) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:131) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:129) at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:197) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:206) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:232) at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:129) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296) at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214) at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144) at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:128) at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:120) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:78) at com.test.EmbeddedEJBTest.main(EmbeddedEJBTest.java:16) Jul 1, 2010 1:39:35 PM org.glassfish.javaee.full.deployment.EarDeployer prepareBundle WARNING: Error occurred java.lang.NullPointerException at com.sun.enterprise.web.WebDeployer.loadMetaData(WebDeployer.java:107) at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:567) at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:264) at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:79) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:131) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:129) at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:197) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:206) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:232) at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:129) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296) at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214) at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144) at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:128) at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:120) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:78) at com.test.EmbeddedEJBTest.main(EmbeddedEJBTest.java:16) Jul 1, 2010 1:39:35 PM org.glassfish.api.ActionReport failure SEVERE: Exception while invoking class org.glassfish.javaee.full.deployment.EarDeployer prepare method org.glassfish.deployment.common.DeploymentException at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:148) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296) at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214) at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144) at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:128) at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:120) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:78) at com.test.EmbeddedEJBTest.main(EmbeddedEJBTest.java:16) Caused by: java.lang.NullPointerException at com.sun.enterprise.web.WebDeployer.loadMetaData(WebDeployer.java:107) at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:567) at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:264) at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:79) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:131) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:129) at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:197) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:206) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:232) at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:129) ... 9 more Jul 1, 2010 1:39:35 PM org.glassfish.api.ActionReport failure SEVERE: Exception while preparing the app org.glassfish.deployment.common.DeploymentException at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:148) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296) at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214) at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144) at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:128) at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:120) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:78) at com.test.EmbeddedEJBTest.main(EmbeddedEJBTest.java:16) Caused by: java.lang.NullPointerException at com.sun.enterprise.web.WebDeployer.loadMetaData(WebDeployer.java:107) at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:567) at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:264) at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:79) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:131) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:129) at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:197) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:206) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:232) at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:129) ... 9 more Jul 1, 2010 1:39:35 PM org.glassfish.ejb.embedded.EJBContainerProviderImpl createEJBContainer INFO: [EJBContainerProviderImpl] Cleaning up on failure ... Jul 1, 2010 1:39:35 PM org.glassfish.admin.mbeanserver.JMXStartupService shutdown INFO: JMXStartupService and JMXConnectors have been shut down. Jul 1, 2010 1:39:35 PM com.sun.enterprise.v3.server.AppServerStartup stop INFO: Shutdown procedure finished Jul 1, 2010 1:39:35 PM AppServerStartup run INFO: [Thread[GlassFish Kernel Main Thread,5,main]] exiting Jul 1, 2010 1:39:35 PM org.glassfish.ejb.embedded.EJBContainerProviderImpl createEJBContainer SEVERE: ejb.embedded.exception_instantiating javax.ejb.EJBException: Failed to deploy EJB modules - see log for details at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:135) at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:120) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:78) at com.test.EmbeddedEJBTest.main(EmbeddedEJBTest.java:16) Exception in thread "main" javax.ejb.EJBException: No EJBContainer provider available The following providers: org.glassfish.ejb.embedded.EJBContainerProviderImpl Returned null from createEJBContainer call. at javax.ejb.embeddable.EJBContainer.reportError(EJBContainer.java:186) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:121) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:78) at com.test.EmbeddedEJBTest.main(EmbeddedEJBTest.java:16) The problem seems to be the org.glassfish.ejb.embedded.EJBContainerProviderImpl#skipJar() method - it doesn't recognize this jar as glassfish's jar - its MANIFEST.MF doesn't have some 'skip' attributes. The workaround is to specify the name of the module, like so: Map<Object, Object> properties = new HashMap<Object, Object>(); properties.put(EJBContainer.MODULES, "bin"); // bin is the eclipse output folder ejb = EJBContainer.createEJBContainer(properties); and then it works fine.
    via by szczyp,
    • org.glassfish.deployment.common.DeploymentException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [MyCompPU] failed. Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.ValidationException Exception Description: [class com.mycompany.entity.Policy] uses a non-entity [class com.mycompany.entity.RDCoverage] as target entity in the relationship attribute [field coverageRD]. at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:166)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,