This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes Problem in deploying EAR when using <jar-file>*.jar</jar-file> in persistence.xml  on weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Problem in deploying EAR when using <jar-file>*.jar</jar-file> in persistence.xml  on weblogic " Watch "Problem in deploying EAR when using <jar-file>*.jar</jar-file> in persistence.xml  on weblogic " New topic
Author

Problem in deploying EAR when using <jar-file>*.jar</jar-file> in persistence.xml on weblogic

chandan prakash
Greenhorn

Joined: Feb 07, 2011
Posts: 1
Hi
i am making an EAR say reports.ear (reports.jar+reports.war). In persistence.xml of reports.jar,i have used <jar-file>nfs.jar</jar-file> while declaring persistence unit to access entity class of nfs.jar (which is already deployed on server) in session bean of reports.jar.
When i am deploying reports.jar and reports.war separately then evrything goes fine, but when i am deploying reports.ear (in place of jar+war) i get following deployment problem:

<Feb 7, 2011 9:32:46 PM IST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1297094565648' for task '13'. Error is: 'weblogic.application.ModuleException: '
weblogic.application.ModuleException:
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:404)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
Truncated. see log file for complete stacktrace

Caused By: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:114)
at java.util.jar.JarFile.<init>(JarFile.java:133)
at java.util.jar.JarFile.<init>(JarFile.java:97)
at org.eclipse.persistence.internal.jpa.deployment.ArchiveFactoryImpl.createArchive(ArchiveFactoryImpl.java:82)
Truncated. see log file for complete stacktrace

i think path of nfs.jar is nt being resolved.....i read smwhere it uses relative path to the jar where persistence.xml resides.......but here persistence.xml containing jar is inside an ear and it wants to refer a jar outside of the ear(i.e. on server)
Can somebody help me out,i searched on forums but didnt found anything
i am using weblogic10.3 server,my code is built in struts2 and ejb3.
.....this is my first post,anyhelp appreciated
anandraj tadkal
Ranch Hand

Joined: Feb 22, 2011
Posts: 98

<jar-file> parameter resolves the absolute path, however it is not a viable option in production environment.

The below post might help you out.

http://forum.springsource.org/showthread.php?t=65761

Regards,
Anandraj
http://weblogic-wonders.com


Regards,
Anandraj
http://weblogic-wonders.com
Follow us on facebook:
https://www.facebook.com/weblogicwonders
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem in deploying EAR when using <jar-file>*.jar</jar-file> in persistence.xml on weblogic
 
Similar Threads
JPA file accessed from different .ear files deployed on weblogic server
weblogic deployment exception
Deployment Problems with EJB- RemoteException
Not able to deploy my EAR
Weblogic 9.2 Deployment Error