1

We are getting this exception only with componentTests (service tests).

> com.thoughtworks.xstream.converters.ConversionException: Cannot create
> org.joda.time.chrono.ISOChronology$Stub by JDK serialization : null :
> Cannot create org.joda.time.chrono.ISOChronology$Stub by JDK
> serialization : null
> ---- Debugging information ---- message             : Cannot create org.joda.time.chrono.ISOChronology$Stub by JDK serialization : null
> cause-exception     :
> com.thoughtworks.xstream.converters.reflection.ObjectAccessException
> cause-message       : Cannot create
> org.joda.time.chrono.ISOChronology$Stub by JDK serialization : null
> class               :
> com.orbitz.tbs.model.txn.reservation.ReservationInfo
> required-type       : org.joda.time.chrono.ISOChronology$Stub
> path                :
> /com.orbitz.tbs.model.txn.reservation.ReservationInfo/reservationsByLocator/entry/com.orbitz.tbs.model.txn.BookReservation/reservationDate/iChronology

When we actually run the code, we don't get any errors. Can anyone tell me what library versions should we use?

We updated to JDK 8 from 6 and that is when we started getting this error.

mttdbrd
  • 1,791
  • 12
  • 17
user2868864
  • 165
  • 2
  • 12
  • 1
    This looks like a classpath issue. You don't need to use Joda Time with JDK 8. It's actually deprecated. Use the new java.time package. https://docs.oracle.com/javase/8/docs/api/java/time/package-summary.html – mttdbrd Sep 20 '16 at 20:48
  • We get this error only with service tests not with actual code when we run it. is there a relation between service test and this joda time? – user2868864 Sep 20 '16 at 21:22
  • That should confirm that it's a classpath issue. It's missing the Joda Time packages. – mttdbrd Sep 20 '16 at 21:24
  • Would you know which xstream package version is compatible with 1.8 jdk? Is it any version or does it require any specific version for 1.8? – user2868864 Sep 21 '16 at 20:27
  • It has supported Java 8 since at least version 1.4.5 in 2013. http://x-stream.github.io/news.html – mttdbrd Sep 21 '16 at 21:09
  • Thanks. I tried changing the compile paths in my build.gradle to higher versions but in captureRuntime - runtime classpath for source set - it still shows me the older versions. For example, I updated one of our libraries from 3.37 to 5.3 but it still shows it as 3.29 -> 3.37 on ./gradlew dependencies. dependencies { compile(group: 'com.xxx.mock', name: 'service-test-lib', version: '3.29') was changed to dependencies { compile(group: 'com.orbitz.mock', name: 'service-test-lib', version: '5.3') – user2868864 Sep 22 '16 at 19:35
  • You probably have some other dependency specification for test. I don't mind helping here, but you need to produce a complete minimal sample that produces the error: http://stackoverflow.com/help/mcve. You're giving me very little information to go on and the questions you're asking me are very specific to your environment. – mttdbrd Sep 22 '16 at 19:41
  • Thanks for the inputs. We had to change some xstream JARS to make this work. It worked at last. – user2868864 Oct 18 '16 at 20:32
  • You should post an answer with the solution. – mttdbrd Oct 18 '16 at 20:33

0 Answers0