4 Replies Latest reply on Feb 27, 2002 11:42 AM by maouche

    no security manage ?

    maouche Newbie

      Hello,

      I need Help.

      I am trying to execute an RMI client programm which uses UserTransaction. in jboss.jcml I have configured Tyrex transaction manager. (JBOSS2.4.4 with Tomcat 4.0.1 )


      ut = (UserTransaction) ctx.lookup("UserTransaction"); //OK

      ut.begin() // fail here with the following message error


      javax.transaction.SystemException: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
      [java] java.lang.ClassNotFoundException: org.jboss.tm.plugins.tyrex.TyrexTxPropagationContext (no security manager: RMI class loader disabled)
      [java] at org.jboss.tm.usertx.client.ClientUserTransaction.begin(ClientUserTransaction.java:106)
      [java] at test.MyClient1.main(MyClient1.java:94)


      Thanks

        • 1. Re: no security manage ?
          Adrian Brock Master

          Have you tried configuring a SecurityManager
          on the client?

          This will allow any server classes to be downloaded
          dynamically to the client.

          Regards,
          Adrian

          • 2. Re: no security manage ?
            maouche Newbie

            How can You do it ?
            I have just included in my classpath all the jar files in $JBOSS_DIST/client

            • 3. Re: no security manage ?
              Adrian Brock Master

              The tyrex plugins aren't in jboss-client.jar :-(

              Have a look at java.rmi.RMISecurityManager
              or sections 5.5 in the RMI Specification.

              Alternatively, extract the tyrex plugin class(es)
              from jboss/lib/ext/jboss.jar into a new jar in jboss/client.

              Regards,
              Adrian

              • 4. Re: no security manage ?
                maouche Newbie

                I works better, But I have an exception when I commit the
                transaction. This means that there are no transaction propagation. I will study more about java.rmi.RMISecurityManager in order to look for an other solution.

                Thanks

                java.lang.IllegalStateException: No transaction.
                [java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
                [java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
                [java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
                [java] at org.jboss.tm.usertx.server.UserTransactionSessionImpl_Stub.commit(Unknown Source)
                [java] at org.jboss.tm.usertx.client.ClientUserTransaction.commit(ClientUserTransaction.java:123)
                [java] test.MyClient1.main(MyClient1.java:116)