0 Replies Latest reply on Dec 11, 2009 11:03 AM by blep

    Naming Service security

    blep Newbie

      Hi,

      I have to set a secure remote access to the naming service up, so I followed the procedure found in the Wiki ( http://www.jboss.org/community/wiki/XMBeansforSecurity ).

      I try to get a remote service (EJB3) and the problem I'm facing is the lookup fails with security access even if the credencial is verified.

      The remote access is a standard client:

      Context ctx = new InitialContext(props);
      MyEjb ejb = ctx.lookup("MyEjb/remote");
      



      Server side, the exception is :

      16:56:50,796 ERROR [STDERR] javax.management.RuntimeMBeanException
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:176)
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      16:56:50,796 ERROR [STDERR] at org.jboss.test.jmx.interceptors.JNDISecurity.invoke(JNDISecurity.java:129)
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      16:56:50,796 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
      16:56:50,796 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
      16:56:50,796 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      16:56:50,796 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      16:56:50,796 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:818)
      16:56:50,796 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:419)
      16:56:50,796 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
      16:56:50,796 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      16:56:50,796 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
      16:56:50,796 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
      16:56:50,796 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:159)
      16:56:50,796 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
      16:56:50,796 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
      16:56:50,796 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
      16:56:50,796 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
      16:56:50,796 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
      16:56:50,796 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      16:56:50,796 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      16:56:50,796 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
      16:56:50,796 ERROR [STDERR] Caused by: java.lang.NullPointerException
      16:56:50,796 ERROR [STDERR] at org.jnp.server.Main.getNamingInstance(Main.java:301)
      16:56:50,796 ERROR [STDERR] at org.jboss.naming.NamingService.invoke(NamingService.java:354)
      16:56:50,796 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      16:56:50,796 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      16:56:50,796 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      16:56:50,796 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
      16:56:50,796 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      16:56:50,796 ERROR [STDERR] ... 32 more
      


      Can you tell me what's wrong?