다른 ejb-project의 다른 싱글 톤 EJB에서 ejb 프로젝트의 로컬 Stateless-EJB를 호출하려고합니다. 두 EJB- 프로젝트는 동일한 ear 파일에 있습니다. Application Server는 WebSphere Application Server 8.0.0.1입니다.EJB 3.1 Websphere Application Server에서 바인딩이 작동하지 않습니다.
먼저 EJB 3.1 프로젝트 (PersistenceEJB.jar) :
인터페이스
@Local
public interface TaskInfoDao extends DaoTemplate<TaskInfo> {
public int deleteAll();
}
상태 비 저장 콩에게 :
@Stateless
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class TaskInfoDaoImpl implements TaskInfoDao {
private static final long serialVersionUID = 1L;
@PersistenceContext(unitName = "MyDatasource")
private EntityManager em;
@Override
public int deleteAll() {
Query query = em.createQuery("DELETE FROM TaskInfo t");
int count = query.executeUpdate();
return count;
}
}
는 EJB-jar.xml의와 IBM-EJB-JAR -bnd.xml이 비어 있습니다.
둘째 EJB 3.1 프로젝트 (SchedulerEJB.jar) :
싱글 :
@Startup
@Singleton
public class StartUpBean {
private final static Logger LOGGER = Logger.getLogger(StartUpBean.class
.getName());
@EJB
private TaskInfoDao taskInfoDao;
@PostConstruct
public void onStart() {
LOGGER.info("DELETED: " + taskInfoDao.deleteAll());
}
}
META-INF
Manifest-Version: 1.0
Class-Path: PersistenceEJB.jar
내 "EJB-jar.xml의"와 "IBM- ejb-jar-bnd.xml "은 비어 있습니다 (두 프로젝트 모두에서).
귀 파일 : -META-INF | -application.xml | - IBM-응용 프로그램 ext.xml | - IBM-applcaiton-bnd.xml | -MANIFEST.MF -PersistenceEJB.jar -SchedulerEJB.jar
application.xml을 :
<?xml version="1.0" encoding="UTF-8"?>
<application id="Application_ID" version="6"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd">
<description>...</description>
<display-name>SchedulerAppEAR</display-name>
<module id="Module_1392974920540">
<ejb>SchedulerEJB.jar</ejb>
</module>
<module id="Module_1392975196627">
<ejb>PersistenceEJB.jar</ejb>
</module>
</application>
다른 파일 귀 META-INF에서 비어 있습니다.
JVM-시작 나는 다음과 같은 예외 얻을에: 무슨 잘못 내 코드 그래서
[21.02.14 13:15:16:760 CET] 0000003a EJBApplicatio E CNTR0190E: The StartUpBean startup singleton session bean in the SchedulerEJB.jar module failed initialization with exception:
javax.ejb.NoSuchEJBException: An error occurred during initialization of singleton session bean SchedulerAppEAR#SchedulerEJB.jar#StartUpBean, resulting in the discarding of the singleton instance.; nested exception is: javax.ejb.EJBException: The scheduler.StartUpBean/taskInfoDao EJB reference in the StartUpBean component in the SchedulerEJB.jar module of the SchedulerAppEAR application could not be resolved; nested exception is: com.ibm.ejs.container.EJBNotFoundException: EJB with interface persistence.dao.TaskInfoDao not present in application SchedulerAppEAR
javax.ejb.EJBException: The scheduler.StartUpBean/taskInfoDao EJB reference in the StartUpBean component in the SchedulerEJB.jar module of the SchedulerAppEAR application could not be resolved; nested exception is: com.ibm.ejs.container.EJBNotFoundException: EJB with interface persistence.dao.TaskInfoDao not present in application SchedulerAppEAR
com.ibm.ejs.container.EJBNotFoundException: EJB with interface persistence.dao.TaskInfoDao not present in application SchedulerAppEAR
at com.ibm.ejs.container.HomeOfHomes.getHomeByInterface(HomeOfHomes.java:928)
at com.ibm.ws.ejbcontainer.injection.factory.EJBLinkObjectFactory.getObjectInstance(EJBLinkObjectFactory.java:261)
at com.ibm.ws.ejbcontainer.injection.factory.EJBLinkObjectFactory.getObjectInstance(EJBLinkObjectFactory.java:167)
at com.ibm.ws.injectionengine.processor.EJBInjectionBinding.getInjectionObject(EJBInjectionBinding.java:1181)
at com.ibm.wsspi.injectionengine.InjectionBinding.getInjectableObject(InjectionBinding.java:1003)
at com.ibm.wsspi.injectionengine.InjectionTarget.inject(InjectionTarget.java:198)
at com.ibm.ws.injectionengine.AbstractInjectionEngine.inject(AbstractInjectionEngine.java:924)
at com.ibm.ejs.container.SingletonBeanO.initialize(SingletonBeanO.java:382)
at com.ibm.ejs.container.BeanOFactory.create(BeanOFactory.java:147)
at com.ibm.ejs.container.EJSHome.createSingletonBeanO(EJSHome.java:4985)
at com.ibm.ejs.csi.EJBApplicationMetaData.createStartupBeans(EJBApplicationMetaData.java:971)
at com.ibm.ejs.csi.EJBApplicationMetaData.startedModule(EJBApplicationMetaData.java:695)
at com.ibm.ws.runtime.component.EJBContainerImpl.stateChanged(EJBContainerImpl.java:5501)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.stateChanged(ApplicationMgrImpl.java:1083)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectEvent(DeployedApplicationImpl.java:1352)
at com.ibm.ws.runtime.component.DeployedModuleImpl.setState(DeployedModuleImpl.java:247)
at com.ibm.ws.runtime.component.DeployedModuleImpl.setState(DeployedModuleImpl.java:243)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:641)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:967)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:744)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1332)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2128)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:663)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5315)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5531)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:677)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:621)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1224)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1085)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:966)
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:1335)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
at com.ibm.ws.management.connector.ipc.CallRouter.route(CallRouter.java:247)
at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.doWork(IPCConnectorInboundLink.java:353)
at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.ready(IPCConnectorInboundLink.java:132)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1650)
javax.ejb.EJBException: The scheduler.StartUpBean/taskInfoDao EJB reference in the StartUpBean component in the SchedulerEJB.jar module of the SchedulerAppEAR application could not be resolved; nested exception is: com.ibm.ejs.container.EJBNotFoundException: EJB with interface persistence.dao.TaskInfoDao not present in application SchedulerAppEAR
Caused by: com.ibm.ejs.container.EJBNotFoundException: EJB with interface persistence.dao.TaskInfoDao not present in application SchedulerAppEAR
at com.ibm.ejs.container.HomeOfHomes.getHomeByInterface(HomeOfHomes.java:928)
at com.ibm.ws.ejbcontainer.injection.factory.EJBLinkObjectFactory.getObjectInstance(EJBLinkObjectFactory.java:261)
at com.ibm.ws.ejbcontainer.injection.factory.EJBLinkObjectFactory.getObjectInstance(EJBLinkObjectFactory.java:167)
at com.ibm.ws.injectionengine.processor.EJBInjectionBinding.getInjectionObject(EJBInjectionBinding.java:1181)
at com.ibm.wsspi.injectionengine.InjectionBinding.getInjectableObject(InjectionBinding.java:1003)
at com.ibm.wsspi.injectionengine.InjectionTarget.inject(InjectionTarget.java:198)
at com.ibm.ws.injectionengine.AbstractInjectionEngine.inject(AbstractInjectionEngine.java:924)
at com.ibm.ejs.container.SingletonBeanO.initialize(SingletonBeanO.java:382)
at com.ibm.ejs.container.BeanOFactory.create(BeanOFactory.java:147)
at com.ibm.ejs.container.EJSHome.createSingletonBeanO(EJSHome.java:4985)
at com.ibm.ejs.csi.EJBApplicationMetaData.createStartupBeans(EJBApplicationMetaData.java:971)
at com.ibm.ejs.csi.EJBApplicationMetaData.startedModule(EJBApplicationMetaData.java:695)
at com.ibm.ws.runtime.component.EJBContainerImpl.stateChanged(EJBContainerImpl.java:5501)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.stateChanged(ApplicationMgrImpl.java:1083)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectEvent(DeployedApplicationImpl.java:1352)
at com.ibm.ws.runtime.component.DeployedModuleImpl.setState(DeployedModuleImpl.java:247)
at com.ibm.ws.runtime.component.DeployedModuleImpl.setState(DeployedModuleImpl.java:243)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:641)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:967)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:744)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1332)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2128)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:663)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5315)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5531)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:677)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:621)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1224)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1085)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:966)
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:1335)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
at com.ibm.ws.management.connector.ipc.CallRouter.route(CallRouter.java:247)
at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.doWork(IPCConnectorInboundLink.java:353)
at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.ready(IPCConnectorInboundLink.java:132)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1650)
javax.ejb.NoSuchEJBException: An error occurred during initialization of singleton session bean SchedulerAppEAR#SchedulerEJB.jar#StartUpBean, resulting in the discarding of the singleton instance.; nested exception is: javax.ejb.EJBException: The scheduler.StartUpBean/taskInfoDao EJB reference in the StartUpBean component in the SchedulerEJB.jar module of the SchedulerAppEAR application could not be resolved; nested exception is: com.ibm.ejs.container.EJBNotFoundException: EJB with interface persistence.dao.TaskInfoDao not present in application SchedulerAppEAR
Caused by: javax.ejb.EJBException: The scheduler.StartUpBean/taskInfoDao EJB reference in the StartUpBean component in the SchedulerEJB.jar module of the SchedulerAppEAR application could not be resolved; nested exception is: com.ibm.ejs.container.EJBNotFoundException: EJB with interface persistence.dao.TaskInfoDao not present in application SchedulerAppEAR
Caused by: com.ibm.ejs.container.EJBNotFoundException: EJB with interface persistence.dao.TaskInfoDao not present in application SchedulerAppEAR
at com.ibm.ejs.container.HomeOfHomes.getHomeByInterface(HomeOfHomes.java:928)
at com.ibm.ws.ejbcontainer.injection.factory.EJBLinkObjectFactory.getObjectInstance(EJBLinkObjectFactory.java:261)
at com.ibm.ws.ejbcontainer.injection.factory.EJBLinkObjectFactory.getObjectInstance(EJBLinkObjectFactory.java:167)
at com.ibm.ws.injectionengine.processor.EJBInjectionBinding.getInjectionObject(EJBInjectionBinding.java:1181)
at com.ibm.wsspi.injectionengine.InjectionBinding.getInjectableObject(InjectionBinding.java:1003)
at com.ibm.wsspi.injectionengine.InjectionTarget.inject(InjectionTarget.java:198)
at com.ibm.ws.injectionengine.AbstractInjectionEngine.inject(AbstractInjectionEngine.java:924)
at com.ibm.ejs.container.SingletonBeanO.initialize(SingletonBeanO.java:382)
at com.ibm.ejs.container.BeanOFactory.create(BeanOFactory.java:147)
at com.ibm.ejs.container.EJSHome.createSingletonBeanO(EJSHome.java:4985)
at com.ibm.ejs.csi.EJBApplicationMetaData.createStartupBeans(EJBApplicationMetaData.java:971)
at com.ibm.ejs.csi.EJBApplicationMetaData.startedModule(EJBApplicationMetaData.java:695)
at com.ibm.ws.runtime.component.EJBContainerImpl.stateChanged(EJBContainerImpl.java:5501)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.stateChanged(ApplicationMgrImpl.java:1083)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectEvent(DeployedApplicationImpl.java:1352)
at com.ibm.ws.runtime.component.DeployedModuleImpl.setState(DeployedModuleImpl.java:247)
at com.ibm.ws.runtime.component.DeployedModuleImpl.setState(DeployedModuleImpl.java:243)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:641)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:967)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:744)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1332)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2128)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:663)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5315)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5531)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:677)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:621)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1224)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1085)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:966)
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:1335)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
at com.ibm.ws.management.connector.ipc.CallRouter.route(CallRouter.java:247)
at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.doWork(IPCConnectorInboundLink.java:353)
at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.ready(IPCConnectorInboundLink.java:132)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1650)
를? 사전에
감사합니다!
편집 : 나는 내 startupbean에 대한 ibm.websphere.startupservice 인터페이스를 사용하는 경우 이 빈 분사가 잘 작동합니다. 이 인터페이스를 사용하기 위해 @Startup + @ Singleton 인터페이스를 제거했습니다. ...
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar id="ejb-jar_ID" version="3.1" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd">
<display-name>SchedulerEJB</display-name>
<enterprise-beans>
<session id="StartUp">
<ejb-name>StartUp</ejb-name>
<home>com.ibm.websphere.startupservice.AppStartUpHome</home>
<remote>com.ibm.websphere.startupservice.AppStartUp</remote>
<ejb-class>ejb.StartUpBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
하지만 내가 사용하는 응용 프로그램 서버에 의존하기 때문에 나는이 방법처럼 해달라고 :
public class StartUpBean implements javax.ejb.SessionBean {
...
public boolean start() throws FileNotFoundException {
...
return true;
}
}
그리고 내 EJB-jar.xml의 : 또한 나는 나의 클래스를 변경
manifest.mf의 클래스 경로 줄이 이상합니다. 나는 그것을 제거 할 것이다. 웹/엔터프라이즈 응용 프로그램 클래스 경로는 컨테이너에 의해 관리되므로이를 방해 할 수있는 일은하지 마십시오. – Gimby
이 줄을 제거했지만 같은 예외가 발생합니다 ... – veote
좋습니다. 따라서 오류는 "이 이름이 배포 된 EJB가 없습니다"입니다. 나는 컨테이너가 거짓말이 아니라고 생각할 것입니다. 그렇다면 EJB/인터페이스가 존재합니까? 클래스 파일은 물리적으로 올바른 모듈에 있고 배포 영역의 올바른 위치에 있습니까? – Gimby