永洪社区
标题: 丢弃空的参数 [打印本页]
作者: 这个人_PNl2A 时间: 2019-5-17 18:38
标题: 丢弃空的参数
界面也没有报错,刷新sql就报错
作者: 这个人_PNl2A 时间: 2019-5-20 10:06
大神解答
作者: 这个人_PNl2A 时间: 2019-5-20 10:09
2019-05-20 09:19:40.777 |-999760-7b1217cdf9744931a66af86ad33ba6a2 |-[ERROR] |-g5.sv.qry.QueryProc.procReq(QueryProc.java:187) | g5.qry.sql.SQLQuery@7f11d146 丢弃空的参数失败: “p_date” in “ SELECT data_date,
ind_id,inst_no,
current_value/100,
last_month_value,last_quarter_value,last_year_value
FROM adm_9909.T_STD_IND_DATA_DAY
WHERE IND_ID='IND000000326'
AND data_date <= to_date(?{p_date} ,'yyyy-MM-dd')
AND data_date >= to_date(?{p_date},'yyyy-MM-dd') -INTERVAL'90days'”。
java.lang.RuntimeException: g5.qry.sql.SQLQuery@7f11d146 丢弃空的参数失败: “p_date” in “ SELECT data_date,
ind_id,inst_no,
current_value/100,
last_month_value,last_quarter_value,last_year_value
FROM adm_9909.T_STD_IND_DATA_DAY
WHERE IND_ID='IND000000326'
AND data_date <= to_date(?{p_date} ,'yyyy-MM-dd')
AND data_date >= to_date(?{p_date},'yyyy-MM-dd') -INTERVAL'90days'”。
at g5.qry.sql.SQLQuery.replaceParam(SQLQuery.java:636)
at g5.qry.sql.AbsSQLExecutor.paramProcessedSQL(AbsSQLExecutor.java:469)
at g5.qry.sql.AbsSQLExecutor.fixMetaSql(AbsSQLExecutor.java:494)
at g5.qry.sql.AbsSQLExecutor.metaColsQry(AbsSQLExecutor.java:368)
at g5.qry.sql.AbsSQLExecutor.metaCols(AbsSQLExecutor.java:294)
at g5.qry.sql.SQLQuery.metaCols(SQLQuery.java:71)
at g5.sv.qry.req.GetQryMetaReq.process0(GetQryMetaReq.java:80)
at g5.sv.Req.process(Req.java:37)
at g5.sv.qry.impl.QueryServiceImpl.process(QueryServiceImpl.java:172)
at g5.sv.qry.QueryProc.procReq(QueryProc.java:140)
at g5.sv.qry.QueryProc.service(QueryProc.java:58)
at g5.sv.ServletHelper.service(ServletHelper.java:94)
at g5.sv.PortalServlet.service(PortalServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
at g5.sv.standardsso.SSOLoginFilter.doFilter(SSOLoginFilter.java:105)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
at weblogic.websocket.tyrus.TyrusServletFilter.doFilter(TyrusServletFilter.java:274)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3706)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3672)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:328)
at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2443)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2291)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2269)
at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1705)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1665)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:272)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:652)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:420)
作者: 永洪tech-Lan 时间: 2019-5-20 10:32
本帖最后由 永洪tech-Lan 于 2019-5-20 10:34 编辑
是你sql中有参数p_date导致的,两种方法解决:
1、修改参数为丢弃空参数的写法--标签形式:<参数> 字段=?{参数} </参数>
2、数据集编辑参数中给参数一个默认值。参考截图:
(, 下载次数: 283)