A kjar dependency which contains interface java classes fails to build with "JAXB can't handle interfaces." in BPM Suite 6.1
Environment
- Red Hat JBoss BPM Suite (BPMS) 6.1.0
Issue
- A kjar dependency which contains interface java classes fails to build with "JAXB can't handle interfaces.";
- After trying to
Build&Deploya kjar that contains a Interface class, it fails with the following Exception:
16:40:36,515 ERROR [org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl] (http-localhost.localdomain/127.0.0.1:8080-2) Deployment of unit org.kie.example:redhat1:1.0.0-SNAPSHOT failed: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to instantiate JAXBContext for deployment 'org.kie.example:redhat1:1.0.0-SNAPSHOT'.: org.jbpm.console.ng.bd.exception.DeploymentException: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to instantiate JAXBContext for deployment 'org.kie.example:redhat1:1.0.0-SNAPSHOT'.
...
Resolution
The condition to reproduce is that a project has a dependency to a kjar which contains Interfaces. So there could be two workarounds:
- Remove
kmodule.xmlfrom the kjar that contains the Interfaces. - Split Interfaces to a dependent jar.
Root Cause
The issue has been reported in the BZ1231111. There you can find the steps to reproduce the issue.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
