-
1. Re: jbpm configuration resource 'jbpm.cfg.xml' is not availa
jbarrez Jul 25, 2008 2:41 AM (in response to ajanz)- If the config file is not named 'jbpm.cfg.xml' -> this is a bug in 3.2.3. Rename the file to jbpm.cfg.xml and it is fixed.
- If not, having the config file on the classpath usually does the trick -
2. Re: jbpm configuration resource 'jbpm.cfg.xml' is not availa
ajanz Jul 25, 2008 3:26 AM (in response to ajanz)ok, i thaught i did that...but i put the configuration file in the wrong directory...
inspecting the classpath at runtime with
System.out.println("Classpath:" + System.getProperty("java.class.path"));
gave me the info i needed....
hrmpf. so easy..sorry -
3. Re: jbpm configuration resource 'jbpm.cfg.xml' is not availa
ruchika Oct 22, 2008 5:08 AM (in response to ajanz)Hello,
As suggested by you I printed the classpath and and found file is present there.
What else I need to have to access it from external stanalone application?
Some specific directory structure or something else?
I am getting below error:
log4j:WARN No appenders could be found for logger (org.jbpm.JbpmConfiguration).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.jbpm.JbpmException: couldn't parse jbpm configuration from resource 'D:\eclipse_new\eclipse-SDK-3.4.1-win32\eclipse\workspace\TestEvenNumberjDPL\src\lib\jbpm.cfg.xml'
at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:292)
at EvenNumbersTest.main(EvenNumbersTest.java:15)
Caused by: org.jbpm.JbpmException: jbpm configuration resource 'D:\eclipse_new\eclipse-SDK-3.4.1-win32\eclipse\workspace\TestEvenNumberjDPL\src\lib\jbpm.cfg.xml' is not available
at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:286)
... 1 more
Regards,
Ruchika -
4. Re: jbpm configuration resource 'jbpm.cfg.xml' is not availa
ajanz Oct 22, 2008 5:14 AM (in response to ajanz)sorry for asking but does
'D:\eclipse_new\eclipse-SDK-3.4.1-win32\eclipse\workspace\TestEvenNumberjDPL\src\lib\jbpm.cfg.xml'
exist? -
5. Re: jbpm configuration resource 'jbpm.cfg.xml' is not availa
ruchika Oct 22, 2008 5:24 AM (in response to ajanz)Yes, I have put 'jbpm.cfg.xml' in lib of my java project.
Let me explain you whole scenario:
I have developed business process using eclipse.
Now I have java project in which I have class trying to access this process.
For your reference I am putting snipet of code below:
....
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance("D:\\eclipse_new\\eclipse-SDK-3.4.1-win32\\eclipse\\workspace\\TestEvenNumberjDPL\\src\\lib\\jbpm.cfg.xml");
//jbpmConfiguration.parseResource("D:\\eclipse_new\\eclipse-SDK-3.4.1-win32\\eclipse\\workspace\\TestEvenNumberjDPL\\src\\lib\\jbpm.cfg.xml");
//jbpmConfiguration.parseXmlString("D:\\eclipse_new\\eclipse-SDK-3.4.1-win32\\eclipse\\workspace\\TestEvenNumberjDPL\\src\\lib\\jbpm.cfg.xml");
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
try {
ProcessDefinition definition = ProcessDefinition.parseXmlResource("D:/eclipse_new/eclipse-SDK-3.4.1-win32/eclipse/workspace/Even-number-manipulation/src/main/jpdl/add-even-numbers/processdefinition.xml");
ProcessInstance instance = new ProcessInstance(definition);
.....
I have a lib folder consisting all requied jar and 'jbpm.cfg.xml'.
I am not sure whether this is correct way or not.
Can you please suggest me the required steps?
Regards,
Ruchika