|Summary:||JAXB - cannot resolve class name conflicts, annotations are ignored|
|Product:||[Retired] JBoss BPMS Platform 6||Reporter:||Zuzana Krejčová <zkrejcov>|
|Component:||Business Central||Assignee:||Shelly McGowan <smcgowan>|
|Status:||VERIFIED ---||QA Contact:||Lukáš Petrovický <lpetrovi>|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Zuzana Krejčová 2014-07-31 08:28:23 UTC
Description of problem: If a project contains two classes with the same name (different packages), these classes must be properly annotated to avoid name conflict. In 6.0.2, these annotations are being ignored, it seems. Version-Release number of selected component (if applicable): BPMS 6.0.2 CR2/GA Steps to Reproduce: 1. Create a project with org.MyClass and org.kie.MyClass. 2. In editor of your choice add @XmlType(namespace="org") annotation to org.MyClass and @XmlType(namespace="org.kie") annotation to org.kie.MyClass. (Commit and push changes back to business-central.) 3. In the business-central, go to Project Editor and try to 'Build & Deploy'. Actual results: "Deployment of unit <unit> failed: Unable to instantiate JAXBContext for deployment '<unit>'." in Problems panel, ... Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions Two classes have the same XML type name "myClass". Use @XmlType.name and @XmlType.namespace to assign different names to them. this problem is related to the following location: at org.MyClass this problem is related to the following location: at org.kie.MyClass in server log. (More details in bug 1103650.) Expected results: Deployment is successful, no conflicts. Additional info: The issue seems fixed in 6.1 branch. With 6.1 DR1, following the Steps to Reproduce, the project is built and deployed just fine. In 6.0.2, even changing the name via @XmlType or adding @XmlRootElement with unique name didn't help.
Comment 3 Kris Verlaenen 2014-08-26 12:07:10 UTC
As described in the BZ, should already be working for 6.1 so setting to MODIFIED for verification.
Comment 4 Zuzana Krejčová 2014-09-23 11:16:09 UTC
Works with 6.1.0 DR3 BPMS.