[
https://jira.jboss.org/jira/browse/JBPM-1448?page=com.atlassian.jira.plug...
]
Marco Strauch commented on JBPM-1448:
-------------------------------------
Hello,
I know this issue is closed but I have still a problem with this class loader handling.
It is only a comment on this and mybe you can handle it in next JBPM versions.
First I use JBPM version 3.2.6 SP1.
In my process definition I use bsh scripts. So when I leave a node using an action handler
like below
( public class LeaveNodeHandler implements ActionHandle {
public void execute(....) {
....
rexecutionContext.leaveNode();
.....
}
}
)
and the executed transition enters another node in which I execute a BSH Script then the
initialization of bsh.Interpreter will fail with this exception:
org.jbpm.JbpmException: couldn't get value for file
'classes/java/lang/bsh.class'
at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:196)
at
org.jbpm.instantiation.ProcessClassLoader.findClass(ProcessClassLoader.java:116)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at bsh.classpath.ClassManagerImpl.plainClassForName(Unknown Source)
at bsh.classpath.ClassManagerImpl.classForName(Unknown Source)
at bsh.NameSpace.classForName(Unknown Source)
at bsh.NameSpace.getImportedClassImpl(Unknown Source)
at bsh.NameSpace.getClassImpl(Unknown Source)
at bsh.NameSpace.getClass(Unknown Source)
at bsh.Name.consumeNextObjectField(Unknown Source)
at bsh.Name.toObject(Unknown Source)
at bsh.Name.toObject(Unknown Source)
at bsh.NameSpace.get(Unknown Source)
at bsh.Interpreter.get(Unknown Source)
at bsh.Interpreter.getu(Unknown Source)
at bsh.Interpreter.<init>(Unknown Source)
at bsh.Interpreter.<init>(Unknown Source)
at bsh.Interpreter.<init>(Unknown Source)
....
Caused by: java.lang.NullPointerException
at org.jbpm.file.def.FileDefinition.getBytesFromDb(FileDefinition.java:213)
at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:193)
... 236 more
This happens because the bsh package is not known in process class loader.
So now I have to implement my own process class loader to prevent this.
Kind regards,
Marco
jBPM does not initialise thread context classloader
---------------------------------------------------
Key: JBPM-1448
URL:
https://jira.jboss.org/jira/browse/JBPM-1448
Project: jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Runtime Engine
Reporter: Kevin Conner
Assignee: Bernd Ruecker
Priority: Critical
Fix For: SOA 4.2 CP03, jBPM 3.3.0 GA, jBPM 3.2.4 GA
jBPM does not initialise the thread context classloader when executing actions within the
process.
The outcome of this decision is that code executed within the context of this action will
not have access to classes/resources in the par unless the action classloader is an
explicit parameter.
One example of this is the RMI marshalling layer, which has an implication on JNDI
lookups.
--
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