我们正在将应用程序从JBoss EAP 6迁移到EAP7。这是一个包含各种war和jar文件的文件。服务器启动时,我们会启动多个servlet。 servlet在web.xml中配置,属性load-on-startup>0。这在EAP 6中工作正常,但是当我们将ear-file部署到EAP 7时,会导致NoSuchEJBException。我假设当EJB可用时,EJB可用。由于相应的JNDI绑定已记录到控制台,因此已处理servlet的init()方法。当我手动调用servlet时,一切正常,查找成功。
任何想法在这里可能出什么问题吗?以及如何解决这个问题?
已创建JNDI绑定
ejb:myapp / core-ejb / CacheConfigManager!com.mycompany.mycomponent.core.cache.config.manager.CacheConfigManager
ejb:myapp / core-ejb / CacheConfigManager!com.mycompany.mycomponent.core.cache.config.manager.CacheConfigManagerLocal
servlet启动,查找失败
WildFly命名版本1.0.9.Final-redhat-1
JBoss EJB客户端版本4.0.12.Final-redhat-00001
javax.ejb.NoSuchEJBException:EJBCLIENT000079:无法发现“ myapp / core-ejb / CacheConfigManager”的EJB StatelessEJBLocator的请求目的地,视图为com.mycompany.mycomponent.core.cache.config.manager.CacheConfigManager接口,亲和力为无
Stacktrace
10:44:10,354在org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:592)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocationResult(TransactionPostDiscoveryInterceptor.java:133)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:115)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocationResult(NamingEJBClientInterceptor.java:79)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:172)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:938)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:177)上出现[stderr](ServerService线程池-81) 10:44:10,354在org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:112)上出现[stderr](ServerService线程池-81) 10:44:10,354在com.sun.proxy。$ Proxy116.getCacheConfigs(未知源)上的[stderr]错误(ServerService线程池-81) 10:44:10,354在com.mycompany.mycomponent.core.cache.config.web.CacheConfigWeb.getCacheConfigs(CacheConfigWeb.java:75)上出现[stderr](ServerService线程池-81) 10:44:10,354在com.mycompany.mycomponent.core.cache.config.web.CacheConfigWeb.getCacheConfig(CacheConfigWeb.java:63)上出现[stderr](ServerService线程池-81) 10:44:10,354在com.mycompany.mycomponent.core.cache.mycomponentCache.getCacheConfig(mycomponentCache.java:241)上出现[stderr](ServerService线程池-81) 10:44:10,355在com.mycompany.mycomponent.core.cache.mycomponentCache.setCacheType(mycomponentCache.java:292)上出现[stderr](ServerService线程池-81) 10:44:10,355错误[stderr](ServerService线程池-81)在com.mycompany.mycomponent.core.cache.mycomponentCache。(mycomponentCache.java:154) 10:44:10,355在com.mycompany.mycomponent.core.cache.mycomponentCache。(mycomponentCache.java:135)上出现[stderr](ServerService线程池-81) 10:44:10,355在com.mycompany.mycomponent.logging.config.web.LoggingConfigWeb。[LoggingConfigWeb.java:28)上出现[stderr](ServerService线程池-81) 10:44:10,355在com.mycompany.mycomponent.logging.Logging.getClassConfig(Logging.java:644)上出现[stderr](ServerService线程池-81) 10:44:10,355在com.mycompany.mycomponent.logging.Logging.out(Logging.java:360)上发生的[stderr]错误(ServerService线程池-81) 10:44:10,355在com.mycompany.mycomponent.logging.Logging.info(Logging.java:191)上的[stderr]错误(ServerService线程池-81) 10:44:10,355在com.mycompany.myapp.control.SASStartupServlet.preLoadClasses(SASStartupServlet.java:224)上出现[stderr](ServerService线程池-81) 10:44:10,355在com.mycompany.myapp.control.SASStartupServlet.executeStartupTasks(SASStartupServlet.java:85)上出现[stderr](ServerService线程池-81) 10:44:10,355在com.mycompany.mycomponent.control.StartupServlet.init(StartupServlet.java:72)上出现[stderr](ServerService线程池-81) 10:44:10,355 javax.servlet.GenericServlet.init(GenericServlet.java:244)上的[stderr]错误(ServerService线程池-81) 10:44:10,355在io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)上的[stderr]错误(ServerService线程池-81) 10:44:10,355错误(stderr)(ServerService线程池-81)在org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78) 10:44:10,355 io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)出现错误[stderr](ServerService线程池-81) 10:44:10,355在io.undertow.servlet.core.ManagedServlet $ DefaultInstanceStrategy.start(ManagedServlet.java:303)处出现[stderr](ServerService线程池-81)错误 10:44:10,355在io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:143)上发生的[stderr]错误(ServerService线程池-81) 10:44:10,355在io.undertow.servlet.core.DeploymentManagerImpl $ 2.call(DeploymentManagerImpl.java:583)上出现[stderr](ServerService线程池-81) 10:44:10,355在io.undertow.servlet.core.DeploymentManagerImpl $ 2.call(DeploymentManagerImpl.java:554)上的[stderr]错误(ServerService线程池-81) 10:44:10,355错误[stderr](ServerService线程池-81)在io.undertow.servlet.core.ServletRequestContextThreadSetupAction $ 1.call(ServletRequestContextThreadSetupAction.java:42) 10:44:10,355在io.undertow.servlet.core.ContextClassLoaderSetupAction $ 1.call(ContextClassLoaderSetupAction.java:43)处出现[stderr](ServerService线程池-81) 10:44:10,355错误[stderr](ServerService线程池-81)在org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda $ create $ 0(SecurityContextThreadSetupAction.java:105) 10:44:10,355错误[stderr](ServerService线程池-81)在org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService $ UndertowThreadSetupAction.lambda $ create $ 0(UndertowDeploymentInfoService.java:1502) 10:44:10,355错误[stderr](ServerService线程池-81)在org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService $ UndertowThreadSetupAction.lambda $ create $ 0(UndertowDeploymentInfoService.java:1502) 10:44:10,355错误[stderr](ServerService线程池-81)在org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService $ UndertowThreadSetupAction.lambda $ create $ 0(UndertowDeploymentInfoService.java:1502) 10:44:10,355错误[stderr](ServerService线程池-81)在org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService $ UndertowThreadSetupAction.lambda $ create $ 0(UndertowDeploymentInfoService.java:1502) 10:44:10,355在io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:596)上出现[stderr](ServerService线程池-81)错误 10:44:10,355错误[stderr](ServerService线程池-81)在org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:97) 10:44:10,355错误[stderr](ServerService线程池-81)在org.wildfly.extension.undertow.deployment.UndertowDeploymentService $ 1.run(UndertowDeploymentService.java:78) 10:44:10,356错误[stderr](ServerService线程池-81)在java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511) 10:44:10,356错误[stderr](ServerService线程池-81)在java.util.concurrent.FutureTask.run(FutureTask.java:266) 10:44:10,356在org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)上出现[stderr](ServerService线程池-81) 10:44:10,356在org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)上出现[stderr](ServerService线程池-81) 10:44:10,356错误[stderr](ServerService线程池-81)在org.jboss.threads.EnhancedQueueExecutor $ ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487) 10:44:10,356在org.jboss.threads.EnhancedQueueExecutor $ ThreadBody.run(EnhancedQueueExecutor.java:1378)上出现[stderr](ServerService线程池-81) 10:44:10,356在java.lang.Thread.run(Thread.java:748)出现[stderr](ServerService线程池-81) 10:44:10,356在org.jboss.threads.JBossThread.run(JBossThread.java:485)出现[stderr](ServerService线程池-81)