weixin_50731961
走向秃头的觉
采纳率37.5%
2020-12-10 18:45 阅读 19
已采纳

Cause: java.sql.SQLException: ORA-01013

5
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred while applying a parameter map.  
--- Check the updateEcUserfacctfreezzlogByPK-InlineParameterMap.  
--- Check the statement (update failed).  
--- Cause: java.sql.SQLException: ORA-01013: 用户请求取消当前的操作

        at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
        at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:505)
        at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessionImpl.java:90)
        at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.update(SqlMapClientImpl.java:67)
        at com.commsoft.sys.dbcommon.dao.EcUserfacctfreezzlogDAO.updateEcUserfacctfreezzlogByPK(EcUserfacctfreezzlogDAO.java:62)
        at com.commsoft.sys.useraccount.service.UserAccountService.updateCardChange(UserAccountService.java:1336)
        at com.commsoft.sys.useraccount.service.UserAccountService$$FastClassByCGLIB$$e570be4.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
        at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)
        at com.commsoft.sys.useraccount.service.UserAccountService$$EnhancerByCGLIB$$bdabe772.updateCardChange(<generated>)
        at com.commsoft.sys.useraccount.struts.action.UserAccountAction.cardChange(UserAccountAction.java:1073)
        at sun.reflect.GeneratedMethodAccessor1736.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:892)
        at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1294)
        at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)
        at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:117)
        at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:108)
        at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1370)
        at ognl.ASTMethod.getValueBody(ASTMethod.java:91)
        at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
        at ognl.SimpleNode.getValue(SimpleNode.java:258)
        at ognl.Ognl.getValue(Ognl.java:467)
        at ognl.Ognl.getValue(Ognl.java:431)
        at com.opensymphony.xwork2.ognl.OgnlUtil$3.execute(OgnlUtil.java:352)
        at com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecuteMethod(OgnlUtil.java:404)
        at com.opensymphony.xwork2.ognl.OgnlUtil.callMethod(OgnlUtil.java:350)
        at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:430)
        at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:290)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:251)
        at org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
        at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
        at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
        at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
        at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:76)
        at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
        at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245)
        at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
:

项目框架是spring ,数据库是oracle , sql语句在下面,事务是spring管理的.想知道这个bug是什么情况下产生的.

 

update ec_userfacctfreezzlog set id = #id#
        <dynamic>
            <isNotNull prepend="," property="cardcode">
                cardcode = #cardcode#
            </isNotNull>
            <isNotNull prepend="," property="cardsn">
                cardsn = #cardsn#
            </isNotNull>
            <isNotNull prepend="," property="money">
                money = #money#
            </isNotNull>
            <isNotNull prepend="," property="state">
                state = #state#
            </isNotNull>
            <isNotNull prepend="," property="remark">
                remark = #remark#
            </isNotNull>
            <isNotNull prepend="," property="blackstate">
                blackstate = #blackstate#
            </isNotNull>
            <isNotNull prepend="," property="blacktime">
                blacktime = #blacktime#
            </isNotNull>
            <isNotNull prepend="," property="remark1">
                remark1 = #remark1#
            </isNotNull>
            <isNotNull prepend="," property="datastate">
                datastate = #datastate#
            </isNotNull>
            <isNotNull prepend="," property="datatime">
                datatime = #datatime#
            </isNotNull>
            <isNotNull prepend="," property="remark2">
                remark2 = #remark2#
            </isNotNull>
            <isNotNull prepend="," property="balanstate">
                balanstate = #balanstate#
            </isNotNull>
            <isNotNull prepend="," property="balantime">
                balantime = #balantime#
            </isNotNull>
            <isNotNull prepend="," property="remark3">
                remark3 = #remark3#
            </isNotNull>
        </dynamic>
        where id = #id#
    </update>
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

16条回答 默认 最新

  • 已采纳
    qq_40693603 sinJack 2020-12-11 10:34

    bug什么原因导致的,给你解释了。没啥问题,采纳一下吧

    点赞 评论 复制链接分享
  • qq_40693603 sinJack 2020-12-10 19:14

    Cause: java.sql.SQLException: ORA-01013: 用户请求取消当前的操作

    不是提示了吗

    点赞 评论 复制链接分享
  • qq_40693603 sinJack 2020-12-10 19:15

     解决方法 修改timeout

    点赞 评论 复制链接分享
  • qq_40693603 sinJack 2020-12-10 19:19

    .sql执行的时间大于设置的超时时间

    点赞 评论 复制链接分享
  • weixin_50731961 走向秃头的觉 2020-12-11 09:26

    我这bug是什么意思,我设置的是3秒钟的执行时间对于一个单表语句来说够了,我就是想知道为啥会出现这种一个单表用主键ID做判断条件的语句会执行这么久的情况,也不是每次都出现,一天出现个4次左右。

    点赞 评论 复制链接分享
  • weixin_50731961 走向秃头的觉 2020-12-11 09:27

    生产环境,liunx系统

    点赞 评论 复制链接分享
  • qq_40693603 sinJack 2020-12-11 09:32

    3s?太少了啊。如果用户少来说是没问题。可是会存在并发问题,导致锁表现象。

    点赞 评论 复制链接分享
  • qq_40693603 sinJack 2020-12-11 09:32

    出现几次,是因为并发问题。

    点赞 评论 复制链接分享
  • qq_40693603 sinJack 2020-12-11 09:51

    数据库有事务控制。为了保证数据的安全性。有表锁和行锁的机制。

    点赞 评论 复制链接分享
  • qq_40693603 sinJack 2020-12-11 09:51

    当多个请求同时操作同一张表或同一条记录的时候,多个请求是依次等待进行操作的。

    点赞 评论 复制链接分享
  • weixin_50731961 走向秃头的觉 2020-12-11 09:54

    库里面那张表才两万多数据,也不多啊,如果设置太久平台页面用户会有明显的等待时间

    点赞 评论 复制链接分享
  • qq_40693603 sinJack 2020-12-11 09:55

    设置的只是超时时间,如果这个sql处理所需要的响应时间确实很长,那也没办法的

    点赞 评论 复制链接分享
  • qq_40693603 sinJack 2020-12-11 09:56

    这跟抢票一样。一直打转等待中

    点赞 评论 复制链接分享
  • qq_40693603 sinJack 2020-12-11 09:57

    跟数据多不多没关系,跟同一时刻多个用户操作了同一条数据,造成的影响。

    点赞 评论 复制链接分享
  • weixin_50731961 走向秃头的觉 2020-12-11 10:10

    有什么办法能确定同一时刻是否有多个用户操作同一条数据吗?

    点赞 评论 复制链接分享
  • qq_40693603 sinJack 2020-12-11 10:18

    这个得看数据库中有没有相关操作的记录了。具体能不能查,我不太清楚。

    点赞 评论 复制链接分享

相关推荐