2013-07-30 122 views
0

我們在運行ejb應用程序的地方安裝了glassfish 2.1應用服務器。現在,在新服務器中安裝了glassfish 3.1,當我嘗試部署其中一個EJB應用程序時,出現以下異常。 ...無法在glassfish 3.1服務器上部署EJB ear文件服務器

Cannot resolve reference Local ejb-ref name=com.alw.mdb.ExtFileUploadedMessageHandlerBean/fileUploaderBean,Local 3.x interface =com.alw.sbi.extuploader.utils.ExtFileManagerLocal,ejb-link=null,lookup=,mappedName=,jndi-name=,refType=Session because there are 2 ejbs in the application with interface com.alw.sbi.extuploader.utils.ExtFileManagerLocal. 
Some of the possible causes: 
1. The EJB bean class was packaged in an ear lib library (or through any other library mechanism which makes the library visible to all component modules), this makes all the component modules include this bean class indirectly. 
2. The EJB bean class was packaged in a component module which references the EJB, either directly or indirectly through Manifest, WEB-INF/lib. 
The EJB bean class should only be packaged in the declaring ejb module and not the referencing modules. The referencing modules should only include EJB interfaces. 
java.lang.IllegalArgumentException: Cannot resolve reference Local ejb-ref name=com.alw.mdb.ExtFileUploadedMessageHandlerBean/fileUploaderBean,Local 3.x interface =com.alw.sbi.extuploader.utils.ExtFileManagerLocal,ejb-link=null,lookup=,mappedName=,jndi-name=,refType=Session because there are 2 ejbs in the application with interface com.alw.sbi.extuploader.utils.ExtFileManagerLocal. 
Some of the possible causes: 
1. The EJB bean class was packaged in an ear lib library (or through any other library mechanism which makes the library visible to all component modules), this makes all the component modules include this bean class indirectly. 
2. The EJB bean class was packaged in a component module which references the EJB, either directly or indirectly through Manifest, WEB-INF/lib. 
The EJB bean class should only be packaged in the declaring ejb module and not the referencing modules. The referencing modules should only include EJB interfaces. 
     at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:568) 
     at com.sun.enterprise.deployment.EjbDescriptor.visit(EjbDescriptor.java:2589) 
     at com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:734) 
     at com.sun.enterprise.deployment.Application.visit(Application.java:1768) 
     at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:799) 
     at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:277) 
     at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:240) 
     at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:170) 
     at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:93) 
     at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:826) 

請問誰能告訴我問題在哪裏?
還有一件事情,當我們安裝一個應用程序服務器時,我們是否需要手動將所需的jar文件放入服務器的lib文件夾中,或者這些文件本身自帶。因爲在我們的另一臺測試服務器中,glassfish/lib文件夾中有很多罐子,但不是新安裝的那個。

回答

相關問題