Thomas Victor [
http://community.jboss.org/people/tvictor] replied to the discussion
"Query task with variables"
To view the discussion, visit:
http://community.jboss.org/message/543909#543909
--------------------------------------------------------------
I tried another query
entityManager.createQuery("SELECT task.execution.variables from
org.jbpm.api.task.Task task where index(task.execution.variables[0])='invoiceId'
and task.execution.variables[0].l=23").getResultList()
Which gives me no results. That is expected because there is no varialbe with value 23
But when I changed the value to 16 it is giving me the following error. The value 16 is
actually existing in the database. Can anyone help to correct this query?
Thanks
Thomas
12:15:51,422 WARN [JDBCExceptionReporter] SQL Error: 245, SQLState: S0001
12:15:51,422 ERROR [JDBCExceptionReporter] Conversion failed when converting the varchar
value 'invoiceId' to data type int.
12:15:51,422 ERROR [STDERR] javax.persistence.PersistenceException:
org.hibernate.exception.SQLGrammarException: could not execute query
12:15:51,422 ERROR [STDERR] at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
12:15:51,422 ERROR [STDERR] at
org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76)
12:15:51,422 ERROR [STDERR] at
com.imagitek.prodagioap.workflow.TaskService.getGroupTasks(TaskService.java:72)
12:15:51,422 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor601.invoke(Unknown
Source)
12:15:51,422 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12:15:51,422 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:51)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:97)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.util.Work.workInTransaction(Work.java:61)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:91)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
12:15:51,422 ERROR [STDERR] at
com.imagitek.prodagioap.workflow.invoice.InvoiceTaskService_$_javassist_seam_13.getGroupTasks(InvoiceTaskService_$_javassist_seam_13.java)
12:15:51,422 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor600.invoke(Unknown
Source)
12:15:51,422 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12:15:51,422 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
12:15:51,422 ERROR [STDERR] at
javax.el.BeanELResolver.getValue(BeanELResolver.java:261)
12:15:51,422 ERROR [STDERR] at
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
12:15:51,422 ERROR [STDERR] at
com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
12:15:51,422 ERROR [STDERR] at
org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
12:15:51,422 ERROR [STDERR] at
org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
12:15:51,422 ERROR [STDERR] at
org.jboss.el.parser.AstEmpty.getValue(AstEmpty.java:29)
12:15:51,422 ERROR [STDERR] at
org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
12:15:51,422 ERROR [STDERR] at
com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
12:15:51,422 ERROR [STDERR] at
javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)
12:15:51,422 ERROR [STDERR] at
org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:271)
12:15:51,422 ERROR [STDERR] at
org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
12:15:51,422 ERROR [STDERR] at
org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:200)
12:15:51,422 ERROR [STDERR] at
org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:195)
12:15:51,422 ERROR [STDERR] at
org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120)
12:15:51,422 ERROR [STDERR] at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
12:15:51,422 ERROR [STDERR] at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
12:15:51,422 ERROR [STDERR] at
javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
12:15:51,422 ERROR [STDERR] at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
12:15:51,422 ERROR [STDERR] at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
12:15:51,422 ERROR [STDERR] at
javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
12:15:51,422 ERROR [STDERR] at
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
12:15:51,422 ERROR [STDERR] at
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
12:15:51,422 ERROR [STDERR] at
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
12:15:51,422 ERROR [STDERR] at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
12:15:51,422 ERROR [STDERR] at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
12:15:51,422 ERROR [STDERR] at
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
12:15:51,422 ERROR [STDERR] at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
12:15:51,422 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
12:15:51,422 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.web.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:42)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:15:51,422 ERROR [STDERR] at
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
12:15:51,422 ERROR [STDERR] at
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
12:15:51,422 ERROR [STDERR] at
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
12:15:51,422 ERROR [STDERR] at
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
12:15:51,422 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
12:15:51,422 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
12:15:51,422 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
12:15:51,422 ERROR [STDERR] at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
12:15:51,422 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
12:15:51,422 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
12:15:51,422 ERROR [STDERR] at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
12:15:51,422 ERROR [STDERR] at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
12:15:51,422 ERROR [STDERR] at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
12:15:51,422 ERROR [STDERR] at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
12:15:51,422 ERROR [STDERR] at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
12:15:51,422 ERROR [STDERR] at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
12:15:51,422 ERROR [STDERR] at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
12:15:51,422 ERROR [STDERR] at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
12:15:51,422 ERROR [STDERR] at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
12:15:51,422 ERROR [STDERR] at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
12:15:51,422 ERROR [STDERR] at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
12:15:51,422 ERROR [STDERR] at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
12:15:51,422 ERROR [STDERR] at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
12:15:51,422 ERROR [STDERR] at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
12:15:51,422 ERROR [STDERR] at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
12:15:51,422 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
12:15:51,422 ERROR [STDERR] Caused by: org.hibernate.exception.SQLGrammarException: could
not execute query
12:15:51,422 ERROR [STDERR] at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
12:15:51,422 ERROR [STDERR] at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
12:15:51,422 ERROR [STDERR] at org.hibernate.loader.Loader.doList(Loader.java:2235)
12:15:51,422 ERROR [STDERR] at
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
12:15:51,422 ERROR [STDERR] at org.hibernate.loader.Loader.list(Loader.java:2124)
12:15:51,422 ERROR [STDERR] at
org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
12:15:51,422 ERROR [STDERR] at
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
12:15:51,422 ERROR [STDERR] at
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
12:15:51,422 ERROR [STDERR] at
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1149)
12:15:51,422 ERROR [STDERR] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
12:15:51,422 ERROR [STDERR] at
org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)
12:15:51,422 ERROR [STDERR] ... 100 more
12:15:51,422 ERROR [STDERR] Caused by: com.microsoft.sqlserver.jdbc.SQLServerException:
Conversion failed when converting the varchar value 'invoiceId' to data type int.
12:15:51,422 ERROR [STDERR] at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
12:15:51,422 ERROR [STDERR] at
com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(SQLServerResultSet.java:4700)
12:15:51,422 ERROR [STDERR] at
com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResultSet.java:1683)
12:15:51,422 ERROR [STDERR] at
com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:956)
12:15:51,422 ERROR [STDERR] at
org.jboss.resource.adapter.jdbc.WrappedResultSet.next(WrappedResultSet.java:1196)
12:15:51,422 ERROR [STDERR] at org.hibernate.loader.Loader.doQuery(Loader.java:720)
12:15:51,422 ERROR [STDERR] at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
12:15:51,422 ERROR [STDERR] at org.hibernate.loader.Loader.doList(Loader.java:2232)
12:15:51,422 ERROR [STDERR] ... 108 more
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/543909#543909]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]