Bug 778136 (SOA-649)

Summary: jBPM classloader does not define package information
Product: [JBoss] JBoss Enterprise SOA Platform 4 Reporter: Kevin Conner <kevin.conner>
Component: JBPM - within SOAAssignee: trev <tkirby>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.2 CP02   
Target Milestone: ---   
Target Release: 4.3 CP01   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-649
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-27 05:11:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Kevin Conner 2008-08-05 13:59:54 UTC
Date of First Response: 2008-08-11 08:32:59
Help Desk Ticket Reference: https://enterprise.redhat.com/issue-tracker/?module=issues&action=view&tid=191831
project_key: SOA

The jBPM ProcessClassLoader defines classes from within the par file but it does not define the associated package information.

As a consequence the result of <class>.getPackage() is null and code which relies on this (such as JAXB for package annotations) will not work.

A simple fix would be to add the following to the findClass method although it should be noted that this ignores the manifest/sealing information.

   if (fileDefinition!=null) {
     // Add the package information
     final int packageIndex = name.lastIndexOf('.') ;
     if (packageIndex != -1) {
       final String packageName = name.substring(0, packageIndex) ;
       final Package classPackage = getPackage(packageName) ;
       if (classPackage == null) {
         definePackage(packageName, null, null, null, null, null, null, null) ;
       }
     }

With this fix in place the JAXB marshalling works as expected.

Comment 1 Kevin Conner 2008-08-05 14:00:27 UTC
This issue originally existed as SOA-633 but was deleted from the SOA JIRA. This exists for tracking through the SOA platform.

Comment 2 Kevin Conner 2008-08-05 14:00:50 UTC
Link: Added: This issue is a dependency of JBPM-1404


Comment 3 Kevin Conner 2008-08-05 14:01:22 UTC
Link: Removed: This issue is a dependency of JBPM-1404 


Comment 4 Kevin Conner 2008-08-05 14:01:55 UTC
Link: Added: This issue depends JBPM-1404


Comment 5 Thomas Diesler 2008-08-11 12:32:59 UTC
TomB is the owner of SOA issues related to the jBPM3 code base

Comment 6 nwallace 2008-09-25 13:26:33 UTC
Link: Added: This issue related SOA-834


Comment 7 nwallace 2008-09-25 13:27:42 UTC
Link: Added: This issue is related to SOA-834


Comment 8 nwallace 2008-09-25 13:28:15 UTC
Link: Removed: This issue related SOA-834 


Comment 9 Thomas Diesler 2008-11-29 10:40:34 UTC
Fixed in jbpm-3.3.0.GA

Comment 10 Jiri Pechanec 2009-02-27 05:11:04 UTC
Verified in sources

Comment 11 Dana Mison 2009-03-12 09:25:30 UTC
Release Note:
JBPM-1404
The jBPM ProcessClassLoader now defines associated package information for classes defined from within a PAR file.  This allows JAXB marshaling to work as expected.