当前位置: 代码迷 >> J2EE >> GlassFish 器皿能同时发布两个EJB project 吗
  详细解决方案

GlassFish 器皿能同时发布两个EJB project 吗

热度:434   发布时间:2016-04-21 21:37:06.0
GlassFish 容器能同时发布两个EJB project 吗?
最近项目中用到 EJB+JPA +JSF ,服务器是GlassFish.在GlassFish中加入两个EJB project,一个Web project,但是启动时就报错,错误为:
20T15:58:18.338+0800|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=52;_ThreadName=admin-thread-pool-4848(3);|无法解析持久性单元, 该持久性单元与名为 [LoansApp1#BizLogic_Layer.jar] 的模块范围内的 persistence-context-ref-name [demo.session.CustGrpDetlEJB/ema] 对应。请验证应用程序。
org.glassfish.deployment.common.DeploymentException: 无法解析持久性单元, 该持久性单元与名为 [LoansApp1#BizLogic_Layer.jar] 的模块范围内的 persistence-context-ref-name [demo.session.CustGrpDetlEJB/ema] 对应。请验证应用程序。
at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:166)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)
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:389)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
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:722)

请各位大神为我分析,到底是哪个原因出错?是不能同时发布两个EJB project 吗?
EJB??JPA??GlassFish

------解决方案--------------------
可以发布多个的,,看看你的持久化配置文件
------解决方案--------------------
多个肯定是支持的。
------解决方案--------------------
数据源的配置文件,是怎么样的,放在什么地方?
要不你 加上java:/试试。 java:/jdbc/xxx
  相关解决方案
本站暂不开放注册!
内测阶段只得通过邀请码进行注册!
 
  • 最近登录:Tue Nov 20 14:01:09 CST 2018
  • 最近登录:Tue Nov 20 14:01:09 CST 2018
  • 最近登录:Tue Nov 20 14:01:09 CST 2018
  • 最近登录:Tue Nov 20 14:01:09 CST 2018
  • 最近登录:Tue Nov 20 14:01:09 CST 2018