Details

    • Type: Bug
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: OpenMRS 1.9.0, Platform 1.10.0
    • Fix Version/s: OpenMRS 1.9.0
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Low

      Description

      For some reason on my machine the build fails with:

      -------------------------------------------------------------------------------
      Test set: org.openmrs.serialization.SimpleXStreamSerializerTest
      -------------------------------------------------------------------------------
      Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.116 sec <<< FAILURE!
      deserialize_shouldDeserializeStringToClassInstance(org.openmrs.serialization.SimpleXStreamSerializerTest)  Time elapsed: 0.012 sec  <<< ERROR!
      org.openmrs.serialization.SerializationException: Unable to deserialize class: org.openmrs.serialization.Foo
      	at org.openmrs.serialization.SimpleXStreamSerializer.deserialize(SimpleXStreamSerializer.java:104)
      	at org.openmrs.serialization.SimpleXStreamSerializerTest.deserialize_shouldDeserializeStringToClassInstance(SimpleXStreamSerializerTest.java:81)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
      	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115)
      	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102)
      	at org.apache.maven.surefire.Surefire.run(Surefire.java:180)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
      	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
      Caused by: com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.openmrs.serialization.Foo as it does not have a no-args constructor : Cannot construct org.openmrs.serialization.Foo as it does not have a no-args constructor
      ---- Debugging information ----
      message             : Cannot construct org.openmrs.serialization.Foo as it does not have a no-args constructor
      cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
      cause-message       : Cannot construct org.openmrs.serialization.Foo as it does not have a no-args constructor
      class               : org.openmrs.serialization.Foo
      required-type       : org.openmrs.serialization.Foo
      path                : /org.openmrs.serialization.Foo
      -------------------------------
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
      	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
      	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
      	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
      	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
      	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:853)
      	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:845)
      	at org.openmrs.serialization.SimpleXStreamSerializer.deserialize(SimpleXStreamSerializer.java:101)
      	... 27 more
      Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Cannot construct org.openmrs.serialization.Foo as it does not have a no-args constructor
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.newInstance(PureJavaReflectionProvider.java:71)
      	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:308)
      	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:161)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
      	... 37 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                raff Rafal Korytkowski
                Reporter:
                raff Rafal Korytkowski
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 hour
                  1h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 20 minutes Time Not Required
                  20m