我正在使用 Websphere、JSF 1.2、JPA (Eclipselink) 在我的项目中,我具有以下结构:
-APHP0000_EJB
.APHP0000FacadeEJB.java
.Controllers (Managers)
.persistence.xml
-APHP0000_EJBClient
.APHP0000FacadeEJBLocal.java
.APHP0000FacadeEJBRemote.java
.Entyties
.TO
-APHP0000_EJBEAR
-APHP0000_Web (depends on APHP0000_EJBClient )
.jsp
.ManageBeans
-APHP0000_WebEAR
-->persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="APHP0000_EJB" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>java:comp/env/ds_aphp_web</jta-data-source>
<jar-file>APHP0000_EJBClient.jar</jar-file>
<class>su.aphpweb.jpa.entities.UnidadeProdutiva</class>
<class>su.aphpweb.jpa.entities.TipoParadaN4</class>
...
<class>su.aphpweb.jpa.entities.MaquinaProdutiva</class>
<properties>
<property name="eclipselink.logging.level" value="FINE" />
<property name="eclipselink.target-server" value="org.eclipse.persistence.platform.server.was.WebSphere_7_Platform" />
<property name="javax.persistence.jtaDataSource" value="jdbc/ds_aphp_web" />
<property name="eclipselink.cache.shared.default" value="false" />
<property name="eclipselink.logging.parameters" value="true" />
</properties>
</persistence-unit>
</persistence>
当我启动我的容器时,我的 APHP0000_EJBEAR 已部署,但我的 APHP0000_WebEAR 未部署。并得到以下异常。拜托,自上周以来,我一直坚持这件事。
[19/12/12 13:33:49:898 BRST] 00000006 JPAPUnitInfo E CWWJP0015E: Ocorreu um erro no provedor de persistência org.eclipse.persistence.jpa.PersistenceProvider quando ele tentou criar factory de gerenciador de entidade do contêiner para a unidade de persistência APHP0000_EJB. Ocorreu o seguinte erro: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [APHP0000_EJB] failed.
Internal Exception: java.lang.RuntimeException: java.io.FileNotFoundException: D:\Equipe\APHP\APHP0000_EJB\ejbModule\APHP0000_EJBClient.jar (O sistema não pode encontrar o arquivo especificado.)
[19/12/12 13:33:49:898 BRST] 00000006 JPAPUnitInfo E CWWJP0009E: O servidor não pode criar um depósito de informações EntityManagerFactory para a unidade persistente APHP0000_EJB do provedor org.eclipse.persistence.jpa.PersistenceProvider no módulo file:/D:/Equipe/APHP/APHP0000_EJB/ejbModule/.
[19/12/12 13:33:49:914 BRST] 00000006 EJBContainerI I WSVR0037I: Iniciando o jar do EJB: APHP0000_EJB.jar
[19/12/12 13:33:49:914 BRST] 00000006 EJBContainerI I CNTR0167I: O servidor está ligando a interface su.aphpweb.jpa.entities.controller.ResponsParadaUnidManagerRemote do enterprise bean ResponsParadaUnidManager no módulo APHP0000_EJB.jar do aplicativo APHP0000_WebEAR. O local de ligação é: ejb/APHP0000_WebEAR/APHP0000_EJB.jar/ResponsParadaUnidManager#su.aphpweb.jpa.entities.controller.ResponsParadaUnidManagerRemote
[19/12/12 13:33:49:914 BRST] 00000006 EJBContainerI I CNTR0167I: O servidor está ligando a interface su.aphpweb.jpa.entities.controller.UnidadeMotivoTipoManagerRemote do enterprise bean UnidadeMotivoTipoManager no módulo APHP0000_EJB.jar do aplicativo APHP0000_WebEAR. O local de ligação é: ejb/APHP0000_WebEAR/APHP0000_EJB.jar/UnidadeMotivoTipoManager#su.aphpweb.jpa.entities.controller.UnidadeMotivoTipoManagerRemote
[19/12/12 13:33:49:914 BRST] 00000006 ComponentData E CWMDF0015E: O carregador de classes não pode carregar a interface su.aphpweb.negocio.ejb.APHP0000FacadeEJBRemote no arquivo su.aphpweb.negocio.ejb.APHP0000FacadeEJB Enterprise JavaBeans (EJB).
[19/12/12 13:33:49:914 BRST] 00000006 EJBContainerI E WSVR0040E: Falha no addEjbModule para APHP0000_EJB.jar [class com.ibm.ws.runtime.component.DeployedEJBModuleImpl]
com.ibm.ejs.container.EJBConfigurationException: CWMDF0015E: O carregador de classes não pode carregar a interface su.aphpweb.negocio.ejb.APHP0000FacadeEJBRemote no arquivo su.aphpweb.negocio.ejb.APHP0000FacadeEJB Enterprise JavaBeans (EJB).
at com.ibm.ws.metadata.ComponentDataObject.setInterfacesFromImplements(ComponentDataObject.java:783)
at com.ibm.ws.metadata.ComponentDataObject.finishCDO(ComponentDataObject.java:424)
at com.ibm.ws.runtime.component.EJBContainerImpl.startModule(EJBContainerImpl.java:2609)
at com.ibm.ws.runtime.component.EJBContainerImpl.start(EJBContainerImpl.java:3827)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1120)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1313)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:619)
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$1.run(ApplicationMgrImpl.java:1264)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:4476)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4654)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1269)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2041)
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.startCompositionUnit(CompositionUnitMgrImpl.java:651)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:613)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:243)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1086)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:967)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1320)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1213)
at com.ibm.ws.management.application.AppManagementImpl._startApplication(AppManagementImpl.java:1284)
at com.ibm.ws.management.application.AppManagementImpl.startApplication(AppManagementImpl.java:1180)
at com.ibm.ws.management.application.AppManagementImpl.startApplication(AppManagementImpl.java:1140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:243)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1086)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:967)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1320)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1213)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
at com.ibm.ws.management.connector.rmi.RMIConnectorService.invoke(RMIConnectorService.java:282)
at com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie.invoke(_RMIConnectorService_Tie.java:395)
at com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie._invoke(_RMIConnectorService_Tie.java:160)
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:622)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:475)
at com.ibm.rmi.iiop.ORB.process(ORB.java:513)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1574)
at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2841)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2714)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)