[
https://jira.jboss.org/jira/browse/JBPM-1404?page=com.atlassian.jira.plug...
]
Thomas Diesler updated JBPM-1404:
---------------------------------
Description:
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.
jBPM classloader does not define package information
----------------------------------------------------
Key: JBPM-1404
URL:
https://jira.jboss.org/jira/browse/JBPM-1404
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Core Engine
Affects Versions: jPDL 3.2.3
Reporter: Mark Little
Priority: Critical
Fix For: JBossBPM-3.3.0
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira