cancel
Showing results for 
Search instead for 
Did you mean: 

Java Appplication crash/ Activity class not found exception

d-fnc
Champ in-the-making
Champ in-the-making
Hello!

I'm currently trying to restart-proof my application that uses Activiti, but can't seem to understand the restart mechanism for Activiti completely.

I'm not decided about the deployment 100% as for in development state, im deploying my application via Jetty, but the Activity runs on a tomcat server. When there is an active instance of a process started from java, and Jetty runs, everything works well. But if i stop the java application(shoot down jetty), obviously the process wont be able to keep running, because the context of the job disappears(no JVM), and the retry counter goes to 0 after 3, so when i start up the jetty again, the process won't continue running.

The problem occurs, when i try to retry the job after i start Jetty again. It still says, that it cannot see the Application Context. I'm not sure how to resolve this.

My other idea for deployment is to run the application on the same tomcat server as the Activiti explorer, but i'm not sure whether or not that will help my situation at all.

If you could give me some pointers on how to step over this gap, it would be greatly appreciated.

ps.: thanks for the tremendous amount of work you put into Activiti.

Best Regards
3 REPLIES 3

trademak
Star Contributor
Star Contributor
Hi,

A job will only be retried if the retry counter is greater than 0. You can manually restart a job via the API as well. I don't understand your comment about "cannot see the Application Context". Are you using the Activiti REST API to communicate with the Engine?

Best regards,

d-fnc
Champ in-the-making
Champ in-the-making
Thank you for your reply!

I might have dived right into action with the 1-minute version install detailed in the user guide, hence i think it uses REST, as it is included with the downloadeable activiti-webapp.war, but i am not 100% sure. I modified the db connection to use a mysql server on the localhost, therefore i am able to set the retry counter manually. Which i did, and i got the ApplicationContext exception.

I might not have been specific enough, and i apologize for that. The application context is something i set up in the java application, through Spring, therefore, it's lifecycle ends when the application dies.

I managed to restart jobs by having the application on the same tomcat server, as the activiti-explorer is on. But I'm not sure how, or why.  Do you think this is a normal situation, or i might be using Activiti wrong?

trademak
Star Contributor
Star Contributor
Can you share the stacktrace of the application context exception you are referring to?

Best regards,