- 
        1. Re: loading resource from process classgogoasa Jun 10, 2007 3:35 PM (in response to gogoasa)I have just tried to include the .properties file inside the .par again, same result : org.jbpm.JbpmException: couldn't get value for file 'jndi-services.properties' at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:196) at org.jbpm.instantiation.ProcessClassLoader.getResourceAsStream(ProcessClassLoader.java:43) at fr.bnf.entrychain.jbpm.actions.ServiceClusterJndiProperties.<init>(ServiceClusterJndiProperties.java:31) at fr.bnf.entrychain.jbpm.actions.OnStartAction.execute(OnStartAction.java:24) at org.jbpm.graph.def.Action.execute(Action.java:122) ... 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) ... 74 more 
 Has anyone succeeded in doing this ? To me, as BPM typically orchestrates distant clusters, it looks like a very common thing to do.
- 
        2. Re: loading resource from process classgogoasa Jun 10, 2007 4:05 PM (in response to gogoasa)I fixed the class ProcessClassLoader in order to correctly load resources. 
 Either it is a bug it has always been there and nobody ever loaded a resource in a .par, or I don't get resource location inside par archives at all...
 ### Eclipse Workspace Patch 1.0
 #P jbpm.3_HEAD
 Index: jpdl/jar/src/main/java/org/jbpm/instantiation/ProcessClassLoader.java
 ===================================================================
 RCS file: /cvsroot/jbpm/jbpm.3/jpdl/jar/src/main/java/org/jbpm/instantiation/ProcessClassLoader.java,v
 retrieving revision 1.1
 diff -u -r1.1 ProcessClassLoader.java
 --- jpdl/jar/src/main/java/org/jbpm/instantiation/ProcessClassLoader.java 28 Apr 2006 15:09:22 -0000 1.1
 +++ jpdl/jar/src/main/java/org/jbpm/instantiation/ProcessClassLoader.java 10 Jun 2007 20:02:19 -0000
 @@ -28,7 +28,8 @@
 import org.jbpm.graph.def.*;
 public class ProcessClassLoader extends ClassLoader {
 -
 + final static protected String CLASSES_SUBDIR = "classes/";
 +
 private ProcessDefinition processDefinition = null;
 public ProcessClassLoader( ClassLoader parent, ProcessDefinition processDefinition ) {
 @@ -37,10 +38,11 @@
 }
 public InputStream getResourceAsStream(String name) {
 + String filename = CLASSES_SUBDIR + name;
 InputStream inputStream = null;
 FileDefinition fileDefinition = processDefinition.getFileDefinition();
 if (fileDefinition!=null) {
 - byte[] bytes = fileDefinition.getBytes(name);
 + byte[] bytes = fileDefinition.getBytes(filename);
 if (bytes!=null) {
 inputStream = new ByteArrayInputStream(bytes);
 }
 @@ -53,7 +55,7 @@
 FileDefinition fileDefinition = processDefinition.getFileDefinition();
 if (fileDefinition!=null) {
 - String fileName = "classes/" + name.replace( '.', '/' ) + ".class";
 + String fileName = CLASSES_SUBDIR + name.replace( '.', '/' ) + ".class";
 byte[] classBytes;
 try {
 classBytes = fileDefinition.getBytes(fileName);
- 
        3. Re: loading resource from process classgogoasa Jun 11, 2007 4:34 PM (in response to gogoasa)Still hanging to this issue : do you think this is actually a bug ? Should I open a Jira ? Should I post more information ? 
 Thank you,
 Adrian.
- 
        4. Re: loading resource from process classgogoasa Jun 13, 2007 8:39 AM (in response to gogoasa)Similar problem : http://www.jboss.com/index.html?module=bb&op=viewtopic&t=67818 
- 
        5. Re: loading resource from process classkukeltje Jun 13, 2007 9:18 AM (in response to gogoasa)file a jira issue 
- 
        6. Re: loading resource from process classgogoasa Jun 16, 2007 10:10 AM (in response to gogoasa)created jira issue : http://jira.jboss.com/jira/browse/JBPM-992 
 
    