Class not found exception in java service task
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2011 08:59 AM
Hi ,
To use java service task i have create my own java class in "\activiti\workspace\activiti-engine-examples\target\classes\org\activiti\examples\bpmn\servicetask" named "mails.class"
My bpm.xml files are in "activiti\workspace\activiti-modeler-examples".
So how can i refer my class in my bpm.xml file?
I just copied the org\activiti\examples\bpmn\servicetask folder in my file path "activiti\workspace\activiti-modeler-examples". and in bpm.xml file i referred
How should i refer the class?
I get the exception as "06040005 Wrapped Exception (with status template): couldn't instantiate class mails"
The error was ClassNotFoundException
Why is it so? How should i refer my class?
Help me
Thanks,
kavi
To use java service task i have create my own java class in "\activiti\workspace\activiti-engine-examples\target\classes\org\activiti\examples\bpmn\servicetask" named "mails.class"
My bpm.xml files are in "activiti\workspace\activiti-modeler-examples".
So how can i refer my class in my bpm.xml file?
I just copied the org\activiti\examples\bpmn\servicetask folder in my file path "activiti\workspace\activiti-modeler-examples". and in bpm.xml file i referred
<serviceTask completionQuantity="1" activiti:class="org.activiti.examples.bpmn.servicetask.mails" id="sid-78176AC6-C1E4-43FB-BB8F-48550589A89B" name="Send notification email to admin on status "Applied"" startQuantity="1"> <extensionElements> <signavio:signavioMetaData metaKey="bgcolor" metaValue="#ffffcc"/> </extensionElements> <incoming>sid-515BC8FA-F8B0-4CB2-A818-BCDD3AA2FAED</incoming> </serviceTask>
How should i refer the class?
I get the exception as "06040005 Wrapped Exception (with status template): couldn't instantiate class mails"
The error was ClassNotFoundException
Why is it so? How should i refer my class?
Help me
Thanks,
kavi
Labels:
- Labels:
-
Archive
8 REPLIES 8
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2011 10:41 AM
Kavi,
Class files normally start with a Capital, so maybe, just maybe use made an error here
Class files normally start with a Capital, so maybe, just maybe use made an error here
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2014 12:22 AM
Hi guys,
I'm getting the same problem.
I'm deploying the .bar file on activiti explorer and i had used service task in my process and attached a class with it.
But the bar file which is getting generated does not contains the java class so after deploying it when i'm running its throwing "Class Not Found Exception".
So please help me in deploying java classes with it.
I'm getting the same problem.
I'm deploying the .bar file on activiti explorer and i had used service task in my process and attached a class with it.
But the bar file which is getting generated does not contains the java class so after deploying it when i'm running its throwing "Class Not Found Exception".
So please help me in deploying java classes with it.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2014 06:13 AM
Please do not ask the same question twice. Asking the same question won't get it answered any sooner…
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2014 02:13 PM
Why not answer the question or provide an update then?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2014 03:44 AM
A bar will *never* contains Java classes. You need to add them to the classpath yourself.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2015 05:56 AM
why is it necessay to deploy the bar file and copy the jars manually? What is when i use an activiti installation which is not accesible except the explorer?
I would expect that the deployment file contains all needed resources and the deployment process does the rest, including deploy bar file and adds jars/classes into class path of the engine.
Can anyone explain me how to copy the jars my process needs to …/tomcat/webapps/activiti-explorer/META-INF/libs, when tomcat is running on a remote mashine and i don't have file-access to it?
thanks a lot in advance
Kemal CAVDAR
I would expect that the deployment file contains all needed resources and the deployment process does the rest, including deploy bar file and adds jars/classes into class path of the engine.
Can anyone explain me how to copy the jars my process needs to …/tomcat/webapps/activiti-explorer/META-INF/libs, when tomcat is running on a remote mashine and i don't have file-access to it?
thanks a lot in advance
Kemal CAVDAR
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2015 06:57 AM
Hi Kemal,
We don't want to implement class loading logic in the Activiti Engine to keep the Engine simple and focused on BPMN execution. JBoss and other application servers, and for example Apache Karaf provide class loading mechanisms that we can utilize in Activiti. If you deploy on Tomcat then yes you need to copy the JARs to the WEB-INF/lib folder.
Best regards,
We don't want to implement class loading logic in the Activiti Engine to keep the Engine simple and focused on BPMN execution. JBoss and other application servers, and for example Apache Karaf provide class loading mechanisms that we can utilize in Activiti. If you deploy on Tomcat then yes you need to copy the JARs to the WEB-INF/lib folder.
Best regards,
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2015 09:00 AM
Hi Tijs,
thank you verry much replaying so rapidly!
thank you verry much replaying so rapidly!