简体   繁体   English

使用JNDI从远程客户端调用EJB:无效的用户

[英]EJB invocations from a remote client using JNDI: Invalid User

I'm trying to invocations from a remote client using JNDI in JBOSS 7.1.1, but I get the exception: 我正在尝试使用JBOSS 7.1.1中的JNDI从远程客户端调用,但出现异常:

Exception in thread "main" 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.processInvocati 线程“主”中的异常javax.ejb.EJBAccessException:JBAS013323:org.jboss.as.ejb3.security.SecurityContextInterceptor上的org.jboss.as.ejb3.security.SecurityContextInterceptor $ 1.run(SecurityContextInterceptor.java:54)处的无效用户位于org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:74)的java.security.AccessController.doPrivileged(本机方法)的$ 1.run(SecurityContextInterceptor.java:45)。 org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)的org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)的InterceptorContext.proceed(InterceptorContext.java:288)在org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)处在org.jboss.as.ee.component.proceed(InterceptorContext.java:288)在org.jboss.as.ejb3.component.interceptors .AdditionalSetupInterceptor.processInvocati on(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.co 在org.jboss.org上的org.jboss.as.ee.component.TCCLInterceptorContext.proceed(InterceptorContext.java:288)上的(AdditionalSetupInterceptor.java:43)在org.jbosss上的org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)上org.jboss.as.ee.component.ViewService $ View.invoke(ViewService.java)上的org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)处的.invocation.InterceptorContext.proceed(InterceptorContext.java:288) :165),位于org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access $ 200(MethodInvocationMessageHandler.org)上,位于org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:302)处。的org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler $ 1.run(MethodInvocationMessageHandler.java:196)处java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:441)处的java:64) java.util.co上的java.util.concurrent.FutureTask $ Sync.innerRun(FutureTask.java:303) ncurrent.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 ...asynchronous invocation...(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(EJBClientInvocatio ncurrent.FutureTask.run(FutureTask.java:138)在java.util.concurrent.ThreadPoolExecutor $ Worker.runTask(ThreadPoolExecutor.java:886)在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:908)在org.jboss处的java.lang.Thread.run(Thread.java:662)在org.jboss.threads.JBossThread.run(JBossThread.java:122)在...异步调用...(未知源)在org.jboss。 org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:270)上的org.jboss.ejb.client.remoting.InvocationExceptionResponseHandler $ MethodInvocationExceptionResultProducer.getResult(InvocationExceptionResponseHandler.java:99)在org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:272)在org.jboss.ejb.client.ReceiverInterceptor.handleInvocationResult(ReceiverInterceptor.java:132)处的TransactionInterceptor.java:47) .client.EJBClientInvocationContext.getResult(EJBClientInvocatio nContext.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 - Closing Remoting connection <1bde4> 1329 [Remoting "config-based-ejb-client-endpoint" task-2] INFO org.jboss.ejb.client.remoting.ChannelAssociation - Channel Channel ID ec18d75d (outbound) of Remoting connection org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:399)处的Context.java:260)org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:140)处的org.jboss.ejb org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)上的.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)在br.com.ciss.client上的$ Proxy0.informarDados(Unknown Source)处。 service.informacao.InformacaoServiceImpl.informarDados(InformacaoServiceImpl.java:224)位于br.com.ciss.client.agente.EnviaInformacaoMaquina.enviarInformacao(EnviaInformacaoMaquina.java:29)位于br.com.ciss.client.agente(Envia) EnviaInformacaoMaquina.java:49)1325 [Thread-1] DEBUG org.jboss.ejb.client.remoting.AutoConnectionCloser-关闭远程连接<1bde4> 1329 [正在远程处理“基于配置的ejb客户端端点”任务2]信息org.jboss.ejb.client.remoting.ChannelAssociation-远程连接的通道通道ID ec18d75d(出站) 007bc899 to localhost/127.0.0.1:4447 can no longer process messages 1426 [Thread-1] DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver - 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 - 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 - 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 - Closing endpoint "config-based-ejb-client-endpoint" <1ecfe07> 007bc899到localhost / 127.0.0.1:4447不再能够处理消息1426 [Thread-1] DEBUG org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver-关闭将007bc899远程连接到localhost / 127.0.0.1的channelChannel ID ec18d75d(出站) :4447 1427 [Thread-1] DEBUG org.jboss.ejb.client.remoting.ChannelAssociation-关闭将007bc899远程连接到localhost / 127.0.0.1的通道通道ID ec18d75d(出站)与localhost / 127.0.0.1:4447 1428 [Thread-1] DEBUG org。 jboss.ejb.client.remoting.ChannelAssociation-注册重新连接处理程序org.jboss.ejb.client.remoting.EJBClientContextConnectionReconnectHandler@a2220f,以将远程连接007bc899连接到localhost / 127.0.0.1:4447的通道ID ec18d75d(出站)断开在EJB客户端上下文中org.jboss.ejb.client.EJBClientContext@c8376b 1433 [Thread-1] DEBUG org.jboss.ejb.client.remoting.AutoConnectionCloser-关闭端点“ config-based-ejb-client-endpoint” <1ecfe07>

I'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. 我正在使用jboss的安全性机制,并且我已经通过add-user.bat添加了该用户,并且还具有用户名和密码jboss-ejb-client.properties文件,但仍然出现异常。 I followed the example set of the link: EJB invocations from a remote client using JNDI , the same works when I'm not using the security mechanisms, but when I use the security mechanisms the error occurs 我遵循了该链接的示例集: 使用JNDI从远程客户端进行EJB调用 ,当我不使用安全机制时,同样的方法起作用,但是当我使用安全机制时,发生错误

What you're missing? 你缺少什么?

I think something like this will help you. 我认为像这样将帮助你。 Use this before you do the lookup so that you are logged in to the jboss 在执行查找之前,请使用此命令,以便您登录到jboss

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM