1 Reply Latest reply on May 17, 2006 4:13 AM by Peter Potthoff

    Serialization problems accessing a clientside UserTransactio

    Peter Potthoff Newbie

      Hello,

      I have installed JBossTS 4.2 into jboss-4.0.3SP1 using the instructions in the INSTALL file that comes with JBossTS. After booting the "all" configuration I tried to get a UserTransaction in my client application. ( external swing client )

      Properties p = new Properties();
      p.put("java.naming.factory.initial","org.jboss.naming.NamingContextFactory");
      p.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
      p.put("java.naming.provider.url","jnp://localhost:1099");
      Context ctx = new InitialContext(p);
      tx=(javax.transaction.UserTransaction)ctx.lookup("UserTransaction");
      tx.begin(); // fails
      


      The JNDI lookup was successful and returned an UserTransaction object but the start of the transaction failed due to a java.lang.reflect.UndeclaredThrowableException.
      Setting a breakpoint on org.jboss.tm.usertx.client.ClientUserTransaction (line 114) I found a serialization problem as reason for the exception:

      java.io.InvalidClassException: com.arjuna.ats.internal.jbossatx.jts.PropagationContextWrapper; local class incompatible: stream classdesc serialVersionUID = -1584914136708360615, local class serialVersionUID = -1405903515354532513

      I checked all JBossTS libraries in the server and the client application but I cannot find any different versions.

      Is this an error, a configuration problem or the wrong way to request a UserTransaction?

      Thanks,
      Peter


      The content of my iiop-service.xml
      ...
      <server>
      
       <!-- ==================================================================== -->
       <!-- IIOP+SSL domain setup -->
       <!-- ==================================================================== -->
      
       <!-- uncomment to use IIOP over SSL
       <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
       name="jboss.security:service=JaasSecurityDomain,domain=IIOP+SSL">
       <constructor>
       <arg type="java.lang.String" value="IIOP+SSL"/>
       </constructor>
       <attribute name="KeyStoreURL">iiop-over-ssl.keystore</attribute>
       <attribute name="KeyStorePass">iiop-over-ssl</attribute>
       </mbean>
       -->
      
       <!-- ==================================================================== -->
       <!-- CORBA ORB service -->
       <!-- The ORB is pluggable. This configuration uses JacORB. -->
       <!-- ==================================================================== -->
      
       <mbean code="org.jboss.iiop.CorbaORBService"
       name="jboss:service=CorbaORB">
       <attribute name="ORBClass">org.jacorb.orb.ORB</attribute>
       <attribute name="ORBSingletonClass">org.jboss.system.ORBSingleton</attribute>
       <attribute name="ORBSingletonDelegate">org.jacorb.orb.ORBSingleton</attribute>
       <attribute name="ORBPropertiesFileName">jacorb.properties</attribute>
       <!-- uncomment the attribute below to interoperate with IONA's ASP 6.0
       <attribute name="SendSASAcceptWithExceptionEnabled">false</attribute>
       -->
       <attribute name="PortableInterceptorInitializers">
       <interceptor-initializers>
       <!-- the two initializers below are required - do not remove them -->
       <initializer>org.jboss.iiop.codebase.CodebaseInterceptorInitializer</initializer>
       <initializer>org.jboss.iiop.csiv2.CSIv2Initializer</initializer>
       <!-- comment out to generate IORs with no transaction policy info -->
       <initializer>org.jboss.tm.iiop.TxIORInterceptorInitializer</initializer>
       <!-- JBoss TS interceptor -->
       <!--initializer>com.arjuna.ats.jts.orbspecific.jacorb.interceptors.context.ContextORBInitializerImpl</initializer-->
       <initializer>com.arjuna.ats.jts.orbspecific.jacorb.interceptors.interposition.InterpositionORBInitializerImpl</initializer>
       <!-- comment out to disable the Security Attribute Service -->
       <initializer>org.jboss.iiop.csiv2.SASInitializer</initializer>
       </interceptor-initializers>
       </attribute>
       <!-- uncomment to use IIOP over SSL
       <attribute name="SecurityDomain">java:/jaas/IIOP+SSL</attribute>
       <depends>jboss.security:service=JaasSecurityDomain,domain=IIOP+SSL</depends>
       -->
       </mbean>
      
       <!-- ==================================================================== -->
       <!-- IIOP invoker -->
       <!-- ==================================================================== -->
      
       <mbean code="org.jboss.invocation.iiop.IIOPInvoker"
       name="jboss:service=invoker,type=iiop">
       <depends>jboss:service=CorbaORB</depends>
       </mbean>
      
       <!-- ==================================================================== -->
       <!-- CORBA naming service -->
       <!-- ==================================================================== -->
      
       <mbean code="org.jboss.iiop.CorbaNamingService"
       name="jboss:service=CorbaNaming">
       <depends>jboss:service=CorbaORB</depends>
       </mbean>
      
       <!-- ==================================================================== -->
       <!-- CORBA transaction service -->
       <!-- ==================================================================== -->
      
       <!-- comment out to disable transaction demarcation over IIOP -->
       <mbean code="org.jboss.tm.iiop.CorbaTransactionService"
       name="jboss:service=CorbaTransaction">
       <depends>jboss:service=TransactionManager</depends>
       <depends>jboss:service=CorbaORB</depends>
       <depends>jboss:service=CorbaNaming</depends>
       </mbean>
      
      </server>