2

We are migrating an application from JBoss EAP 6 to EAP 7. It is an ear-file containing various war and jar-files. We have multiple servlets that get started when the server starts. The servlets are configured in web.xml with the attribute load-on-startup > 0. This works fine in EAP 6 but is causing a NoSuchEJBException when we deploy the ear-file to EAP 7. I assume that the EJB is available when the servlet's init()-method is processed since the corresponding JNDI-binding is already logged to the console. When I call the servlet manually everything works fine and the lookup succeeds.

Any idea what could go wrong here? And how to fix this?

The JNDI-binding is created

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

The servlets starts and the lookup fails

WildFly Naming version 1.0.9.Final-redhat-1

JBoss EJB Client version 4.0.12.Final-redhat-00001

javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "myapp/core-ejb/CacheConfigManager", view is interface com.mycompany.mycomponent.core.cache.config.manager.CacheConfigManager, affinity is None

Stacktrace

10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:592) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocationResult(TransactionPostDiscoveryInterceptor.java:133) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:115) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocationResult(NamingEJBClientInterceptor.java:79) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:172) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:594) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:528) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:938) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:177) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:112) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at com.sun.proxy.$Proxy116.getCacheConfigs(Unknown Source) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at com.mycompany.mycomponent.core.cache.config.web.CacheConfigWeb.getCacheConfigs(CacheConfigWeb.java:75) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at com.mycompany.mycomponent.core.cache.config.web.CacheConfigWeb.getCacheConfig(CacheConfigWeb.java:63) 10:44:10,354 ERROR [stderr] (ServerService Thread Pool -- 81) at com.mycompany.mycomponent.core.cache.mycomponentCache.getCacheConfig(mycomponentCache.java:241) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at com.mycompany.mycomponent.core.cache.mycomponentCache.setCacheType(mycomponentCache.java:292) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at com.mycompany.mycomponent.core.cache.mycomponentCache.(mycomponentCache.java:154) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at com.mycompany.mycomponent.core.cache.mycomponentCache.(mycomponentCache.java:135) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at com.mycompany.mycomponent.logging.config.web.LoggingConfigWeb.(LoggingConfigWeb.java:28) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at com.mycompany.mycomponent.logging.Logging.getClassConfig(Logging.java:644) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at com.mycompany.mycomponent.logging.Logging.out(Logging.java:360) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at com.mycompany.mycomponent.logging.Logging.info(Logging.java:191) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at com.mycompany.myapp.control.SASStartupServlet.preLoadClasses(SASStartupServlet.java:224) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at com.mycompany.myapp.control.SASStartupServlet.executeStartupTasks(SASStartupServlet.java:85) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at com.mycompany.mycomponent.control.StartupServlet.init(StartupServlet.java:72) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at javax.servlet.GenericServlet.init(GenericServlet.java:244) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:303) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:143) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:583) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:554) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:596) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:97) 10:44:10,355 ERROR [stderr] (ServerService Thread Pool -- 81) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78) 10:44:10,356 ERROR [stderr] (ServerService Thread Pool -- 81) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 10:44:10,356 ERROR [stderr] (ServerService Thread Pool -- 81) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 10:44:10,356 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) 10:44:10,356 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985) 10:44:10,356 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487) 10:44:10,356 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378) 10:44:10,356 ERROR [stderr] (ServerService Thread Pool -- 81) at java.lang.Thread.run(Thread.java:748) 10:44:10,356 ERROR [stderr] (ServerService Thread Pool -- 81) at org.jboss.threads.JBossThread.run(JBossThread.java:485)

StSch
  • 377
  • 1
  • 4
  • 12

0 Answers0