我们正在尝试在Wildfly-17服务器上部署EAR(EJB3组件和web模块)。EJB3组件在Spring依赖注入的帮助下被注入到控制器。在服务器启动期间,我得到了EJBComponentUnavailableException。
如果我部署EJB3并删除web模块Spring依赖注入,我们就能够成功地部署它。并且还能够从我的主程序访问bean。
只有在服务器启动时Spring EJB3依赖注入才会出现这个问题。
我们使用Wildfly10来部署我们的应用程序。我们正在尝试将其升级到Wildfly17。我们只在Wildfly17上遇到了这个问题。
Caused by: javax.naming.NamingException: WFLYNAM0062: Failed to lookup earname/utilsmodule/LoggerBean!com.utils.ejb.LoggerRemote [Root exception is java.lang.RuntimeException: org.jboss.as.ejb3.component.EJBComponentUnavailableException: WFLYEJB0467: The request was rejected as the container is suspended]
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:159)
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:83)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:207)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:193)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:189)
at org.wildfly.naming.client.remote.RemoteServerTransport.handleLookup(RemoteServerTransport.java:185)
at org.wildfly.naming.client.remote.RemoteServerTransport$1.handleMessage(RemoteServerTransport.java:106)
at org.jboss.remoting3.remote.RemoteConnectionChannel.lambda$handleMessageData$3(RemoteConnectionChannel.java:430)
at org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:975)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: org.jboss.as.ejb3.component.EJBComponentUnavailableException: WFLYEJB0467: The request was rejected as the container is suspended
at org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor$2$1.getReference(EjbJndiBindingsDeploymentUnitProcessor.java:253)
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:143)
... 13 more
Caused by: org.jboss.as.ejb3.component.EJBComponentUnavailableException: WFLYEJB0467: The request was rejected as the container is suspended
at org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor$2$1.getReference(EjbJndiBindingsDeploymentUnitProcessor.java:245)
... 14 more发布于 2019-09-11 17:41:49
通过将lazy-init属性设置为spring bean解决了此问题。
<bean id="testB" class="com.concretepage.B" lazy-init="true"/>https://stackoverflow.com/questions/57788745
复制相似问题