1 Reply Latest reply on Apr 4, 2016 10:20 AM by Marco Rietveld

    BPMS 6.2 server REST API partial failures due to SQL error

    Brandon Buteau Newbie

      I am only able to get some of the documented REST API for the BPM server working. For example, the following call works as expected:




      and it returns process instances associated with the given process ID. Likewise, the call:




      returns a list of available organizational units.


      However, many data retrieval calls do not work. (I haven't even tried yet to manipulate processes and tasks through the API.) In fact, all task-related calls seem to be failing. For example:


      http://<serverdomain>:8080/business-central/rest/query/runtime/task?pid=TestProject2.SeqTaskFlow  (same as above process call but retrieving task info instead)


      return as 500 status because of server errors (appended below). I've tried many variations of query parameters, no parameters, etc. and get the same results, regardless of whether there are no active process instances, there is an active process instance but no claimed tasks, or there are both claimed/completed and unclaimed tasks. There is a problem with SQL trying to access an unknown "ORGANIZATI2_.ID" column. Does anyone know what the problem is or how to resolve it?




      12:00:52,257 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-/ SQL Error: 42122, SQLState: 42S22

      12:00:52,260 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-/ Column "ORGANIZATI2_.ID" not found; SQL statement:

      select distinct taskimpl0_.id as col_0_0_, taskimpl0_.name as col_1_0_, taskimpl0_.subject as col_2_0_, taskimpl0_.description as col_3_0_, taskimpl0_.status as

      col_4_0_, taskimpl0_.priority as col_5_0_, taskimpl0_.skipable as col_6_0_, taskimpl0_.actualOwner_id as col_7_0_, taskimpl0_.createdBy_id as col_8_0_, taskimp

      l0_.createdOn as col_9_0_, taskimpl0_.activationTime as col_10_0_, taskimpl0_.expirationTime as col_11_0_, taskimpl0_.processId as col_12_0_, taskimpl0_.process

      SessionId as col_13_0_, taskimpl0_.processInstanceId as col_14_0_, taskimpl0_.deploymentId as col_15_0_, taskimpl0_.subTaskStrategy as col_16_0_, taskimpl0_.par

      entId as col_17_0_ from Task taskimpl0_ where (taskimpl0_.actualOwner_id=? or taskimpl0_.createdBy_id=? or organizati2_.id=? or organizati2_.id in (? , ? , ? ,

      ? , ? , ? , ?) or organizati4_.id=? or organizati4_.id in (? , ? , ? , ? , ? , ? , ?) or organizati6_.id=? or organizati6_.id in (? , ? , ? , ? , ? , ? , ?)) an

      d taskimpl0_.processId=? order by taskimpl0_.processInstanceId asc [42122-168]

      12:00:52,267 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/business-central].[javax.ws.rs.core.Application]] (http-/

      3) JBWEB000236: Servlet.service() for servlet javax.ws.rs.core.Application threw exception: org.jboss.resteasy.spi.UnhandledException: javax.persistence.Persist

      enceException: org.hibernate.exception.SQLGrammarException: could not prepare statement