Eclipse中的Glassfish部署Helios SR2失败 [英] Glassfish Deployment out of Eclipse Helios SR2 fails

查看:135
本文介绍了Eclipse中的Glassfish部署Helios SR2失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到一个奇怪的异常,当我尝试将Java EE应用程序从最新的Eclipse版本(Helios SR2 with Glassfish适配器1.7.1版)部署到最新的Glassfish(3.1)时。
如果我通过管理控制台将战争文件手动部署到服务器,一切都可以正常运行。所以似乎没有在应用程序本身或Glassfish配置中出现错误:

I experience a strange Exception which occurs when I try to deploy my Java EE application out of the latest Eclipse version (Helios SR2 with the Glassfish adapter version 1.7.1) to the latest Glassfish (3.1). If I deploy the war file manually to the server via the admin console everything works fine. So there does not seem to by a bug in the application itself or in the Glassfish config:

SCHWERWIEGEND: Could not resolve a persistence unit corresponding to the persistence-context-ref-name [com.sun.ejb.containers.TimerBean/em] in the scope of the module called [MyCMS]. Please verify your application.
java.lang.RuntimeException: Could not resolve a persistence unit corresponding to the persistence-context-ref-name [com.sun.ejb.containers.TimerBean/em] in the scope of the module called [MyCMS]. Please verify your application.
    at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUViaEMRef(BundleDescriptor.java:693)
    at com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUsViaPCRefs(BundleDescriptor.java:681)
    at com.sun.enterprise.deployment.WebBundleDescriptor.findReferencedPUs(WebBundleDescriptor.java:1056)
    at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:184)
    at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:166)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:870)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:465)
    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:222)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:619)

有没有人遇到与Eclipse类似的问题,并找到一个解决方案?

Does anyone experience similar problems with Eclipse and found a solution yet?

Cheers,
Fabian

Cheers, Fabian

推荐答案

谢谢Ludo的帮助!我解决了我的问题:由于某种原因,eclipse工作区映射到glassfist eclipseApp文件夹是不正确的。更新eclipse导致整个Maven依赖库被部署。而且因为一个derby.jar [test]也被部署到了glassfish,我得到了这个奇怪的bug。我不知道这一切如何发生,为什么这是由于更新eclipse ...导致的问题,无论如何我通过添加以下行属性>部署程序集:/ target / myapp / WEB-INF / lib - > WEB-INF / lib

Thank you Ludo for your help! I solved my problem: For some reason the mapping of the eclipse workspace to the glassfist eclipseApp folder wasn't correct. Updating eclipse resulted in the whole Maven Dependency Library being deployed. And since a derby.jar [test] was also deployed to glassfish, I got this strange bug. I can't tell anymore how this all happend and why this was caused by updating eclipse...anyway I solved the issue by adding following row Properties > Deployment Assembly: /target/myapp/WEB-INF/lib -> WEB-INF/lib

这篇关于Eclipse中的Glassfish部署Helios SR2失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆