2010-03-08 64 views
1

我創建了一個非常簡單的「企業應用程序」項目,其中包含約7個實體bean和一個無狀態會話bean。我還配置了一個Glassfish v3實例作爲我的應用服務器運行。不幸的是,當我嘗試發佈的EAR到GlassFish,我得到如下回應:Eclipse Galileo + Glassfish v3:JPADeployer部署時出現NullPointerException

SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method 
java.lang.NullPointerException 
    at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:104) 
    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644) 
    at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:269) 
    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 com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183) 
    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:1176) 
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83) 
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235) 
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224) 
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365) 
    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204) 
    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:245) 
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) 
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693) 
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) 
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) 
    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.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) 
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309) 
    at java.lang.Thread.run(Thread.java:637) 

回答

1

這NPE看起來莫名其妙地接近問題#11387(它不是完全一樣的問題,但它可能是同一原因...或部署子組件中的另一個錯誤)。因此,我的建議是:

  1. 嘗試使用最近的每晚構建(上述問題已在3天前在樹幹中修復,我沒有仔細檢查確認它完全不相關)。
  2. 填充new issue堆棧跟蹤和理想情況下,如果問題仍然存在。
+0

我在哪裏可以找到夜間搭建?我檢查了http://download.java.net/glassfish/v3/nightly/,最近的版本是從2009-12-14。 – bshacklett 2010-03-08 03:16:26

+0

@bshacklett是的,因爲V3已經發布。每晚構建適用於v3.1:http://download.java.net/glassfish/v3.1/nightly/ – 2010-03-08 03:41:45

+0

@Pascal Thivent - 明白了。現在發佈正在爲我工​​作,所以看起來你是對的。謝謝。您是否瞭解在此環境中開發將如何影響生產v3服務器上的部署?我猜只要我不使用任何新的功能,我應該保持良好狀態? – bshacklett 2010-03-08 04:03:54

相關問題