Group_concat in a Custom query

1
0
-1

I'm having a difficulty regarding creating a custom query in my development environment, I did the following query:

  1. SELECT
  2. o.codigoChamado,
  3. o.codigoOrcamento,
  4. group_concat(o.conteudoOrcamento separator ','),
  5. o.observacaoOrcamento
  6. FROM
  7. Orcamentos as o
  8. group by
  9. o.codigoChamado,
  10. o.codigoOrcamento,
  11. o.observacaoOrcamento
  12. order by
  13. o.codigoOrcamento

When I execute this query in the Browse Data of the H2 console I get the desired return, however when I try to create a custom query with this command this gives the following error:

  1. An error occurred while deploying the Business Data Model in engine
  2. org.bonitasoft.engine.api.HTTPServerAPI.invokeMethod(HTTPServerAPI.java:143)
  3. org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:86)
  4. com.sun.proxy.$Proxy31.resume(Unknown Source)
  5. org.bonitasoft.studio.businessobject.core.operation.DeployBDMOperation.doDeployBDM(DeployBDMOperation.java:138)
  6. org.bonitasoft.studio.businessobject.core.operation.DeployBDMOperation.run(DeployBDMOperation.java:88)
  7. org.bonitasoft.studio.businessobject.ui.wizard.ManageBusinessDataModelWizard$2.run(ManageBusinessDataModelWizard.java:188)
  8. org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
  9. < ========== Beginning of the server stack trace ========== >. ( )
  10. org.bonitasoft.engine.api.impl.TenantAdministrationAPIImpl.handleResult(TenantAdministrationAPIImpl.java:200)
  11. org.bonitasoft.engine.api.impl.TenantAdministrationAPIImpl.setTenantClassloaderAndUpdateStateOfTenantServicesWithLifecycle(TenantAdministrationAPIImpl.java:184)
  12. org.bonitasoft.engine.api.impl.TenantAdministrationAPIImpl.resumeServicesForTenant(TenantAdministrationAPIImpl.java:165)
  13. org.bonitasoft.engine.api.impl.TenantAdministrationAPIImpl.setTenantPaused(TenantAdministrationAPIImpl.java:128)
  14. org.bonitasoft.engine.api.impl.TenantAdministrationAPIImpl.resume(TenantAdministrationAPIImpl.java:100)
  15. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  16. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  17. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  18. java.lang.reflect.Method.invoke(Method.java:498)
  19. org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:462)
  20. org.bonitasoft.engine.api.impl.ServerAPIImpl$2.call(ServerAPIImpl.java:431)
  21. org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:274)
  22. org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPIInTransaction(ServerAPIImpl.java:438)
  23. org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:272)
  24. org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:124)
  25. org.bonitasoft.engine.api.internal.servlet.HttpAPIServletCall.doPost(HttpAPIServletCall.java:112)
  26. org.bonitasoft.engine.api.internal.servlet.HttpAPIServlet.doPost(HttpAPIServlet.java:35)
  27. javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
  28. javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
  29. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
  30. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  31. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  32. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  33. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  34. org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
  35. org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
  36. org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
  37. org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
  38. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  39. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  40. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
  41. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
  42. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
  43. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
  44. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  45. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
  46. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
  47. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)
  48. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
  49. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
  50. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  51. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  52. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  53. java.lang.Thread.run(Thread.java:745)
  54. Caused by: javax.persistence.PersistenceException.: Unable to build entity manager factory ( )
  55. org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:83)
  56. org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:54)
  57. javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
  58. org.bonitasoft.engine.business.data.impl.JPABusinessDataRepositoryImpl.createEntityManagerFactory(JPABusinessDataRepositoryImpl.java:97)
  59. org.bonitasoft.engine.business.data.impl.JPABusinessDataRepositoryImpl.start(JPABusinessDataRepositoryImpl.java:91)
  60. org.bonitasoft.engine.business.data.impl.JPABusinessDataRepositoryImpl.resume(JPABusinessDataRepositoryImpl.java:146)
  61. org.bonitasoft.engine.api.impl.transaction.ResumeServiceStrategy.changeState(ResumeServiceStrategy.java:33)
  62. org.bonitasoft.engine.api.impl.transaction.SetServiceState.call(SetServiceState.java:79)
  63. org.bonitasoft.engine.api.impl.transaction.SetServiceState.call(SetServiceState.java:40)
  64. org.bonitasoft.engine.service.impl.BroadcastServiceLocal.executeOnAllNodes(BroadcastServiceLocal.java:65)
  65. org.bonitasoft.engine.api.impl.TenantAdministrationAPIImpl.setTenantClassloaderAndUpdateStateOfTenantServicesWithLifecycle(TenantAdministrationAPIImpl.java:183)
  66. ... 42 more. ( )
  67. Caused by: java.lang.NullPointerException.: null ( )
  68. org.hibernate.hql.internal.antlr.HqlBaseParser.identPrimary(HqlBaseParser.java:4285)
  69. org.hibernate.hql.internal.antlr.HqlBaseParser.primaryExpression(HqlBaseParser.java:980)
  70. org.hibernate.hql.internal.antlr.HqlBaseParser.atom(HqlBaseParser.java:3609)
  71. org.hibernate.hql.internal.antlr.HqlBaseParser.unaryExpression(HqlBaseParser.java:3387)
  72. org.hibernate.hql.internal.antlr.HqlBaseParser.multiplyExpression(HqlBaseParser.java:3259)
  73. org.hibernate.hql.internal.antlr.HqlBaseParser.additiveExpression(HqlBaseParser.java:2964)
  74. org.hibernate.hql.internal.antlr.HqlBaseParser.concatenation(HqlBaseParser.java:597)
  75. org.hibernate.hql.internal.antlr.HqlBaseParser.relationalExpression(HqlBaseParser.java:2730)
  76. org.hibernate.hql.internal.antlr.HqlBaseParser.equalityExpression(HqlBaseParser.java:2591)
  77. org.hibernate.hql.internal.antlr.HqlBaseParser.negatedExpression(HqlBaseParser.java:2555)
  78. org.hibernate.hql.internal.antlr.HqlBaseParser.logicalAndExpression(HqlBaseParser.java:2471)
  79. org.hibernate.hql.internal.antlr.HqlBaseParser.logicalOrExpression(HqlBaseParser.java:2436)
  80. org.hibernate.hql.internal.antlr.HqlBaseParser.expression(HqlBaseParser.java:2146)
  81. org.hibernate.hql.internal.antlr.HqlBaseParser.aliasedExpression(HqlBaseParser.java:2389)
  82. org.hibernate.hql.internal.antlr.HqlBaseParser.selectedPropertiesList(HqlBaseParser.java:1422)
  83. org.hibernate.hql.internal.antlr.HqlBaseParser.selectClause(HqlBaseParser.java:1325)
  84. org.hibernate.hql.internal.antlr.HqlBaseParser.selectFrom(HqlBaseParser.java:1062)
  85. org.hibernate.hql.internal.antlr.HqlBaseParser.queryRule(HqlBaseParser.java:731)
  86. org.hibernate.hql.internal.antlr.HqlBaseParser.selectStatement(HqlBaseParser.java:323)
  87. org.hibernate.hql.internal.antlr.HqlBaseParser.statement(HqlBaseParser.java:186)
  88. org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:295)
  89. org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:203)
  90. org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:158)
  91. org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:131)
  92. org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:93)
  93. org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:167)
  94. org.hibernate.internal.NamedQueryRepository.checkNamedQueries(NamedQueryRepository.java:161)
  95. org.hibernate.internal.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:1090)
  96. org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:536)
  97. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859)
  98. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:857)
  99. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)
  100. org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:425)
  101. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:849)
  102. org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:75)
  103. ... 52 more. ( )

Has this ever happened to you? Is there any way to resolve this?
My goal is simply to group the field conteudoOrcamento

Thank you so much for everything

No answers yet.
Notifications