Description of problem: I have following REST server: <cxf:rsServer id="rsJaxbServer" address="http://localhost:58003/restjaxb" serviceClass="org.kie.jax.rs.CommandExecutorImpl"> <cxf:providers> <bean class="org.kie.jax.rs.CommandMessageBodyReader" /> </cxf:providers> </cxf:rsServer> for that I've created this camel route: <route id="restJaxbGW"> <from uri="cxfrs://bean://rsJaxbServer"/> <policy ref="kiePolicy"> <unmarshal ref="jaxb" /> // here is the problem <to uri="kie:ksession1"/> <marshal ref="jaxb" /> </policy> </route> The source code of KiePolicy counts on the jaxb. https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-camel/src/main/java/org/kie/camel/component/KiePolicy.java#L154 When I run any request, I receive: javax.xml.bind.JAXBException: Provider com.sun.xml.bind.v2.ContextFactory could not be instantiated: javax.xml.bind.JAXBException: "null" doesnt contain ObjectFactory.class or jaxb.index this is obvious because I should define something like: <dataFormats> <jaxb id="jaxbCommands" prettyPrint="true" contextPath="org.drools.core.command"/> </dataFormats> but in the package "org.drools.core.command" there must be the jaxb.index or ObjectFactory as I understand. There should be the same classes as defined here https://github.com/droolsjbpm/droolsjbpm-integration/blob/6.0.x/kie-remote/kie-services-client/src/main/java/org/kie/services/client/serialization/jaxb/impl/JaxbCommandsRequest.java It might be possible to have the classes just in the jaxb.index.
Actually it should be enough to have just the supported commands for Spring Camel integration in the jaxb.index somewhere.
This problem has been fixed. However, I'm not completely sure that all JAXB problems with spring/camel integration have been fixed. Ivo, please keep up the good work and feel free to file more bugs dealing with these tests if the test still doesn't (completely) succeed after this fix. Running the tests locally, they all succeed except for zLastTestGlobalVariable(), but that seems to be caused by something else. 6.0.x: https://github.com/droolsjbpm/droolsjbpm-integration/commit/5fde4655ea87081d001faf1795bb779e0d2d9d75 master: https://github.com/droolsjbpm/droolsjbpm-integration/commit/9c6ed726c38ffc9c45915f3d2f33000d26fae45b
Perfect, I'll look at it when we have a new build. The zLastTestGlobalVariable() test works with xstream, so it's interesting that it fails. I'd say it's because I send there more then one commands in one request but this is not the only test where I send more then one commands in one request, so it must be something different.
Verified in BPMS 6.0.0.ER7 The tests which did not work in JAXB were caused by own types. For this problem I filed BZ 1049979