-
Bug
-
Resolution: Duplicate
-
Major
-
7.3.0
-
None
-
Fuse 6.2.1 / JBDSIS 8.0.4
While doing some testing for FUSETOOLS-1353, I discovered that our JSON to XML mapping may be broken in the camel-dozer component. I changed our XML-to-JSON example to be a JSON-to-XML example and ran into this NPE when I tried matching up lineItems and orderItems in the Dozer configuraiton.
Stacktrace --------------------------------------------------------------------------------------------------------------------------------------- java.lang.NullPointerException at org.dozer.util.ReflectionUtils.invoke(ReflectionUtils.java:329) at org.dozer.propertydescriptor.GetterSetterPropertyDescriptor.writeDeepDestinationValue(GetterSetterPropertyDescriptor.java:268) at org.dozer.propertydescriptor.GetterSetterPropertyDescriptor.setPropertyValue(GetterSetterPropertyDescriptor.java:96) at org.dozer.fieldmap.FieldMap.writeDestValue(FieldMap.java:96) at org.dozer.MappingProcessor.writeDestinationValue(MappingProcessor.java:939) at org.dozer.MappingProcessor.mapFromFieldMap(MappingProcessor.java:368) at org.dozer.MappingProcessor.mapField(MappingProcessor.java:307) at org.dozer.MappingProcessor.map(MappingProcessor.java:267) at org.dozer.MappingProcessor.mapToDestObject(MappingProcessor.java:216) at org.dozer.MappingProcessor.createByCreationDirectiveAndMap(MappingProcessor.java:196) at org.dozer.MappingProcessor.mapGeneral(MappingProcessor.java:170) at org.dozer.MappingProcessor.map(MappingProcessor.java:104) at org.dozer.MappingProcessor.map(MappingProcessor.java:99) at org.dozer.DozerBeanMapper.map(DozerBeanMapper.java:120) at org.apache.camel.component.dozer.DozerProducer.process(DozerProducer.java:79) at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:129) at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77) at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) at org.apache.camel.processor.Pipeline.process(Pipeline.java:118) at org.apache.camel.processor.Pipeline.process(Pipeline.java:80) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109) at org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:68) at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:375) at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:343) at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:233) at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:343) at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:184) at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:124) at org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeader(DefaultProducerTemplate.java:163) at org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeader(DefaultProducerTemplate.java:371) at org.example.TransformationTest2.transform(TransformationTest2.java:40) 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:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
I will attach an example that reproduces the problem
- duplicates
-
FUSETOOLS-1395 Issues mapping transformation from JSON to XML
- Closed