Activiti with persistent database (bug using mysql?)

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2014 03:34 PM
Hi,
I've tried everything now. My goal is to have one database for the activiti explorer and the activiti rest API, so that if I change something via rest I also could see it in the activiti explorer. I already tried two attempts:
1. I tried to run the h2 database in server mode. Therefore I gave the command
But I always got the message that the class
2. I created a persistent database in mysql using phpMyAdmin and the following code in both db.properties files:
The database works fine and with this attempt I reached my goal that I can use both, the activiti explorer and the rest API.
but unfortunately now the resource URLs don't work anymore. For Example if I list the process definitions, I get several entries like this:
But the resource URL
If I compare the same behavior with an h2 database (only used by rest API and not by activiti explorer as described above), I get a resource URL like
I would appreciate any help of this issue, or is this even a bug in combination with mysql?
I've tried everything now. My goal is to have one database for the activiti explorer and the activiti rest API, so that if I change something via rest I also could see it in the activiti explorer. I already tried two attempts:
1. I tried to run the h2 database in server mode. Therefore I gave the command
java -cp h2-1.3.171.jar org.h2.tools.Server -tcpPort 2962
and and replaced the jdbc url: jdbc.url=jdbc:h2:tcp://localhost:2962/~/test
like described in this post: http://forums.activiti.org/content/how-configure-activiti-explorer-and-rest-use-same-databaseBut I always got the message that the class
org.h2.tools.Server
could not be found.2. I created a persistent database in mysql using phpMyAdmin and the following code in both db.properties files:
db=mysqljdbc.driver=com.mysql.jdbc.Driverjdbc.url=jdbc:mysql://localhost:3306/activiti?autoReconnect=truejdbc.username=rootjdbc.password=
The database works fine and with this attempt I reached my goal that I can use both, the activiti explorer and the rest API.
but unfortunately now the resource URLs don't work anymore. For Example if I list the process definitions, I get several entries like this:
{ "id": "createTimersProcess:1:37", "url": "http://localhost:8080/activiti-rest/service/repository/process-definitions/createTimersProcess%3A1%3...", "key": "createTimersProcess", "version": 1, "name": "Create timers process", "description": "Test process to create a number of timers.", "deploymentId": "23", "deploymentUrl": "http://localhost:8080/activiti-rest/service/repository/deployments/23", "resource": "http://localhost:8080/activiti-rest/service/repository/deployments/23/resources/org%2Factiviti%2Fexp...", "diagramResource": null, "category": "Examples", "graphicalNotationDefined": false, "suspended": false, "startFormDefined": false }
But the resource URL
http://localhost:8080/activiti-rest/service/repository/deployments/23/resources/org%2Factiviti%2Fexp...
only responds with an Status 400 Bad Request.If I compare the same behavior with an h2 database (only used by rest API and not by activiti explorer as described above), I get a resource URL like
http://localhost:8080/activiti-rest/service/repository/deployments/20/resources/VacationRequest.bpmn...
which works perfectly as far as I have a h2 database.I would appreciate any help of this issue, or is this even a bug in combination with mysql?
Labels:
- Labels:
-
Archive
13 REPLIES 13
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2014 01:05 AM
Hi,
Run tomcat in debug mode (catalina.sh jpda start) and connect to JVM remotely.
Regards
Martin
Run tomcat in debug mode (catalina.sh jpda start) and connect to JVM remotely.
Regards
Martin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2014 07:58 AM
Sorry havn't worked on it for a while.
The REST http request is simply <code>http://localhost:8080/activiti-rest/service/repository/process-definitions</code>
If I use different databases (like it is on default) everything is fine both on activit-explorer and activiti REST. I can post a process instance via <code>http://localhost:8080/activiti-rest/service/runtime/process-instances</code> and see it with the same request <code>http://localhost:8080/activiti-rest/service/runtime/process-instances</code> but I can't see it on activiti explorer (since I use different databases in this case)
As soon as I use one database for both, the resource URL on this GET request <code>http://localhost:8080/activiti-rest/service/repository/process-definitions</code> are not working anymore.
The REST http request is simply <code>http://localhost:8080/activiti-rest/service/repository/process-definitions</code>
If I use different databases (like it is on default) everything is fine both on activit-explorer and activiti REST. I can post a process instance via <code>http://localhost:8080/activiti-rest/service/runtime/process-instances</code> and see it with the same request <code>http://localhost:8080/activiti-rest/service/runtime/process-instances</code> but I can't see it on activiti explorer (since I use different databases in this case)
As soon as I use one database for both, the resource URL on this GET request <code>http://localhost:8080/activiti-rest/service/repository/process-definitions</code> are not working anymore.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2014 01:06 AM
Hi,
Any stacktrace? jUnit test?
Regards
Martin
As soon as I use one database for both, the resource URL on this GET request http://localhost:8080/activiti-rest/service/repository/process-definitions are not working anymore.
Any stacktrace? jUnit test?
Regards
Martin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2014 01:25 AM
Reading documentation I find this rest endpoint to fetch diagram:
/activiti-rest/service/process-definition/fixSystemFailure:1:35/diagram
and it works like a charm, with mysql too
Thank you
/activiti-rest/service/process-definition/fixSystemFailure:1:35/diagram
and it works like a charm, with mysql too

Thank you
