Bug 1257956 - JAXBContext is created with all classes found in KJAR
JAXBContext is created with all classes found in KJAR
Status: CLOSED DUPLICATE of bug 1199993
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Marco Rietveld
Lukáš Petrovický
Depends On:
  Show dependency treegraph
Reported: 2015-08-28 09:16 EDT by Anton Giertli
Modified: 2016-09-20 01:06 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-12-09 07:52:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Anton Giertli 2015-08-28 09:16:44 EDT
Description of problem:

following is added to the JAXbContext during the KJAR deployment into the business-central:

1. *all* classes in the kjar
2. all classes in the kjar dependencies with the @Remoteable anno
3. all classes in the kjar dependencies with the @XmlRootElement anno

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Deploy KJAR which includes class without @Remotable annotation
2. This class is added to the JAXBContext

Actual results:
 All classes found in the KJAR are added to the JAXBContext

Expected results:

Following is added to the JAXBContext:

1. classes in the kjar with @Remoteable
2. classes in the kjar with @XmlRootElement
3. classes in the kjar dependencies with @Remoteable
4. classes in the kjar dependencies with @XmlRootElement

Additional info:
Comment 2 Kris Verlaenen 2015-09-07 10:22:06 EDT

This is actually done on purpose, we expect all classes added to the kjar to be closely tied to the processes themselves.  This to avoid users would have to manually annotate all classes in the kjar (for example created by data modeler).  

For additional dependencies there's support for @Remotable and jaxb-annotated classes, as adding all possible classes coming from dependencies isn't feasible.

Do you have an example when loading all classes in kjars is problematic and why?  Because if a class inside the kjar is used in a process, it should probably be serializable through JAXB anyway.
Comment 3 Anton Giertli 2015-09-07 10:29:23 EDT
Hi Kris,

The original reason for this BZ is this:

my customer included interface (purpose was custom annotation) in his deployment unit. JAXB can't instantiate the interface and hence, KJAR deployment fails.

What is our recommendation for this use case?

Comment 4 Marco Rietveld 2015-11-05 18:40:53 EST
Duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1231111 ?
Comment 5 Marco Rietveld 2015-12-09 07:52:37 EST

*** This bug has been marked as a duplicate of bug 1199993 ***

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