Exception while initializing process engine Can't debug

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2011 06:43 AM
I am trying to initialize the activiti engine through a jsp scriptlet and I keep receiving this error from the console :
INFO: Exception while initializing process engine

when I try to debug I manage to dig until the following call inside the file : ProcessEngines.class :
private static ProcessEngine buildProcessEngine(URL resource) {
InputStream inputStream = null;
try {
inputStream = resource.openStream();
ProcessEngineConfiguration processEngineConfiguration = ProcessEngineConfiguration.createProcessEngineConfigurationFromInputStream(inputStream);
return processEngineConfiguration.buildProcessEngine();
} catch (IOException e) {
throw new ActivitiException("couldn't open resource stream: "+e.getMessage(), e);
} finally {
IoUtil.closeSilently(inputStream);
}
}
The problem is that I can't step into .createProcessEngineConfigurationFromInputStream(inputStream);
to find out what is going on, because when hitting "step into" the debugger jumps to the finally section.
( I have already tried to enable breakpoints inside the function createProcessEngineConfigurationFromInputStream ) it just keeps moving on to the finally section.
Apparently another exception is being fired…other than IOException. I can't see clearly what the exception is because this call : createProcessEngineConfigurationFromInputStream does not throws any exception
Thank you for your time!

- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2011 07:09 AM
Anyway, the message of the exception says "org/springframework/beans/factory/support/BeanDefinitionRegistry" -> possibly a ClassNotFound or NoClassDef? Is spring-beans on your classpath?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2011 07:37 AM
For the engine initialization I use this call -> ProcessEngine processEng = ProcessEngines.getDefaultProcessEngine();
The correct call is like this? –> getProcessEngineInfos("processEng") ; ? if it is, it returns null.
In the build path I have this one, spring-beans-3.0.0.RELEASE.jar
( why can't I go step by step this code segment? it is the first time I encounter something like this :shock: )
Thanks for the quick reply

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2011 07:41 AM
public static List<ProcessEngineInfo> getProcessEngineInfos()
Should be one ProcessEngineInfo, containing the full stacktrace

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2011 08:52 AM
java.lang.NoClassDefFoundError: org/springframework/beans/factory/support/BeanDefinitionRegistry at org.activiti.engine.ProcessEngines.buildProcessEngine(ProcessEngines.java:152) at org.activiti.engine.ProcessEngines.initProcessEnginFromResource(ProcessEngines.java:126) at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:85) at org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:183) at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:176) at org.apache.jsp.testBPM_jsp._jspService(testBPM_jsp.java:86) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.support.BeanDefinitionRegistry at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) … 24 more
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2011 09:02 AM
Seems like the class (BeanDefinitionRegistry) was found on the classpath, but an error occurred while loading. Probably a class referenced from 'BeanDefinitionRegistry' is not present on the classpath. The only obvious non-spring-beans dependency I see in that class is: org.springframework.core.AliasRegistry.
Do you have the spring-core on your classpath as well?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2011 09:39 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2011 07:16 AM
Try using all the spring libs as they are in the workspace/activiti-engine-examples/libs-runtime

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2011 03:50 AM
I have taken all the libs from workspace/activiti-engine-examples/libs-runtime the problem still persists. I tried to add the jars as external to the build path and still the same. I also downloaded the spring framework 3.0.5 and the problem wasn't solved. The next thing I thought was that the class file was not inside the jar…Double checked and it is there. Any other ideas? I lastly searched for a conflicting jar inside the build path but that wasn't the case.
Thank you for your time, this thing is starting to wind me up

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2011 05:31 AM
I have solved the problem eventually. The solution was that I took only the runtime-libs and put them in the build path. Everything else was deleted. Apparently a .jar was conflicting. When I removed the extra jars everything went fine.
Thank you for your time and help
