2 Replies Latest reply on Feb 15, 2007 6:39 AM by Javier Toyos

    Problem with java client - rmi over ssl

    Javier Toyos Newbie

      hello guys,

      i have configurated jboss with ssl and it works correctly.

      But i have a problem with a jmx sample when i try to connect via rmi + ssl.

      i create a mbean with this configuration in
      [JBOSS_HOME]\server\default\conf\jboss-service.xml

      <mbean code="org.jboss.invocation.jrmp.server.JRMPInvoker" name="jboss:service=invoker,type=jrmp,socketType=SSL">
       <attribute name="RMIObjectPort">4444</attribute>
       <attribute name="RMIClientSocketFactory">org.jboss.security.ssl.RMISSLClientSocketFactory</attribute>
       <attribute name="RMIServerSocketFactory">org.jboss.security.ssl.RMISSLServerSocketFactory</attribute>
       <attribute name="SecurityDomain">java:/jaas/RMI+SSL</attribute>
       <depends>jboss.security:service=JaasSecurityDomain,domain=RMI+SSL</depends>
       </mbean>
      


      the java client is:

      ...
      
      Hashtable props = new Hashtable();
      
      props.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
      props.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
      props.put("java.naming.provider.url","jnp://localhost:1099");
      
      MBeanServerConnection mbsc = (MBeanServerConnection) context.lookup("jmx/invoker/RMIAdaptor");
      
      ObjectName dynMBeanName = new ObjectName("com.sample.jboss.jmx.mbeans:service=FormatDateActually");
      
      ...
      


      when i start the server, this error appear:


      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss:service=invoker,type=jrmp
      State: NOTYETINSTALLED
      Depends On Me:
      jboss:service=proxyFactory,target=ClientUserTransactionFactory
      jboss:service=proxyFactory,target=ClientUserTransaction
      jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory
      jboss.jca:service=DataSourceBinding,name=DefaultDS

      ObjectName: jboss.security:service=JaasSecurityDomain,domain=RMI+SSL
      State: NOTYETINSTALLED
      Depends On Me:
      jboss:service=invoker,type=jrmp,socketType=SSL



      ...and when i run the java client :


      javax.naming.NameNotFoundException: invoker not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:267)


      could anybody help me?

      thanks a lot!!


        • 1. Re: Problem with java client - rmi over ssl
          Javier Toyos Newbie

          I forget it... the jboss version is 4.0.5...

          • 2. Re: Problem with java client - rmi over ssl
            Javier Toyos Newbie

            i fixed my problem...i hope that it helps you:

            1. edit jmx-invoker-service.xml
            2. uncomment the descriptors section of the invoke operation

             <operation>
             <description>The detached invoker entry point</description>
             <name>invoke</name>
             <parameter>
             <description>The method invocation context</description>
             <name>invocation</name>
             <type>org.jboss.invocation.Invocation</type>
             </parameter>
             <return-type>java.lang.Object</return-type>
             <!-- Uncomment to require authenticated users -->
             <descriptors>
             <interceptors>
             <interceptor code="org.jboss.jmx.connector.invoker.AuthenticationInterceptor"
             securityDomain="java:/jaas/jmx-console"/>
             </interceptors>
             </descriptors>
             </operation>
            


            Regards.