{"id":1917,"date":"2022-08-30T15:20:31","date_gmt":"2022-08-30T15:20:31","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/12\/02\/ejb-invocations-from-a-remote-client-using-jndi-invalid-user-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:20:31","modified_gmt":"2022-08-30T15:20:31","slug":"ejb-invocations-from-a-remote-client-using-jndi-invalid-user-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/ejb-invocations-from-a-remote-client-using-jndi-invalid-user-collection-of-common-programming-errors\/","title":{"rendered":"EJB invocations from a remote client using JNDI: Invalid User-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m trying to invocations from a remote client using JNDI in JBOSS 7.1.1, but I get the exception:<\/p>\n<blockquote>\n<p>Exception in thread &#8220;main&#8221; javax.ejb.EJBAccessException: JBAS013323: Invalid User at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:54) at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:45) at java.security.AccessController.doPrivileged(Native Method) at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:74) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:43) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:302) at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$200(MethodInvocationMessageHandler.java:64) at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:196) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) at org.jboss.threads.JBossThread.run(JBossThread.java:122) at &#8230;asynchronous invocation&#8230;(Unknown Source) at org.jboss.ejb.client.remoting.InvocationExceptionResponseHandler$MethodInvocationExceptionResultProducer.getResult(InvocationExceptionResponseHandler.java:99) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:270) at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:47) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:272) at org.jboss.ejb.client.ReceiverInterceptor.handleInvocationResult(ReceiverInterceptor.java:132) at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:260) at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:399) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:140) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121) at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104) at $Proxy0.informarDados(Unknown Source) at br.com.ciss.client.service.informacao.InformacaoServiceImpl.informarDados(InformacaoServiceImpl.java:224) at br.com.ciss.client.agente.EnviaInformacaoMaquina.enviarInformacao(EnviaInformacaoMaquina.java:29) at br.com.ciss.client.agente.EnviaInformacaoMaquina.main(EnviaInformacaoMaquina.java:49) 1325 [Thread-1] DEBUG org.jboss.ejb.client.remoting.AutoConnectionCloser &#8211; Closing Remoting connection 1329 [Remoting &#8220;config-based-ejb-client-endpoint&#8221; task-2] INFO org.jboss.ejb.client.remoting.ChannelAssociation &#8211; Channel Channel ID ec18d75d (outbound) of Remoting connection 007bc899 to localhost\/127.0.0.1:4447 can no longer process messages 1426 [Thread-1] DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver &#8211; Closing channelChannel ID ec18d75d (outbound) of Remoting connection 007bc899 to localhost\/127.0.0.1:4447 1427 [Thread-1] DEBUG org.jboss.ejb.client.remoting.ChannelAssociation &#8211; Closing channel Channel ID ec18d75d (outbound) of Remoting connection 007bc899 to localhost\/127.0.0.1:4447 1428 [Thread-1] DEBUG org.jboss.ejb.client.remoting.ChannelAssociation &#8211; Registering a re-connect handler org.jboss.ejb.client.remoting.EJBClientContextConnectionReconnectHandler@a2220f for broken channel Channel ID ec18d75d (outbound) of Remoting connection 007bc899 to localhost\/127.0.0.1:4447 in EJB client context org.jboss.ejb.client.EJBClientContext@c8376b 1433 [Thread-1] DEBUG org.jboss.ejb.client.remoting.AutoConnectionCloser &#8211; Closing endpoint &#8220;config-based-ejb-client-endpoint&#8221;<\/p>\n<\/blockquote>\n<p>I&#8217;m using the security mechanisms of jboss, and I have added the user through the add-user.bat also have the file jboss-ejb-client.properties with username and password and still get the exception. I followed the example set of the link:EJB invocations from a remote client using JNDI, the same works when I&#8217;m not using the security mechanisms, but when I use the security mechanisms the error occurs<\/p>\n<p>What you&#8217;re missing?<\/p>\n<p id=\"rop\"><small>Originally posted 2013-12-02 21:18:05. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying to invocations from a remote client using JNDI in JBOSS 7.1.1, but I get the exception: Exception in thread &#8220;main&#8221; javax.ejb.EJBAccessException: JBAS013323: Invalid User at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:54) at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:45) at java.security.AccessController.doPrivileged(Native Method) at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:74) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:43) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1917","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1917"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1917\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}