Bug 1257956 - JAXBContext is created with all classes found in KJAR
Summary: JAXBContext is created with all classes found in KJAR
Keywords:
Status: CLOSED DUPLICATE of bug 1199993
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Marco Rietveld
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-28 13:16 UTC by Anton Giertli
Modified: 2016-09-20 05:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-09 12:52:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Anton Giertli 2015-08-28 13:16:44 UTC
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):
6.1

How reproducible:

always
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 14:22:06 UTC
Anton,

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 14:29:23 UTC
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?

Cheers,
Anton

Comment 4 Marco Rietveld 2015-11-05 23:40:53 UTC
Duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1231111 ?

Comment 5 Marco Rietveld 2015-12-09 12:52:37 UTC

*** 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.