zl921119 发表于 2024-10-9 17:17:43

关于数据中心的查询配置问题

在查询配置中使用原生sql写个联表查询语句,通过服务列表的数据查询服务可以正常查询数据,但是通过门户的数据源组件调用时就异常。若把动态查询条件:bxid去掉可以正常查询。。


以下是异常日志:

2024-10-09 17:14:02.034 INFO com.x.query.service.processing.schedule.HighFreqWork - high freq index work start at:2024-10-09 17:14:02, elapsed:0 minutes, total count:0, write:0, delete:0.
2024-10-09 17:14:02.145 INFO com.x.program.center.schedule.FireSchedule - fire schedule className: com.x.calendar.assemble.control.schedule.AlarmTrigger, cron: 0/30 * * * * ?, node: 127.0.0.1, application: com.x.base.core.project.x_calendar_assemble_control.
2024-10-09 17:14:02.163 INFO com.x.program.center.schedule.FireSchedule - fire schedule className: com.x.processplatform.assemble.surface.schedule.CleanKeyLock, cron: 2 0/2 * * * ?, node: 127.0.0.1, application: com.x.base.core.project.x_processplatform_assemble_surface.
2024-10-09 17:14:03.169 INFO com.x.calendar.assemble.control.schedule.AlarmTrigger - The trigger for calendar alarm execute completed.Wed Oct 09 17:14:03 GMT+08:00 2024
2024-10-09 17:14:45.271 ERROR com.x.query.assemble.surface.jaxrs.statement.StatementAction - id:7f53751c-4567-4aea-98d6-1c6dbf39808f, name:com.x.query.assemble.surface.jaxrs.statement.StatementAction, message:Syntax error in SQL statement "select a.xbxid bxid, a.xczxx czxx,a.xczr czr,a.xcreatetime czsj,b.xtitle title from QRY_DYN_CAOZUOBIAO a inner join QRY_DYN_BAOXIAOTABLE b on b.xid = a.xbxid\000d\000a where a.xbxid = [*]:bxid"; expected "ALL (, ANY (, SOME ("; SQL statement:
select a.xbxid bxid, a.xczxx czxx,a.xczr czr,a.xcreatetime czsj,b.xtitle title from QRY_DYN_CAOZUOBIAO a inner join QRY_DYN_BAOXIAOTABLE b on b.xid = a.xbxid
where a.xbxid = :bxid {select a.xbxid bxid, a.xczxx czxx,a.xczr czr,a.xcreatetime czsj,b.xtitle title from QRY_DYN_CAOZUOBIAO a inner join QRY_DYN_BAOXIAOTABLE b on b.xid = a.xbxid
where a.xbxid = :bxid} , exception:org.apache.openjpa.persistence.PersistenceException, id:7f53751c-4567-4aea-98d6-1c6dbf39808f, name:com.x.query.assemble.surface.jaxrs.statement.StatementAction, message:Syntax error in SQL statement "select a.xbxid bxid, a.xczxx czxx,a.xczr czr,a.xcreatetime czsj,b.xtitle title from QRY_DYN_CAOZUOBIAO a inner join QRY_DYN_BAOXIAOTABLE b on b.xid = a.xbxid\000d\000a where a.xbxid = [*]:bxid"; expected "ALL (, ANY (, SOME ("; SQL statement:
select a.xbxid bxid, a.xczxx czxx,a.xczr czr,a.xcreatetime czsj,b.xtitle title from QRY_DYN_CAOZUOBIAO a inner join QRY_DYN_BAOXIAOTABLE b on b.xid = a.xbxid
where a.xbxid = :bxid {select a.xbxid bxid, a.xczxx czxx,a.xczr czr,a.xcreatetime czsj,b.xtitle title from QRY_DYN_CAOZUOBIAO a inner join QRY_DYN_BAOXIAOTABLE b on b.xid = a.xbxid
where a.xbxid = :bxid} , exception:org.apache.openjpa.persistence.PersistenceException, person:任我行@renwoxing@P, method:POST, request:http://localhost/x_query_assemble_surface/jaxrs/statement/ee9bdd71-5139-4b7a-a859-559c6bbe3ee6/execute/mode/data/page/1/size/100?v=-4a1e76a&m21mxyif, remoteHost:, emoteAddr:, head:Origin:http://localhost
Cookie:remember={%22username%22:%22admin%22%2C%22password%22:%22a6mypNFi1vSWclMymTpw4g==%22}; menu-tour=skipped; user-tour=skipped; x-token=_SMoM4ELG5cLWu75jyKBwkc-k5qdXMLsaaiquUzBy07vBKSQ_tjbbExY51O3gx3YmfJxmllR9whmE7APzhKp_alcaeE6TrW_
Accept:text/html,application/json,*/*
Connection:keep-alive
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 SLBrowser/9.0.3.5211 SLBChan/133
Referer:http://localhost/x_desktop/index.html
Sec-Fetch-Site:same-origin
Sec-Fetch-Dest:empty
Host:localhost
Accept-Encoding:gzip, deflate, br
Sec-Fetch-Mode:cors
Authorization:_SMoM4ELG5cLWu75jyKBwmWC9MzSVwAraaiquUzBy07vBKSQ_tjbbExY51O3gx3YmfJxmllR9whmE7APzhKp_alcaeE6TrW_
sec-ch-ua:"Chromium";v="9", "Not?A_Brand";v="8"
sec-ch-ua-mobile:?0
sec-ch-ua-platform:"Windows"
Accept-Language:zh-CN
Content-Length:47
Content-Type:application/json; charset=UTF-8, body:{
"bxid": "b388f78b-cf76-47c6-a32b-4d62b683239a"
}..
org.apache.openjpa.persistence.PersistenceException: Syntax error in SQL statement "select a.xbxid bxid, a.xczxx czxx,a.xczr czr,a.xcreatetime czsj,b.xtitle title from QRY_DYN_CAOZUOBIAO a inner join QRY_DYN_BAOXIAOTABLE b on b.xid = a.xbxid\000d\000a where a.xbxid = [*]:bxid"; expected "ALL (, ANY (, SOME ("; SQL statement:
select a.xbxid bxid, a.xczxx czxx,a.xczr czr,a.xcreatetime czsj,b.xtitle title from QRY_DYN_CAOZUOBIAO a inner join QRY_DYN_BAOXIAOTABLE b on b.xid = a.xbxid
where a.xbxid = :bxid {select a.xbxid bxid, a.xczxx czxx,a.xczr czr,a.xcreatetime czsj,b.xtitle title from QRY_DYN_CAOZUOBIAO a inner join QRY_DYN_BAOXIAOTABLE b on b.xid = a.xbxid
where a.xbxid = :bxid}
      at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:5326) ~
      at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:5286) ~
      at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:134) ~
      at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:107) ~
      at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:59) ~
      at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeQuery(SQLStoreQuery.java:248) ~
      at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1059) ~
      at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:911) ~
      at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:842) ~
      at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:601) ~
      at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:297) ~
      at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:314) ~
      at com.x.query.core.express.statement.Executor.executeDataSql(Executor.java:87) ~
      at com.x.query.core.express.statement.Executor.executeData(Executor.java:55) ~
      at com.x.query.assemble.surface.jaxrs.statement.ActionExecuteV2.execute(ActionExecuteV2.java:59) ~
      at com.x.query.assemble.surface.jaxrs.statement.StatementAction.executeV2(StatementAction.java:122) ~
      at jdk.internal.reflect.GeneratedMethodAccessor454.invoke(Unknown Source) ~[?:?]
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
      at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52) ~
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124) ~
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167) ~
      at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:159) ~
      at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79) ~
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:475) ~
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:397) ~
      at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81) ~
      at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:255) ~
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248) ~
      at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244) ~
      at org.glassfish.jersey.internal.Errors.process(Errors.java:292) ~
      at org.glassfish.jersey.internal.Errors.process(Errors.java:274) ~
      at org.glassfish.jersey.internal.Errors.process(Errors.java:244) ~
      at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265) ~
      at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:234) ~
      at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684) ~
      at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394) ~
      at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346) ~
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:366) ~
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:319) ~
      at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205) ~
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763) ~
      at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1633) ~
      at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:228) ~
      at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ~
      at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609) ~
      at com.x.base.core.project.jaxrs.AnonymousCipherManagerUserJaxrsFilter.doFilter(AnonymousCipherManagerUserJaxrsFilter.java:37) ~
      at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ~
      at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1609) ~
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:561) ~
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602) ~
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~
      at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1612) ~
      at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434) ~
      at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) ~
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1582) ~
      at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349) ~
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~
      at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59) ~
      at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:716) ~
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~
      at org.eclipse.jetty.server.Server.handle(Server.java:516) ~
      at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) ~
      at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556) ~
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) ~
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273) ~
      at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~
      at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~
      at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) ~
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) ~
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) ~
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) ~
      at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375) ~
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773) ~
      at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905) ~
      at java.lang.Thread.run(Thread.java:834) ~[?:?]
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Syntax error in SQL statement "select a.xbxid bxid, a.xczxx czxx,a.xczr czr,a.xcreatetime czsj,b.xtitle title from QRY_DYN_CAOZUOBIAO a inner join QRY_DYN_BAOXIAOTABLE b on b.xid = a.xbxid\000d\000a where a.xbxid = [*]:bxid"; expected "ALL (, ANY (, SOME ("; SQL statement:
select a.xbxid bxid, a.xczxx czxx,a.xczr czr,a.xcreatetime czsj,b.xtitle title from QRY_DYN_CAOZUOBIAO a inner join QRY_DYN_BAOXIAOTABLE b on b.xid = a.xbxid
where a.xbxid = :bxid {select a.xbxid bxid, a.xczxx czxx,a.xczr czr,a.xcreatetime czsj,b.xtitle title from QRY_DYN_CAOZUOBIAO a inner join QRY_DYN_BAOXIAOTABLE b on b.xid = a.xbxid
where a.xbxid = :bxid}
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:219) ~
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:199) ~
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$000(LoggingConnectionDecorator.java:58) ~
      at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:252) ~
      at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:138) ~
      at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator$ConfiguringConnection.prepareStatement(ConfiguringConnectionDecorator.java:144) ~
      at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:138) ~
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$RefCountConnection.prepareStatement(JDBCStoreManager.java:1699) ~
      at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:127) ~
      at org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:517) ~
      at org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:497) ~
      at org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:486) ~
      at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.prepareStatement(SQLStoreQuery.java:310) ~
      at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeQuery(SQLStoreQuery.java:217) ~
      ... 76 more
2024-10-09 17:15:02.035 INFO com.x.query.service.processing.schedule.HighFreqDocument - high freq index document start at:2024-10-09 17:15:02, elapsed:0 minutes, total count:0, write:0, delete:0.
2024-10-09 17:15:02.036 INFO com.x.query.service.processing.schedule.HighFreqWorkCompleted - high freq index workCompleted start at:2024-10-09 17:15:02, elapsed:0 minutes, total count:0, write:0, delete:0.


xadmin 发表于 2024-10-10 09:41:41

您请求正文写错了,需要return {"parameter":{"参数1":"value1","参数2":"value2"}}

zl921119 发表于 2024-10-10 11:11:20

谢谢,改成这个格式以后就正常了

xadmin 发表于 2024-10-12 10:27:37

zl921119 发表于 2024-10-10 11:11
谢谢,改成这个格式以后就正常了

:handshake
页: [1]
查看完整版本: 关于数据中心的查询配置问题