[jboss-user] [JBoss jBPM] - Problems starting process from MDB (EJB3, JBPm 3.2 alpha 2)

NiB do-not-reply at jboss.com
Tue Dec 19 06:59:04 EST 2006


Hi
I have the following code to start a process:

anonymous wrote : 
  | private void kickOffProcess(String processname, String [] attrnames, java.io.Serializable[] attrvalues) {
  | 		try {
  | 		org.jbpm.JbpmContext jbpmcontext = org.jbpm.JbpmConfiguration.getInstance().createJbpmContext();
  | 
  | ---------------------------------------------------
  | THE FOLLOWING LINE CAUSES THE EXCEPTION
  | .............................................................
  | 		org.jbpm.graph.def.ProcessDefinition pd = jbpmcontext.getGraphSession().findLatestProcessDefinition(processname);
  | 			
  | 		
  | 		org.jbpm.graph.exe.ProcessInstance pi = new org.jbpm.graph.exe.ProcessInstance(pd);
  | 
  | 		for (int i=0;i<attrnames.length;i++)
  | 			pi.getContextInstance().setVariable(attrnames,attrvalues);	
  | 		pi.signal();
  | 		
  | 		
  | 		} catch (Exception ex) { // Kann ja immer passieren
  | 			log.info("!!! ERROR WEPLACM Main MDB: Unbekannte Exception. Grund: "+ex);
  | 			ex.printStackTrace();
  | 		}
  | 

I get the following Exception (by the line marked above):
org.hibernate.HibernateException: hibernate.cfg.xml not found

Where do I have to store the hibernate.cfg.xml in my jar? And why? What else do I have to consider? The jar contains only a few entity and session beans as well as one MessageDrivenBean (with the code above). The beans work correct. I removed the logging-lines so that the code is more readable. 
I am not quite sure how to start a process correctly (with non-deprecated api functions) so any hints would be great ;-)

Thank you!

Greetz
NiB

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

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



More information about the jboss-user mailing list