当我尝试将我的 EJB 应用程序部署到 glassfish (3.1.2) 时,我随机收到“预部署错误”。有时有效,有时无效,有 50% 的机会。
我在互联网上搜索了这个问题,但似乎我是唯一一个遇到这个问题的人。我也无法通过分析堆栈跟踪来找出问题所在。
有人知道这里有什么问题吗?这真是要了我的命。
SCHWERWIEGEND:调用类 org.glassfish.persistence.jpa.JPADeployer 准备方法时出现异常 SCHWERWIEGEND:调用类 org.glassfish.javaee.full.deployment.EarDeployer 准备方法时出现异常 SCHWERWIEGEND:准备应用程序时出现异常 SCHWERWIEGEND: 异常 [EclipseLink-28018] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException 异常描述:PersistenceUnit [SeatingPlannerEJB] 的预部署失败。 内部异常:java.lang.NullPointerException org.glassfish.deployment.common.DeploymentException: 异常 [EclipseLink-28018] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException 异常描述:PersistenceUnit [SeatingPlannerEJB] 的预部署失败。 内部异常:java.lang.NullPointerException 在 org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:166) 在 com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871) 在 com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410) 在 com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) 在 org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389) 在 com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348) 在 com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363) 在 com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085) 在 com.sun.enterprise.v3.admin.CommandRunnerImpl.access $1200(CommandRunnerImpl.java:95) 在 com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291) 在 com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259) 在 com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461) 在 com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212) 在 com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179) 在 com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) 在 com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354) 在 com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) 在 com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849) 在 com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) 在 com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) 在 com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228) 在 com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) 在 com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) 在 com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) 在 com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) 在 com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) 在 com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) 在 com.sun.grizzly.ContextTask.run(ContextTask.java:71) 在 com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) 在 com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) 在 java.lang.Thread.run(Thread.java:662) 引起:javax.persistence.PersistenceException: 异常 [EclipseLink-28018] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException 异常描述:PersistenceUnit [SeatingPlannerEJB] 的预部署失败。 内部异常:java.lang.NullPointerException 在 org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1402) 在 org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:208) 在 org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:206) 在 org.glassfish.persistence.jpa.PersistenceUnitLoader.(PersistenceUnitLoader.java:120) 在 org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224) 在 org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495) 在 org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233) 在 org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168) 在 com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871) 在 org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:290) 在 org.glassfish.javaee.full.deployment.EarDeployer.access $200(EarDeployer.java:86) 在 org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:141) 在 org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:138) 在 org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:215) 在 org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:224) 在 org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:250) 在 org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:138) ... 30 更多 原因:异常 [EclipseLink-28018] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException 异常描述:PersistenceUnit [SeatingPlannerEJB] 的预部署失败。 内部异常:java.lang.NullPointerException 在 org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:221) ... 47 更多 引起:java.lang.NullPointerException 在 org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToOneAccessor.process(OneToOneAccessor.java:116) 在 org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processNonOwningRelationshipAccessors(MetadataProject.java:1436) 在 org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1707) 在 org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:535) 在 org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:526) 在 org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1337) ... 46 更多 SCHWERWIEGEND:准备应用程序时出现异常:异常 [EclipseLink-28018](Eclipse Persistence Services - 2.3.2.v20111125-r10461):org.eclipse.persistence.exceptions.EntityManagerSetupException 异常描述:PersistenceUnit [SeatingPlannerEJB] 的预部署失败。 内部异常:java.lang.NullPointerException javax.persistence.PersistenceException: 异常 [EclipseLink-28018] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException 异常描述:PersistenceUnit [SeatingPlannerEJB] 的预部署失败。 内部异常:java.lang.NullPointerException 在 org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1402) 在 org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:208) 在 org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:206) 在 org.glassfish.persistence.jpa.PersistenceUnitLoader.(PersistenceUnitLoader.java:120) 在 org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:224) 在 org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:495) 在 org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:233) 在 org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168) 在 com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871) 在 org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:290) 在 org.glassfish.javaee.full.deployment.EarDeployer.access $200(EarDeployer.java:86) 在 org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:141) 在 org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:138) 在 org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:215) 在 org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:224) 在 org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:250) 在 org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:138) 在 com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871) 在 com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410) 在 com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) 在 org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389) 在 com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348) 在 com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363) 在 com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085) 在 com.sun.enterprise.v3.admin.CommandRunnerImpl.access $1200(CommandRunnerImpl.java:95) 在 com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291) 在 com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259) 在 com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461) 在 com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212) 在 com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179) 在 com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) 在 com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354) 在 com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) 在 com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849) 在 com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) 在 com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) 在 com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228) 在 com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) 在 com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) 在 com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) 在 com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) 在 com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) 在 com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) 在 com.sun.grizzly.ContextTask.run(ContextTask.java:71) 在 com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) 在 com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) 在 java.lang.Thread.run(Thread.java:662) 原因:异常 [EclipseLink-28018] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException 异常描述:PersistenceUnit [SeatingPlannerEJB] 的预部署失败。 内部异常:java.lang.NullPointerException 在 org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:221) ... 47 更多 引起:java.lang.NullPointerException 在 org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToOneAccessor.process(OneToOneAccessor.java:116) 在 org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processNonOwningRelationshipAccessors(MetadataProject.java:1436) 在 org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1707) 在 org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:535) 在 org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:526) 在 org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1337) ... 46 更多