[jboss-user] [JBoss jBPM] - Re: Beginner question: Using jBPM from EJB application

ruchika do-not-reply at jboss.com
Thu Oct 23 00:34:19 EDT 2008


Thanks Ronald for replying and giving me these tips.
Let me expalin you the whole scenario:

I am using eclipse 3.4 and jpdl version3.2.3(jbpm-jpdl-3.2.3)
I have developed jbpm project and process definition using eclipse.
Now I wrote JUnit test case and standalone program within this project itself(jbpm project). I am able to see result in console(I have not developed any UI, not my projects requirement).

Now I have created a java project (not jbpm).
Requirement: In this project I want to call the bussiness process created above.
Steps done:
1. In java project written a main class having code for invoking bussiness process created above.
2. Included jbpm.cfg.xml in classpath as suggested by you but 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 'jbpm.cfg.xml'
	at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:292)
	at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:257)
	at org.jbpm.JbpmConfiguration$Configs.getObjectFactory(JbpmConfiguration.java:425)
	at org.jbpm.JbpmConfiguration$Configs.getObject(JbpmConfiguration.java:437)
	at org.jbpm.JbpmConfiguration$Configs.getString(JbpmConfiguration.java:441)
	at org.jbpm.graph.def.ProcessDefinition.createNewProcessDefinition(ProcessDefinition.java:97)
	at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:138)
	at org.jbpm.graph.def.ProcessDefinition.parseXmlInputStream(ProcessDefinition.java:179)
	at org.jbpm.graph.def.ProcessDefinition.parseXmlResource(ProcessDefinition.java:160)
	at com.test.EvenNumbersTest.main(EvenNumbersTest.java:31)
Caused by: org.jbpm.JbpmException: jbpm configuration resource 'jbpm.cfg.xml' is not available
	at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:286)
	... 9 more

Then I added the lines:
1. JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance("D:\\eclipse_new\\eclipse-SDK-3.4.1-win32\\eclipse\\workspace\\TestEvenNumberjDPL\\lib\\jbpm.cfg.xml");

2. JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();

I am now getting the following 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

I am not sure what I am missing. I have searched lot but not getting any clue what is going wrong. Please help.
Do I need to refer the jbpm project in my java project?
I am clueless.

Regards,
Ruchika

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4184033#4184033

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4184033



More information about the jboss-user mailing list