如何将带有persistence.xml的域jar用作EAR中的库以在WebLogic上部署?

时间:2014-03-04 09:17:27

标签: java java-ee jar weblogic

我正在使用外部系统的域库。域库在META / INF文件夹中也有persistence.xml。我还把那个库放在我的EAR文件的lib目录中。但是当我尝试部署我的EAR应用程序时,它会发现未找到persistence.xml中定义的数据源是正确的。但我不需要那个数据源,唯一的想法是我需要的是库中的类文件。我怎样才能将jar用作库?

WebLogic抛出的异常如下:

  ####<2014-03-04 14:25:27 ALMT> <Error> <Deployer> <EPKZKARW0321> <server2> <[STANDBY] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1393921527172> <WL-149265> <Failure occurred in the execution of deployment request with ID "1393921501134" for task "43". Error is: "javax.naming.NameNotFoundException: Unable to resolve 'comp.env.jdbc.MyDS'. Resolved 'comp.env.jdbc'; remaining name 'MyDS'"
  javax.naming.NameNotFoundException: Unable to resolve 'comp.env.jdbc.MyDS'. Resolved 'comp.env.jdbc'; remaining name 'MyDS'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:250)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:406)

0 个答案:

没有答案