org.jboss.as.ejb3.component.EJBComponentUnavailableException: WFLYEJB0467: 请求被拒绝,因为容器被挂起
Posted
技术标签:
【中文标题】org.jboss.as.ejb3.component.EJBComponentUnavailableException: WFLYEJB0467: 请求被拒绝,因为容器被挂起【英文标题】:org.jboss.as.ejb3.component.EJBComponentUnavailableException: WFLYEJB0467: The request was rejected as the container is suspended 【发布时间】:2020-01-07 08:50:07 【问题描述】:我们正在尝试在 Wildfly-17 服务器中部署 EAR(EJB3 组件和 Web 模块)。 在 Spring 依赖注入的帮助下,EJB3 组件被注入到控制器中。 在服务器启动期间,我收到 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
【问题讨论】:
【参考方案1】:通过将lazy-init属性设置为spring bean解决了这个问题。
<bean id="testB" class="com.concretepage.B" lazy-init="true"/>
Spring bean lazy-init
【讨论】:
以上是关于org.jboss.as.ejb3.component.EJBComponentUnavailableException: WFLYEJB0467: 请求被拒绝,因为容器被挂起的主要内容,如果未能解决你的问题,请参考以下文章