postgresqlactiviti

org.activiti.rest.editor.model.ModelEditorJsonRestResource - Error creating model JSON


I work with activiti-5.15.1

I deploy activiti-explorer and activiti-rest under my server tomcat-6.0.18\webapps

I related this war with postgres as a database

I change in db.properties in activiti-explorer and activiti-rest

db=postgres
jdbc.driver=org.postgresql.Driver
jdbc.url=jdbc:postgresql://localhost:5432/activiti
jdbc.username=postgres
jdbc.password=postgres

and I put postgresql-jdbc3-8.1-405.jar under lib folder

when I start the server 23 table are created,

but using http://com.supcom:8080/activiti-explorer/

when I try to create a new model I have this error :

ERROR org.activiti.rest.editor.model.ModelEditorJsonRestResource  - Error creating model JSON
org.codehaus.jackson.JsonParseException: Unexpected character ('j' (code 106)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@390afb; line: 1, column: 2]
    at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1433)
    at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:521)
    at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:442)
    at org.codehaus.jackson.impl.ReaderBasedParser._handleUnexpectedValue(ReaderBasedParser.java:1198)
    at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:485)
    at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2770)
    at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2718)
    at org.codehaus.jackson.map.ObjectMapper.readTree(ObjectMapper.java:1542)
    at org.activiti.rest.editor.model.ModelEditorJsonRestResource.getEditorJson(ModelEditorJsonRestResource.java:53)

the same error is displayed when I try to import other model which is created under eclipse using activiti plugin


Solution

  • This error is due to the multiple versions of PostgreSQL jar.

    According to postgresql website https://jdbc.postgresql.org/download.html

    If you are using JDK 1.6 then the JDBC4 is suitable.(JDBC4 Postgresql Driver, Version 9.4-1208).

    The jar must be used in activiti-explorer lib folder , your application and tomcat lib folder.