Bug 778349 (SOA-834)

Summary: jBPM classloader does not define package information
Product: [JBoss] JBoss Enterprise SOA Platform 4 Reporter: nwallace <nwallace>
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.2 CP04   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-834
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-12 09:02:38 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 nwallace 2008-09-25 13:15:10 UTC
Date of First Response: 2008-11-29 05:50:32
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 nwallace 2008-09-25 13:15:10 UTC
Link: Added: This issue depends JBPM-1404


Comment 2 nwallace 2008-09-25 13:24:05 UTC
Can we have confirmation that fixes are in place for 4.2CP03.

Comment 3 nwallace 2008-09-25 13:26:33 UTC
Link: Added: This issue is related to SOA-649


Comment 4 nwallace 2008-09-25 13:27:42 UTC
Link: Added: This issue related SOA-649


Comment 5 nwallace 2008-09-25 13:28:15 UTC
Link: Removed: This issue is related to SOA-649 


Comment 6 Thomas Diesler 2008-11-29 10:50:32 UTC
Fixed in jbpm-3.3.0.GA

Comment 7 Julian Coleman 2009-05-05 10:34:19 UTC
Fixed with the upgrade of jBPM to 3.2.5SP5.

Comment 8 Jiri Pechanec 2009-06-12 09:02:38 UTC
CR4: Correct jBPM version in place