at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:744)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:215)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:809)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1038)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:849)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3338)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3444)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:168)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:168)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.ibatis.common.jdbc.logging.PreparedStatementLogProxy.invoke(PreparedStatementLogProxy.java:62)
at $Proxy27.execute(Unknown Source)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:185)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
... 89 more
[2012-03-13 14:17:52]-[DEBUG] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:57)
Forwarding to location /WEB-INF/page/manage/common/exception.jsp
[2012-03-13 14:17:52]-[DEBUG] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:57)
Entering nullPropertyValue [target=[com.itenp.gen.action.ExceptionAction@1566060, com.opensymphony.xwork2.interceptor.ExceptionHolder@1d1695e, com.itenp.bymis.action.JFZDAction@1f4c4a3, com.opensymphony.xwork2.DefaultTextProvider@16c2c0], property=org]
[2012-03-13 14:17:52]-[DEBUG] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:57)
after Locale=zh_CN
[2012-03-13 14:17:52]-[DEBUG] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:57)
intercept }
[2012-03-13 14:17:52]-[DEBUG] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(CommonsLogger.java:57)
Entering nullPropertyValue [target=[com.itenp.gen.action.ExceptionAction@1566060, com.opensymphony.xwork2.interceptor.ExceptionHolder@1d1695e, com.itenp.bymis.action.JFZDAction@1f4c4a3, com.opensymphony.xwork2.DefaultTextProvider@16c2c0], property=__cleanup_recursion_counter]
6 个解决方案
#1
内部错误代码,伤不起。JDBC的jar包与数据库不匹配?
#2
但是 条件改成死的就不报错啊
select rownum ,row_number() over(partition by w.areaid order by w.areaid , w.winid )t_row,(CASE when GROUPING(rownum)= '1'
and GROUPING(w.areaid)='1' then '总计' WHEN GROUPING(rownum)='1' THEN '小计'
else w.areaid||'_'||w.winid
END )dsdid ,sum( case w.fkqk when '0' then nvl(q.yxps,0) else '0' end )as qyxps,
sum(w.yxps) wyxps,sum( nvl(q.yxps,0) + nvl(w.yxps,0)) sumyxps,
sum(case w.fkqk when '0' then nvl(q.yjje,0.0) else 0 end) qyjje,sum(nvl(w.yjje,0)) wyjje,
sum(case q.yjje when 0 then w.yjje else nvl(q.yjje,0)+nvl(w.yjje,0) end) sumyjje ,sum(case w.fkqk when '0'
then 0 else nvl(q.yjje,0)+nvl(w.yjje,0) end) as paid,
sum(case w.fkqk when '0' then nvl(q.yjje,0)+nvl(w.yjje,0) else 0 end)as poor
from
(select t_row,dsdid,ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from (
select rownum t_row,b.dsdid,a.* from xt_dsd b
,(
select ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from jfzd a
)a where b.area=a.area(+) and b.winid=a.winid
条件 and a.area='GMK' and a.ny='201201' and a.winid='7'
)order by dsdid,winid) w
,
(select t_row,dsdid,ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk ,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from (
select rownum t_row,b.dsdid,a.* from xt_dsd b
,(
select ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from jfzd a
)a where b.area=a.area(+) and b.winid=a.winid
条件
and a.area='GMK' and a.ny='201201' and a.winid='7'
)order by dsdid,winid)q where w.dsdid=q.dsdid(+)
group by grouping sets((w.areaid,rownum,w.winid),w.areaid ,'') order by w.areaid,w.winid
select rownum ,row_number() over(partition by w.areaid order by w.areaid , w.winid )t_row,(CASE when GROUPING(rownum)= '1'
and GROUPING(w.areaid)='1' then '总计' WHEN GROUPING(rownum)='1' THEN '小计'
else w.areaid||'_'||w.winid
END )dsdid ,sum( case w.fkqk when '0' then nvl(q.yxps,0) else '0' end )as qyxps,
sum(w.yxps) wyxps,sum( nvl(q.yxps,0) + nvl(w.yxps,0)) sumyxps,
sum(case w.fkqk when '0' then nvl(q.yjje,0.0) else 0 end) qyjje,sum(nvl(w.yjje,0)) wyjje,
sum(case q.yjje when 0 then w.yjje else nvl(q.yjje,0)+nvl(w.yjje,0) end) sumyjje ,sum(case w.fkqk when '0'
then 0 else nvl(q.yjje,0)+nvl(w.yjje,0) end) as paid,
sum(case w.fkqk when '0' then nvl(q.yjje,0)+nvl(w.yjje,0) else 0 end)as poor
from
(select t_row,dsdid,ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from (
select rownum t_row,b.dsdid,a.* from xt_dsd b
,(
select ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from jfzd a
)a where b.area=a.area(+) and b.winid=a.winid
条件 and a.area='GMK' and a.ny='201201' and a.winid='7'
)order by dsdid,winid) w
,
(select t_row,dsdid,ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk ,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from (
select rownum t_row,b.dsdid,a.* from xt_dsd b
,(
select ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from jfzd a
)a where b.area=a.area(+) and b.winid=a.winid
条件
and a.area='GMK' and a.ny='201201' and a.winid='7'
)order by dsdid,winid)q where w.dsdid=q.dsdid(+)
group by grouping sets((w.areaid,rownum,w.winid),w.areaid ,'') order by w.areaid,w.winid
#3
看看数据库服务器端有没有报错 ?
检查一下你的jdbc jar与数据库服务器是同一个版本吗
检查一下你的jdbc jar与数据库服务器是同一个版本吗
#4
修改前的代码和修改后的代码贴出来对比一下吧,我猜可能是由于拼接的条件导致SQL超过了它允许的最大长度。
#5
可能是你的SQL触发了ORACLE的某个BUG,数据库版本号是什么?
解决方法:
1.安装对应的BUG补丁程序。
2.改写SQL语句,避开BUG。(你可以先从简单的SQL逐步扩展到复杂SQL,看是在哪个环节触发了BUG)
解决方法:
1.安装对应的BUG补丁程序。
2.改写SQL语句,避开BUG。(你可以先从简单的SQL逐步扩展到复杂SQL,看是在哪个环节触发了BUG)
#6
#1
内部错误代码,伤不起。JDBC的jar包与数据库不匹配?
#2
但是 条件改成死的就不报错啊
select rownum ,row_number() over(partition by w.areaid order by w.areaid , w.winid )t_row,(CASE when GROUPING(rownum)= '1'
and GROUPING(w.areaid)='1' then '总计' WHEN GROUPING(rownum)='1' THEN '小计'
else w.areaid||'_'||w.winid
END )dsdid ,sum( case w.fkqk when '0' then nvl(q.yxps,0) else '0' end )as qyxps,
sum(w.yxps) wyxps,sum( nvl(q.yxps,0) + nvl(w.yxps,0)) sumyxps,
sum(case w.fkqk when '0' then nvl(q.yjje,0.0) else 0 end) qyjje,sum(nvl(w.yjje,0)) wyjje,
sum(case q.yjje when 0 then w.yjje else nvl(q.yjje,0)+nvl(w.yjje,0) end) sumyjje ,sum(case w.fkqk when '0'
then 0 else nvl(q.yjje,0)+nvl(w.yjje,0) end) as paid,
sum(case w.fkqk when '0' then nvl(q.yjje,0)+nvl(w.yjje,0) else 0 end)as poor
from
(select t_row,dsdid,ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from (
select rownum t_row,b.dsdid,a.* from xt_dsd b
,(
select ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from jfzd a
)a where b.area=a.area(+) and b.winid=a.winid
条件 and a.area='GMK' and a.ny='201201' and a.winid='7'
)order by dsdid,winid) w
,
(select t_row,dsdid,ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk ,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from (
select rownum t_row,b.dsdid,a.* from xt_dsd b
,(
select ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from jfzd a
)a where b.area=a.area(+) and b.winid=a.winid
条件
and a.area='GMK' and a.ny='201201' and a.winid='7'
)order by dsdid,winid)q where w.dsdid=q.dsdid(+)
group by grouping sets((w.areaid,rownum,w.winid),w.areaid ,'') order by w.areaid,w.winid
select rownum ,row_number() over(partition by w.areaid order by w.areaid , w.winid )t_row,(CASE when GROUPING(rownum)= '1'
and GROUPING(w.areaid)='1' then '总计' WHEN GROUPING(rownum)='1' THEN '小计'
else w.areaid||'_'||w.winid
END )dsdid ,sum( case w.fkqk when '0' then nvl(q.yxps,0) else '0' end )as qyxps,
sum(w.yxps) wyxps,sum( nvl(q.yxps,0) + nvl(w.yxps,0)) sumyxps,
sum(case w.fkqk when '0' then nvl(q.yjje,0.0) else 0 end) qyjje,sum(nvl(w.yjje,0)) wyjje,
sum(case q.yjje when 0 then w.yjje else nvl(q.yjje,0)+nvl(w.yjje,0) end) sumyjje ,sum(case w.fkqk when '0'
then 0 else nvl(q.yjje,0)+nvl(w.yjje,0) end) as paid,
sum(case w.fkqk when '0' then nvl(q.yjje,0)+nvl(w.yjje,0) else 0 end)as poor
from
(select t_row,dsdid,ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from (
select rownum t_row,b.dsdid,a.* from xt_dsd b
,(
select ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from jfzd a
)a where b.area=a.area(+) and b.winid=a.winid
条件 and a.area='GMK' and a.ny='201201' and a.winid='7'
)order by dsdid,winid) w
,
(select t_row,dsdid,ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk ,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from (
select rownum t_row,b.dsdid,a.* from xt_dsd b
,(
select ny,rq,zq,area,areaid,winid,qps,xsps,yxps,
nvl(yjje,0.0) yjje,fkqk,bz,nvl(sp1,0) sp1,sp2,sp3,sp4,
sp5,sp6,sp7,sp8,sp9,sp10 from jfzd a
)a where b.area=a.area(+) and b.winid=a.winid
条件
and a.area='GMK' and a.ny='201201' and a.winid='7'
)order by dsdid,winid)q where w.dsdid=q.dsdid(+)
group by grouping sets((w.areaid,rownum,w.winid),w.areaid ,'') order by w.areaid,w.winid
#3
看看数据库服务器端有没有报错 ?
检查一下你的jdbc jar与数据库服务器是同一个版本吗
检查一下你的jdbc jar与数据库服务器是同一个版本吗
#4
修改前的代码和修改后的代码贴出来对比一下吧,我猜可能是由于拼接的条件导致SQL超过了它允许的最大长度。
#5
可能是你的SQL触发了ORACLE的某个BUG,数据库版本号是什么?
解决方法:
1.安装对应的BUG补丁程序。
2.改写SQL语句,避开BUG。(你可以先从简单的SQL逐步扩展到复杂SQL,看是在哪个环节触发了BUG)
解决方法:
1.安装对应的BUG补丁程序。
2.改写SQL语句,避开BUG。(你可以先从简单的SQL逐步扩展到复杂SQL,看是在哪个环节触发了BUG)