Access Remote EJB within another EJB

Asked

Viewed 73 times

0

Good afternoon to all.

I’m in a project I need to lookup a remote EJB inside another EJB in a different container.

inserir a descrição da imagem aqui

The problem is when I try to do the lookup Initialcontext is giving the following error.

11:12:15,377 ERROR [stderr] (http-localhost/127.0.0.1:8088-1) java.lang.RuntimeException: javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.RuntimeException: Failed to setup EJB remote context]

11:12:15,377 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at br.com.seta.portal.service.bonita.integration.JndiContext.getContext(JndiContext.java:37)

11:12:15,378 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at br.com.seta.portal.service.bonita.integration.BonitaIntegration.getIntegracaoBonitaConsultar(BonitaIntegration.java:38)

11:12:15,378 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at br.com.seta.portal.service.bonita.BonitaServiceImpl.consultarGrupos(BonitaServiceImpl.java:75)

11:12:15,378 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

11:12:15,378 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

11:12:15,378 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

11:12:15,378 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at java.lang.reflect.Method.invoke(Method.java:497)

11:12:15,378 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)

11:12:15,379 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,379 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

11:12:15,379 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)

11:12:15,379 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,379 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374)

11:12:15,379 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:86)

11:12:15,379 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:97)

11:12:15,380 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)

11:12:15,380 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,380 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

11:12:15,380 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)

11:12:15,380 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,380 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)

11:12:15,380 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,380 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)

11:12:15,381 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,381 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:73)

11:12:15,382 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,382 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)

11:12:15,382 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,383 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

11:12:15,383 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)

11:12:15,384 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,384 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)

11:12:15,385 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,385 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:280)

11:12:15,385 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:345)

11:12:15,385 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:243)

11:12:15,387 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,387 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

11:12:15,387 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,387 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43)

11:12:15,388 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,388 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)

11:12:15,388 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,388 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)

11:12:15,389 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,389 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

11:12:15,389 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,389 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)

11:12:15,389 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,389 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

11:12:15,389 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,389 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

11:12:15,389 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)

11:12:15,390 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)

11:12:15,390 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,390 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

11:12:15,390 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)

11:12:15,390 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at br.com.seta.portal.service.bonita.BonitaService$$$view37.consultarGrupos(Unknown Source)

11:12:15,390 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

11:12:15,390 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

11:12:15,390 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

11:12:15,390 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at java.lang.reflect.Method.invoke(Method.java:497)

11:12:15,390 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)

11:12:15,390 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)

11:12:15,390 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)

11:12:15,391 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)

11:12:15,391 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:115)

11:12:15,391 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)

11:12:15,391 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105)

11:12:15,391 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at br.com.seta.portal.service.bonita.BonitaService$-1057754167$Proxy$_$$_Weld$Proxy$.consultarGrupos(BonitaService$-1057754167$Proxy$_$$_Weld$Proxy$.java)

11:12:15,391 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at br.com.seta.portal.webservice.ConsultaPermissaoWSImpl_V2.validarUsuario(ConsultaPermissaoWSImpl_V2.java:39)

11:12:15,391 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

11:12:15,391 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

11:12:15,392 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

11:12:15,392 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at java.lang.reflect.Method.invoke(Method.java:497)

11:12:15,392 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)

11:12:15,393 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,393 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

11:12:15,394 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)

11:12:15,394 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,394 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

11:12:15,394 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)

11:12:15,394 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,394 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)

11:12:15,395 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,395 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

11:12:15,395 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)

11:12:15,395 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,395 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.webservices.deployers.WSComponentInstanceAssociationInterceptor.processInvocation(WSComponentInstanceAssociationInterceptor.java:49)

11:12:15,395 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

11:12:15,396 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

11:12:15,396 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)

11:12:15,397 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.webservices.invocation.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:129)

11:12:15,397 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.wsf.stack.cxf.JBossWSInvoker.performInvocation(JBossWSInvoker.java:177)

11:12:15,397 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:104)

11:12:15,397 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke(AbstractJAXWSMethodInvoker.java:237)

11:12:15,398 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:69)

11:12:15,398 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:146)

11:12:15,398 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)

11:12:15,398 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

11:12:15,398 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at java.util.concurrent.FutureTask.run(FutureTask.java:266)

11:12:15,398 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)

11:12:15,398 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:107)

11:12:15,399 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)

11:12:15,399 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

11:12:15,399 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:249)

11:12:15,399 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:97)

11:12:15,399 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:131)

11:12:15,399 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:88)

11:12:15,399 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)

11:12:15,399 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:206)

11:12:15,399 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)

11:12:15,399 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:136)

11:12:15,400 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140)

11:12:15,400 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

11:12:15,400 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)

11:12:15,400 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)

11:12:15,400 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:267)

11:12:15,400 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)

11:12:15,400 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)

11:12:15,400 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)

11:12:15,400 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)

11:12:15,400 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)

11:12:15,400 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)

11:12:15,400 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)

11:12:15,400 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)

11:12:15,401 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)

11:12:15,401 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150)

11:12:15,401 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)

11:12:15,401 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)

11:12:15,401 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)

11:12:15,401 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854)

11:12:15,401 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)

11:12:15,401 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926)

11:12:15,401 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at java.lang.Thread.run(Thread.java:745)

11:12:15,402 ERROR [stderr] (http-localhost/127.0.0.1:8088-1) Caused by: javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.RuntimeException: Failed to setup EJB remote context]

11:12:15,402 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:51)

11:12:15,402 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:151)

11:12:15,402 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.naming.InitialContext.getDefaultInitCtx(InitialContext.java:122)

11:12:15,402 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.naming.InitialContext.init(InitialContext.java:107)

11:12:15,402 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:154)

11:12:15,402 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.naming.InitialContext.<init>(InitialContext.java:98)

11:12:15,402 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.as.naming.InitialContextFactory.getInitialContext(InitialContextFactory.java:44)

11:12:15,402 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)

11:12:15,402 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)

11:12:15,402 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at javax.naming.InitialContext.init(InitialContext.java:244)

11:12:15,403 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at javax.naming.InitialContext.<init>(InitialContext.java:216)

11:12:15,403 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at br.com.seta.portal.service.bonita.integration.JndiContext.getContext(JndiContext.java:35)

11:12:15,403 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    ... 134 more

11:12:15,403 ERROR [stderr] (http-localhost/127.0.0.1:8088-1) Caused by: java.lang.RuntimeException: Failed to setup EJB remote context

11:12:15,403 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.naming.remote.client.InitialContextFactory.setupEjbContext(InitialContextFactory.java:468)

11:12:15,403 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:145)

11:12:15,403 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    ... 144 more

11:12:15,404 ERROR [stderr] (http-localhost/127.0.0.1:8088-1) Caused by: java.lang.reflect.InvocationTargetException

11:12:15,404 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

11:12:15,404 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

11:12:15,404 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

11:12:15,404 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at java.lang.reflect.Method.invoke(Method.java:497)

11:12:15,404 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.naming.remote.client.InitialContextFactory.setupEjbContext(InitialContextFactory.java:448)

11:12:15,404 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    ... 145 more

11:12:15,404 ERROR [stderr] (http-localhost/127.0.0.1:8088-1) Caused by: java.lang.SecurityException: EJBCLIENT000021: EJB client context selector may not be changed

11:12:15,404 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.ejb.client.EJBClientContext.setSelector(EJBClientContext.java:218)

11:12:15,405 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    at org.jboss.naming.remote.client.ejb.RemoteNamingEjbClientContextSelector.setupSelector(RemoteNamingEjbClientContextSelector.java:28)

11:12:15,405 ERROR [stderr] (http-localhost/127.0.0.1:8088-1)    ... 150 more

Only this error only happens when I try to create the lookup inside the EJB, if I do a test creating the lookup by a Static void main for example it works perfectly.

What am I doing wrong?

The code goes below.

I create the Jndicontext

public class JndiContext {

    private String  hostNameEjb; 
    private Integer portNameEjb;

    public JndiContext() {
            hostNameEjb  = "192.168.2.198";
            portNameEjb  = 4447;
     }


    public Context getContext( )  {
        try {
            Hashtable<String, Object> jndiProperties = new Hashtable();
            jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
            jndiProperties.put(Context.PROVIDER_URL,"remote://"+hostNameEjb+":"+portNameEjb);
            jndiProperties.put(Context.SECURITY_PRINCIPAL, "admin");
            jndiProperties.put(Context.SECURITY_CREDENTIALS, "admin123.");
            jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
            jndiProperties.put("jboss.naming.client.ejb.context",true);
            jndiProperties.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED",false);
            jndiProperties.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS",false);
            jndiProperties.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT",false);
//          jndiProperties.put("remote.cluster.ejb.clusternode.selector","org.jboss.ejb.client.RandomClusterNodeSelector");
//          jndiProperties.put("remote.clusters","ejb");
            jndiProperties.put("org.jboss.ejb.client.scoped.context",true);
            return new InitialContext(jndiProperties);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

Service

@Override
private IntegracaoBonitaCadastrar getIntegracaoBonitaCadastrar() { 
        IntegracaoBonitaCadastrar remote = null;
        try {
            Context ctx = new JndiContext().getContext();
            remote = (IntegracaoBonitaCadastrar) this.ctx.lookup(LOOCKUP_CADASTRO);
        } catch (NamingException e) {
            e.printStackTrace();
        }
        return remote;
    }

I am using Jboss EAP 6.3 in both Servers.

  • You could post only the relevant errors?

  • So this is the error log that appears when you give the error.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.