4 Replies Latest reply on Jul 10, 2007 9:35 AM by Jonathan Halliday

    ClassCastException in XTS

    Martin Steinle Newbie

      Hello,

      I have a system with JBoss 4.0.3sp1 and JBossTS 4.2.3sp5. I ran this with web service transactions integrating some Microsoft WCF transaction aware web services. It was running quite good with JBossTS 4.2.2 in case I started the web service transaction in Java and WCF services were only participants.
      Now I reran my sample with JBossTS 4.2.3sp5 and got a strange exception.
      First, I saw that the WCF participant received a fault response to its registration request containing the message

      [com.arjuna.wsc.messaging.RegistrationCoordinatorProcessorImpl_3] - Invalid coordination context state

      Looking at the code, I saw that it was an exception, and adapted the JBossTS code a bit to call ex.printStackTrace() on the exception in the catch-block, and the same in line 208 of com.arjuna.mwlabs.wst.at.RegistrarImple. The stacktrace looks as follows
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] java.lang.ClassCastException: com.arjuna.mwlabs.wscf.model.twophase.arjunacore.SynchronizationRecord
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at java.util.TreeMap.compare(TreeMap.java:1093)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at java.util.TreeMap.put(TreeMap.java:465)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at java.util.TreeSet.add(TreeSet.java:210)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.addSynchronization(TwoPhaseCoordinator.java:146)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at com.arjuna.mwlabs.wscf.model.twophase.arjunacore.ACCoordinator.enlistSynchronization(ACCoordinator.java:213)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at com.arjuna.mwlabs.wscf.model.twophase.arjunacore.CoordinatorControl.enlistSynchronization(CoordinatorControl.java:389)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at com.arjuna.mwlabs.wscf.model.twophase.arjunacore.CoordinatorServiceImple.enlistSynchronization(CoordinatorServiceImple.java:487)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at com.arjuna.mwlabs.wst.at.RegistrarImple.register(RegistrarImple.java:200)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at com.arjuna.wsc.messaging.RegistrationCoordinatorProcessorImpl.register(RegistrationCoordinatorProcessorImpl.java:78)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at com.arjuna.webservices.wscoor.handlers.RegisterHandler$1.executeTask(RegisterHandler.java:64)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at com.arjuna.services.framework.task.TaskWorker.run(TaskWorker.java:65)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at java.lang.Thread.run(Thread.java:595)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] com.arjuna.wsc.InvalidStateException
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at com.arjuna.mwlabs.wst.at.RegistrarImple.register(RegistrarImple.java:209)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at com.arjuna.wsc.messaging.RegistrationCoordinatorProcessorImpl.register(RegistrationCoordinatorProcessorImpl.java:78)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at com.arjuna.webservices.wscoor.handlers.RegisterHandler$1.executeTask(RegisterHandler.java:64)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at com.arjuna.services.framework.task.TaskWorker.run(TaskWorker.java:65)
      2007-07-10 14:40:07,578 INFO (TaskWorker-1) [STDOUT] at java.lang.Thread.run(Thread.java:595)


      Can someone tell me where the exception comes from?
      Regards,
      Martin