1 Reply Latest reply on Jul 14, 2014 7:29 AM by Saria ESSID

    REST-API

    Ardogan Lilya Newbie

      Hello,

       

      I'm using REST-API in order to interact with KIE-WB.

      I'm facing a problem when I call  http://localhost:8080/jbpm-console/rest/task/query   [GET].

      • Status:  500 Internal Server Error

      • Response:


      1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      2. <response>
      3.     <status>FAILURE</status>
      4.     <error>org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: null near line 1, column 855 [select distinct  new org.jbpm.services.task.query.TaskSummaryImpl(t.id,  t.taskData.processInstanceId,  name.shortText,subject.shortText,description.shortText,  t.taskData.status,  t.priority,  t.taskData.skipable,  actualOwner,createdBy,  t.taskData.createdOn,t.taskData.activationTime,t.taskData.expirationTime,  t.taskData.processId,t.taskData.processSessionId,  t.subTaskStrategy,  t.taskData.parentId ) from  org.jbpm.services.task.impl.model.TaskImpl t   left join t.taskData.actualOwner as actualOwner              left join t.taskData.createdBy as createdBy  left join t.subjects as subject  left join t.descriptions as description  left join t.names as name,   org.jbpm.services.task.impl.model.OrganizationalEntityImpl businessAdministrator,   org.jbpm.services.task.impl.model.OrganizationalEntityImpl potentialOwners where t.archived = 0 AND ]</error>
      5.     <stackTrace>java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: null near line 1, column 855 [select distinct  new org.jbpm.services.task.query.TaskSummaryImpl(t.id,  t.taskData.processInstanceId,  name.shortText,subject.shortText,description.shortText,  t.taskData.status,  t.priority,  t.taskData.skipable,  actualOwner,createdBy,  t.taskData.createdOn,t.taskData.activationTime,t.taskData.expirationTime,  t.taskData.processId,t.taskData.processSessionId,  t.subTaskStrategy,  t.taskData.parentId ) from  org.jbpm.services.task.impl.model.TaskImpl t   left join t.taskData.actualOwner as actualOwner              left join t.taskData.createdBy as createdBy  left join t.subjects as subject  left join t.descriptions as description  left join t.names as name,   org.jbpm.services.task.impl.model.OrganizationalEntityImpl businessAdministrator,   org.jbpm.services.task.impl.model.OrganizationalEntityImpl potentialOwners where t.archived = 0 AND ]
      6.         at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1348)
      7.         at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1289)
      8.         at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:288)
      9.         at org.jbpm.services.task.persistence.JPATaskPersistenceContext.queryStringWithParametersInTransaction(JPATaskPersistenceContext.java:403)
      10.         at org.jbpm.services.task.impl.TaskQueryServiceImpl.getTasksByVariousFields(TaskQueryServiceImpl.java:480)
      11.         at org.jbpm.services.task.impl.TaskQueryServiceImpl.getTasksByVariousFields(TaskQueryServiceImpl.java:404)
      12.         at org.jbpm.services.task.commands.GetTasksByVariousFieldsCommand.execute(GetTasksByVariousFieldsCommand.java:108)
      13.         at org.jbpm.services.task.commands.GetTasksByVariousFieldsCommand.execute(GetTasksByVariousFieldsCommand.java:28)
      14.         at org.jbpm.services.task.commands.TaskCommandExecutorImpl$SelfExecutionCommandService.execute(TaskCommandExecutorImpl.java:65)
      15.         at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)
      16.         at org.jbpm.services.task.persistence.TaskTransactionInterceptor.execute(TaskTransactionInterceptor.java:53)
      17.         at org.jbpm.services.task.commands.TaskCommandExecutorImpl.execute(TaskCommandExecutorImpl.java:40)
      18.         at org.jbpm.services.task.impl.command.CommandBasedTaskService.execute(CommandBasedTaskService.java:128)
      19.         at org.kie.services.remote.rest.RestProcessRequestBean.doTaskOperationOnDeployment(RestProcessRequestBean.java:98)
      20.         at org.kie.services.remote.rest.RestProcessRequestBean.doTaskOperation(RestProcessRequestBean.java:117)
      21.         at org.kie.services.remote.rest.RestProcessRequestBean$Proxy$_$$_WeldClientProxy.doTaskOperation(RestProcessRequestBean$Proxy$_$$_WeldClientProxy.java)
      22.         at org.kie.services.remote.rest.TaskResource.query(TaskResource.java:157)
      23.         at org.kie.services.remote.rest.TaskResource$Proxy$_$$_WeldClientProxy.query(TaskResource$Proxy$_$$_WeldClientProxy.java)
      24.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      25.         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      26.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      27.         at java.lang.reflect.Method.invoke(Method.java:606)
      28.         at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)
      29.         at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
      30.         at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
      31.         at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
      32.         at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
      33.         at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
      34.         at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
      35.         at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
      36.         at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
      37.         at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
      38.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      39.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
      40.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
      41.         at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
      42.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
      43.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
      44.         at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
      45.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
      46.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
      47.         at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)
      48.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
      49.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
      50.         at org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70)
      51.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
      52.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
      53.         at org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266)
      54.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
      55.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
      56.         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
      57.         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
      58.         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397)
      59.         at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
      60.         at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
      61.         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
      62.         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      63.         at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:416)
      64.         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      65.         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
      66.         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
      67.         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
      68.         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
      69.         at java.lang.Thread.run(Thread.java:745)
      70. Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: null near line 1, column 855 [select distinct  new org.jbpm.services.task.query.TaskSummaryImpl(t.id,  t.taskData.processInstanceId,  name.shortText,subject.shortText,description.shortText,  t.taskData.status,  t.priority,  t.taskData.skipable,  actualOwner,createdBy,  t.taskData.createdOn,t.taskData.activationTime,t.taskData.expirationTime,  t.taskData.processId,t.taskData.processSessionId,  t.subTaskStrategy,  t.taskData.parentId ) from  org.jbpm.services.task.impl.model.TaskImpl t   left join t.taskData.actualOwner as actualOwner              left join t.taskData.createdBy as createdBy  left join t.subjects as subject  left join t.descriptions as description  left join t.names as name,   org.jbpm.services.task.impl.model.OrganizationalEntityImpl businessAdministrator,   org.jbpm.services.task.impl.model.OrganizationalEntityImpl potentialOwners where t.archived = 0 AND ]
      71.         at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:54)
      72.         at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:47)
      73.         at org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(ErrorCounter.java:79)
      74.         at org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:276)
      75.         at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:180)
      76.         at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
      77.         at org.hibernate.engine.query.spi.HQLQueryPlan.&lt;init&gt;(HQLQueryPlan.java:101)
      78.         at org.hibernate.engine.query.spi.HQLQueryPlan.&lt;init&gt;(HQLQueryPlan.java:80)
      79.         at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:119)
      80.         at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:214)
      81.         at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:192)
      82.         at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1537)
      83.         at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:285)
      84.         ... 61 more
      85. </stackTrace>
      86. </response>


      Knowing that I'm working with jBPM-6.0.1, have you please some suggestions ?!.

       

      Cordially Greeting