Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

CWWJP0024E when trying to use the 'jar-file' property in persistence.xml

已查看 88 次
跳至第一个未读帖子

DrorB

未读,
2009年3月30日 03:57:202009/3/30
收件人 ste...@idit.co.il
I have an enterprise application deployed on Websphere 7.0.3. The
applications contains multiple EJB3 modules.
I use Hibernate as a persistence provider. The entities are spread
around the EJB jars, but I want to use a single persistence unit.
In the persistence.xml file I use the 'jar-file' property to link
between the persistence unit and all the jars containing entities, for
example: <jar-file>jarWithEntities.jar</jar-file>.
When the application starts Websphere throws multiple CWWJP0024E
errors and does not pass the list of jar files to Hibernate:

CWWJP0024E: The /C:/Program Files/IBM/WebSphere/AppServer7/profiles/
AppSrv01/installedApps/alphacsp-drorbNode03Cell/xxx.ear/xxx.jar!/ Java
archive (JAR) file specification for the {2} persistence unit is
incorrect.

The cause for this message can be found in the FFDC logs:

java.net.MalformedURLException: no protocol: /C:/Program Files/IBM/
WebSphere/AppServer7/profiles/AppSrv01/installedApps/alphacsp-
drorbNode03Cell/xxx.ear/xxx.jar!/
at java.net.URL.<init>(URL.java:567)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at com.ibm.ws.jpa.management.JPAPUnitInfo.setJarFileUrls
(JPAPUnitInfo.java:913)
at com.ibm.ws.jpa.management.JPAPxmlInfo.extractPersistenceUnits
(JPAPxmlInfo.java:280)
at com.ibm.ws.jpa.management.JPAScopeInfo.processPersistenceUnit
(JPAScopeInfo.java:140)
at com.ibm.ws.jpa.management.JPAApplInfo.processModulePUs
(JPAApplInfo.java:169)
at com.ibm.ws.jpa.management.JPAComponentImpl.startingDeployedModule
(JPAComponentImpl.java:878)
at com.ibm.ws.jpa.management.JPAComponentImpl.stateChanged
(JPAComponentImpl.java:722)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.stateChanged
(ApplicationMgrImpl.java:1096)
at
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectEvent
(DeployedApplicationImpl.java:1296)
at com.ibm.ws.runtime.component.DeployedModuleImpl.setState
(DeployedModuleImpl.java:213)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start
(DeployedModuleImpl.java:608)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start
(DeployedApplicationImpl.java:938)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication
(ApplicationMgrImpl.java:723)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start
(ApplicationMgrImpl.java:2068)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start
(CompositionUnitMgrImpl.java:437)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start
(CompositionUnitImpl.java:122)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start
(CompositionUnitMgrImpl.java:380)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300
(CompositionUnitMgrImpl.java:108)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl
$CUInitializer.run(CompositionUnitMgrImpl.java:935)
at com.ibm.wsspi.runtime.component.WsComponentImpl
$_AsynchInitializer.run(WsComponentImpl.java:349)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)

It seems that Websphere generates the full path for the jar which
cause the MalformedURLException.

I've tried all kind of ways for defining the jar path in the 'jar-
file' property, including:
file:jarWithEntities.jar
file:/jarWithEntities.jar
jar:file:jarWithEntities.jar
jar:file:/jarWithEntities.jar

I should mention that the same application works well with Weblogic 10
and JBoss 5.

0 个新帖子