[jboss-user] [JBoss jBPM] - loading resource from process class
gogoasa
do-not-reply at jboss.com
Sat Jun 9 11:25:13 EDT 2007
Hello,
I wonder if there is some "good practice" to recommend concerning loading properties files inside a process archive.
My process actions call EJBs on a remote cluster and must have access to cluster location properties located in a file called jndi-services.properties.
Some time ago I tried to deploy the .properties file with the process but if I remember correctly, jBPM 3.2.0 did not store resources in database along .classes.
I now tried including my .properties file in the jbpm-configs.jar deployed with my jBPM 3.2.1-CVS ear. It doesn't seem to work either :
| 17:02:38,269 ERROR [OnErrorAction] caught exception
| 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)
| ... 79 more
|
If I understand correctly the upper stacktrace, ProcessClassLoader does not find the resource in the database, which is normal, since it is not deployed there. Why does it not delegate then to its parent, which, in the case of my jBoss deployment, is org.jboss.mx.loading.UnifiedClassLoader3 ?
Thank you,
Adrian.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052816#4052816
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052816
More information about the jboss-user
mailing list