Bug 1258945 - [GSS] (6.1.z) Remove @XmlRootElement annotation on top of KieServerCommand
[GSS] (6.1.z) Remove @XmlRootElement annotation on top of KieServerCommand
Status: VERIFIED
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Kie-Server (Show other bugs)
6.1.0
Unspecified Unspecified
medium Severity unspecified
: CR1
: ---
Assigned To: Maciej Swiderski
Karel Suta
:
Depends On: 1258880
Blocks: 1259378 1259382
  Show dependency treegraph
 
Reported: 2015-09-01 10:45 EDT by Anton Giertli
Modified: 2016-09-20 01:07 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1258880
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Anton Giertli 2015-09-01 10:45:30 EDT
+++ This bug was initially created as a clone of Bug #1258880 +++

Description of problem:

KieServerCommand is an interface annotated with @XmlRootElement
https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-server-parent/kie-server-api/src/main/java/org/kie/server/api/model/KieServerCommand.java

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 
https://github.com/droolsjbpm/droolsjbpm-integration/tree/master/kie-server-parent/kie-server-remote/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

with
"KieServerCommand is an interface, and JAXB can't handle interfaces".

Version-Release number of selected component (if applicable):
BPMS Suite / BRMS
6.1.2

How reproducible:
always

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


Actual results:
KieServerCommand is annotated with @XmlRootElement and therefore, any KJAR depending on kie-server-client can't be deployed.

Expected results:
KJAR which depends on kie-server-client can be deployed

Additional info:

--- Additional comment from Anton Giertli on 2015-09-01 08:57:36 EDT ---

Engineering is already aware
https://github.com/droolsjbpm/droolsjbpm-integration/commit/49e1a61bf58185149d9879447180e9c5c2790111#diff-a7214db32826acd614eb5b758888d6dbR7

--- Additional comment from JBoss Product and Program Management on 2015-09-01 09:00:17 EDT ---

Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.
Comment 3 Maciej Swiderski 2015-09-08 06:51:07 EDT
this has already been solved in master and 6.3.x (https://bugzilla.redhat.com/show_bug.cgi?id=1258880), shall it be back ported to 6.2.x?
Comment 4 Marco Rietveld 2015-09-23 10:47:27 EDT
Cherry-picked to 6.2.x: 

https://github.com/droolsjbpm/droolsjbpm-integration/commit/2e5a413e
Comment 5 Karel Suta 2015-10-12 06:34:26 EDT
Verified in 6.1.4.

Note You need to log in before you can comment on or make changes to this bug.