Tag: xstream jettison

Spring Batch,JdbcExecutionContextDao java.util.Map $ Entry deserializer issue,xstream 1.4.1

我使用Spring Batch 2.1.9时遇到问题:当我使用jobExplorer.getJobExecution(jobExecutionId)时 ,我发现DAO必须反序列化字符串时出现问题: {“map”:[{“entry”:{“string”:”parsedComparingDate”,”date”:”2014-03-08 23:00:00.0 UTC”}}]} 从BATCH_JOB_EXECUTION_CONTEXT表中,使用方法JdbcJobExecutionDao.getJobExecution() 。 我知道春季批次使用xstream 1.3,但在我的Pom中,我有: 春季批次2.1.9 ; xstream 1.4.1 (inheritance自smooks); jettison 1.3.3 (inheritance自cxf); 此外,我读到xstream 1.3不能正常使用jettison 1.3.3,但使用xstream 1.3(不包括pom的xstream 1.4.1)工作正常,而使用xstream 1.4.1或major,我发现以下exception: Caused by: java.lang.InstantiationError: java.util.Map$Entry at sun.reflect.GeneratedSerializationConstructorAccessor1.newInstance(Unknown Source) [:1.6.0_23] at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_23] at com.thoughtworks.xstream.converters.reflection.Sun14ReflectionProvider.newInstance(Sun14ReflectionProvider.java:75) [xstream-1.4.1.jar:] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:424) [xstream-1.4.1.jar:] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:229) [xstream-1.4.1.jar:] at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) [xstream-1.4.1.jar:] at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65) [xstream-1.4.1.jar:] at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) [xstream-1.4.1.jar:] at […]