Red Hat Bugzilla – Bug 1258880
Remove @XmlRootElement annotation on top of KieServerCommand
Last modified: 2016-09-20 01:07:46 EDT
Description of problem:
KieServerCommand is an interface annotated with @XmlRootElement
This has a negative effect in following scenario.
Assume a kjar which depends on Work Item Handler jar. This WIH Jar depends on actual Service JAR, which brings kie-server-client
Let's say that there is a WorkItem which does some operation in /kie-server, which should be valid use case.
This KJAR can't be deployed, because the engine will scan KJAR dependencies for all @XmlRootElement annotated classes, and it will instantiate JAXBContext with these.
However, JAXB Can't work with interfaces, hence the KJAR deployment will fail
"KieServerCommand is an interface, and JAXB can't handle interfaces".
Version-Release number of selected component (if applicable):
BPMS Suite / BRMS
Steps to Reproduce:
1. Try to deploy a KJAR which depends on kie-server-client artifact
2. The deployment will fail during the JAXBContext instantiation with the above error
KieServerCommand is annotated with @XmlRootElement and therefore, any KJAR depending on kie-server-client can't be deployed.
KJAR which depends on kie-server-client can be deployed
fixed on master and 6.3.x
Verified in 6.2.0ER4.