com.ibm.websphere.ce.cm.staleconnectionexception:io错误:在oracledb上用pdf更新记录时连接重置

ezykj2lf  于 2021-07-13  发布在  Java
关注(0)|答案(1)|浏览(461)

我们有一个java后端,由Spring3.2.17提供支持,它部署在属于客户的WebSphereLiberty应用服务器中,所以我没有访问它的权限。
我们试图在oracledb中创建一个记录,以便插入从外部服务下载的pdf。此信息作为字节[]返回。
这是我们正在使用的upsert查询,通过mybatis-spring

<update id="upsert">
MERGE INTO T_PDF PDF USING dual ON(PDF.CODICE_FISCALE = #{codiceFiscale} AND PDF.ID_PRATICA= #{idPratica})
            WHEN MATCHED THEN
            UPDATE SET
            DATA_UPDATE = SYSDATE
            <if test="nome != null and nome != ''" >
            , NOME = #{nome}
            </if>
            <if test="cognome != null and cognome != ''" >
            , COGNOME = #{cognome}
            </if>
            <if test="owner != null and owner != ''" >
            ,OWNER = #{owner}
            </if>
            <if test="isPrincipale != null and isPrincipale != ''" >
            ,IS_PRINCIPALE = #{isPrincipale}
            </if>
            <if test="isCensito != null and isCensito != ''" >
            , IS_CENSITO = #{isCensito}
            </if>
            <if test="stato!= null and stato != ''" >
            , STATO = #{stato}
            </if>
            <if test="unico != null and unico != ''" >
            , UNICO = #{unico}
            </if>
            <if test="consulenza!= null and consulenza != ''" >
            , CONSULENZA = #{consulenza}
            </if>
            <if test="mifid != null and mifid != ''" >
            , MIFID = #{mifid}
            </if>
            <if test="seiPdf != null and seiPdf != ''" >
            , SEI_PDF = #{seiPdf}
            </if>
            <if test="seiCommAtt != null and seiCommAtt != ''" >
            , SEI_COMM_ATT = #{seiCommAtt}
            </if>
            <if test="seiCommPer != null and seiCommPer != ''" >
            , SEI_COMM_PER = #{seiCommPer}
            </if>
            <if test="seiRicFatt!= null and seiRicFatt != ''" >
            , SEI_RIC_FATT = #{seiRicFatt}
            </if>
            <if test="apertura != null and apertura != ''" >
            , APERTURA = #{apertura}
            </if>
            <if test="miniQav != null and miniQav != ''" >
            , MINI_QAV = #{miniQav }
            </if>
            <if test="sintesi != null and sintesi != ''" >
            , SINTESI = #{sintesi}
            </if>
            <if test="informativo != null and informativo != ''" >
            , INFORMATIVO = #{informativo}
            </if>
            <if test="cambioIndirizzo != null and cambioIndirizzo != ''" >
            , CAMBIO_INDIRIZZO = #{cambioIndirizzo}
            </if>
            <if test="cambioInfo != null and cambioInfo != ''" >
            , CAMBIO_INFO= #{cambioInfo}
            </if>
            <if test="cambioIndirizzoEinfo != null and cambioIndirizzoEinfo != ''" >
            , CAMBIO_INDIRIZZO_E_INFO = #{cambioIndirizzoEinfo}
            </if>
            <if test="qavPb != null and qavPb != ''" >
            , QAV_PB = #{qavPb}
            </if>
            <if test="variazionePrivacy != null and variazionePrivacy != ''" >
            , VARIAZIONE_PRIVACY = #{variazionePrivacy}
            </if>
            <if test="trasferimentoQuote != null and trasferimentoQuote != ''" >
            , TRASFERIMENTO_QUOTE = #{trasferimentoQuote}
            </if>
            <if test="disposizioneMiniQav != null and disposizioneMiniQav != ''" >
            , DISPOSIZIONE_MINIQAV = #{disposizioneMiniQav}
            </if>
            <if test="omnibus != null and omnibus != ''" >
            , OMNIBUS = #{omnibus}
            </if>
            <if test="iniziativaWelcome != null and iniziativaWelcome != ''" >
            , INIZIATIVA_WELCOME = #{iniziativaWelcome}
            </if>
            <if test="firmaADistanza != null and firmaADistanza != '' ">
            , FIRMA_A_DISTANZA = #{firmaADistanza}
            </if>
            <if test="fatca != null and fatca != '' ">
            , FATCA = #{fatca}
            </if>
            <if test="qav != null and qav != '' ">
            , QAV = #{qav}
            </if>

           WHERE CODICE_FISCALE = #{codiceFiscale}
               AND ID_PRATICA = #{idPratica}
            WHEN NOT MATCHED THEN
            INSERT(
                OWNER,
                CODICE_FISCALE,
                NOME,
                COGNOME,
                IS_PRINCIPALE,
                IS_CENSITO,
                STATO,
                UNICO,
                CONSULENZA,
                MIFID,
                SEI_PDF,
                SEI_COMM_ATT,
                SEI_COMM_PER,
                SEI_RIC_FATT,
                APERTURA,
                MINI_QAV,
                SINTESI,
                INFORMATIVO,
                CAMBIO_INDIRIZZO,
                CAMBIO_INFO,
                CAMBIO_INDIRIZZO_E_INFO,
                QAV_PB,
                INIZIATIVA_WELCOME,
                ID_PRATICA,
                DATA_UPDATE,
                VARIAZIONE_PRIVACY,
                TRASFERIMENTO_QUOTE,
                DISPOSIZIONE_MINIQAV,
                OMNIBUS,
                STEP_IN,
                FIRMA_A_DISTANZA,
                FATCA,
                QAV
            ) 
            VALUES (
                #{owner},
                #{codiceFiscale},
                #{nome},
                #{cognome},
                #{isPrincipale},
                #{isCensito},
                #{stato},
                #{unico},
                #{consulenza},
                #{mifid},
                #{seiPdf},
                #{seiCommAtt},
                #{seiCommPer},
                #{seiRicFatt},
                #{apertura},
                #{miniQav},
                #{sintesi},
                #{informativo},
                #{cambioIndirizzo},
                #{cambioInfo},
                #{cambioIndirizzoEinfo},
                #{qavPb},
                #{iniziativaWelcome},
                #{idPratica},
                SYSDATE,
                #{variazionePrivacy},
                #{trasferimentoQuote},
                #{disposizioneMiniQav},
                #{omnibus},
                #{stepIn},
                #{firmaADistanza},
                #{fatca},
                #{qav}
            )
</update>

这是我们用来插入的片段

private void savePDF(TipoAdempimentoEnum tipoDocumento, byte[] adempimento,
                     String codiceFiscale, String rete,
                     Long idPratica, Long idTrasferimentoFondi, String matricolaPb) {
    Pdf pdf = new Pdf();
    pdf.setCodiceFiscale(codiceFiscale);
    pdf.setRetePB(rete);
    pdf.setOwner(matricolaPb);

    if(tipoDocumento.toString().equalsIgnoreCase("FTC")) {
        log.info("e' stato aggiunto il pdf del FTC");
        pdf.setFatca(adempimento);
    }
    if(tipoDocumento.toString().equalsIgnoreCase("QAV")) {
        log.info("e' stato aggiunto il pdf del QAV");
        pdf.setQav(adempimento);
    }
    if(idPratica != null) {
        log.info("e' stato trovato idPratica valorizzato");
        pdf.setIdPratica(""+idPratica);
        log.info("inizio salvataggio su T_PDF per il pdf di tipo {}", tipoDocumento);
        pdfMapper.upsert(pdf);
    }
    if(idTrasferimentoFondi != null) {
        log.info("e' stato trovato idTrasferimentoFondi valorizzato");
        pdf.setIdPratica(""+idTrasferimentoFondi);
        log.info("inizio salvataggio su T_PDF_TFSA per il pdf di tipo {}", tipoDocumento);
        pdfTFSAMapper.upsert(pdf);
    }

    log.info("fine salvataggio pdf sul database");
}

但是,该操作引发以下异常

INFO  05-03-2021 21:04:09,0420 [WebContainer : 1] some.package.db.mappers.PdfMapper [T88yjcid6CT2xptDPxYD8Jr][R011031] [WEB] - DAO : upsert - ARGS: [{"codiceFiscale":"BCHCZM45S52L892G","nome":null,"cognome":null,"isPrincipale":null,"isCensito":null,"owner":"R011031","stato":null,"idPratica":"23391","dataUpdate":null,"retePB":"F"}]
ERROR 05-03-2021 21:04:10,0935 [WebContainer : 1] some.package.db.mappers.PdfMapper [T88yjcid6CT2xptDPxYD8Jr][R011031] [WEB] -

### Error updating database.  Cause: com.ibm.websphere.ce.cm.StaleConnectionException: IO Error: Connection reset

### The error may involve defaultParameterMap

### The error occurred while setting parameters

### SQL: MERGE INTO T_PDF PDF USING dual ON(PDF.CODICE_FISCALE = ? AND PDF.ID_PRATICA= ?)  WHEN MATCHED THEN  UPDATE SET DATA_UPDATE = SYSDATE                       ,OWNER = ? , FATCA = ?  WHERE CODICE_FISCALE = ? AND ID_PRATICA = ? WHEN NOT MATCHED THEN  INSERT( OWNER,CODICE_FISCALE, NOME,  COGNOME, IS_PRINCIPALE,               IS_CENSITO,  STATO,  UNICO, CONSULENZA,MIFID, SEI_PDF,SEI_COMM_ATT,               SEI_COMM_PER, SEI_RIC_FATT,  APERTURA, MINI_QAV,SINTESI,               INFORMATIVO,  CAMBIO_INDIRIZZO, CAMBIO_INFO,               CAMBIO_INDIRIZZO_E_INFO,   QAV_PB, INIZIATIVA_WELCOME,               ID_PRATICA,               DATA_UPDATE,  VARIAZIONE_PRIVACY,               TRASFERIMENTO_QUOTE,               DISPOSIZIONE_MINIQAV,               OMNIBUS,               STEP_IN,               FIRMA_A_DISTANZA,               FATCA,               QAV              )               VALUES (               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               SYSDATE,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?     )

### Cause: com.ibm.websphere.ce.cm.StaleConnectionException: IO Error: Connection reset

; SQL []; IO Error: Connection reset; nested exception is com.ibm.websphere.ce.cm.StaleConnectionException: IO Error: Connection reset
org.springframework.dao.DataAccessResourceFailureException:

### Error updating database.  Cause: com.ibm.websphere.ce.cm.StaleConnectionException: IO Error: Connection reset

### The error may involve defaultParameterMap

### The error occurred while setting parameters

### SQL: MERGE INTO T_PDF PDF USING dual ON(PDF.CODICE_FISCALE = ? AND PDF.ID_PRATICA= ?)              WHEN MATCHED THEN              UPDATE SET           DATA_UPDATE = SYSDATE                       ,OWNER = ?                                                                                                                                                                 , FATCA = ?                           WHERE CODICE_FISCALE = ?              AND ID_PRATICA = ?              WHEN NOT MATCHED THEN              INSERT(               OWNER,               CODICE_FISCALE,               NOME,               COGNOME,               IS_PRINCIPALE,               IS_CENSITO,               STATO,               UNICO,               CONSULENZA,               MIFID,               SEI_PDF,               SEI_COMM_ATT,               SEI_COMM_PER,               SEI_RIC_FATT,               APERTURA,               MINI_QAV,               SINTESI,               INFORMATIVO,               CAMBIO_INDIRIZZO,               CAMBIO_INFO,               CAMBIO_INDIRIZZO_E_INFO,               QAV_PB,               INIZIATIVA_WELCOME,               ID_PRATICA,               DATA_UPDATE,               VARIAZIONE_PRIVACY,               TRASFERIMENTO_QUOTE,               DISPOSIZIONE_MINIQAV,               OMNIBUS,               STEP_IN,               FIRMA_A_DISTANZA,               FATCA,               QAV              )               VALUES (               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               SYSDATE,               ?,               ?,               ?,               ?,               ?,               ?,               ?,               ?     )

### Cause: com.ibm.websphere.ce.cm.StaleConnectionException: IO Error: Connection reset

; SQL []; IO Error: Connection reset; nested exception is com.ibm.websphere.ce.cm.StaleConnectionException: IO Error: Connection reset
        at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:253)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
        at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)
        at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:365)
        at com.sun.proxy.$Proxy55.update(Unknown Source)
        at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:251)
        at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:49)
        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:43)
        at com.sun.proxy.$Proxy76.upsert(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
        at java.lang.reflect.Method.invoke(Method.java:620)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
        at some.package.logger.AspectLogDaoMapper.logExecutionService(AspectLogDaoMapper.java:70)
        at sun.reflect.GeneratedMethodAccessor174.invoke(Unknown Source)
[...]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
        at java.lang.reflect.Method.invoke(Method.java:620)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
        at some.package.logger.AspectLogFilter.logExecutionService(AspectLogFilter.java:61)
        at sun.reflect.GeneratedMethodAccessor263.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
        at java.lang.reflect.Method.invoke(Method.java:620)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:55)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at com.sun.proxy.$Proxy310.doFilter(Unknown Source)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
        at some.package.filter.CheckSessionFilter.doFilter(CheckSessionFilter.java:82)
        at sun.reflect.GeneratedMethodAccessor265.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
        at java.lang.reflect.Method.invoke(Method.java:620)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
        at some.package.logger.AspectLogFilter.logExecutionService(AspectLogFilter.java:61)
        at sun.reflect.GeneratedMethodAccessor263.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
        at java.lang.reflect.Method.invoke(Method.java:620)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:55)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at com.sun.proxy.$Proxy310.doFilter(Unknown Source)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
        at some.package.filter.ExpiredSessionFilter.doFilter(ExpiredSessionFilter.java:59)
        at sun.reflect.GeneratedMethodAccessor265.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
        at java.lang.reflect.Method.invoke(Method.java:620)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
        at some.package.logger.AspectLogFilter.logExecutionService(AspectLogFilter.java:61)
        at sun.reflect.GeneratedMethodAccessor263.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
        at java.lang.reflect.Method.invoke(Method.java:620)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:55)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at com.sun.proxy.$Proxy310.doFilter(Unknown Source)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
        at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4047)
        at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1016)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:213)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:287)
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
        at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
Caused by: com.ibm.websphere.ce.cm.StaleConnectionException: IO Error: Connection reset
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:86)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:58)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:542)
        at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapExceptionHelper(GenericDataStoreHelper.java:629)
        at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapException(GenericDataStoreHelper.java:688)
        at com.ibm.ws.rsadapter.AdapterUtil.mapException(AdapterUtil.java:2267)
        at com.ibm.ws.rsadapter.jdbc.WSJdbcUtil.mapException(WSJdbcUtil.java:1219)
        at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.execute(WSJdbcPreparedStatement.java:653)
        at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:41)
        at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:66)
        at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:45)
        at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:100)
        at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:148)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
        at java.lang.reflect.Method.invoke(Method.java:620)
        at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:355)
        ... 179 more

这是第一次upser同时插入字节数组(在db中标记为blob)实际导致此异常。我搜索了很多,发现大多数建议都与websphere的管理面板上的操作有关,但我无权访问。而且,即使抛出异常,记录实际上也是在数据库中创建的。
如何避免此错误?可能是与sql查询相关的东西导致了这个错误吗?
编辑:完整堆栈跟踪https://pastebin.com/udztum46

dtcbnfnu

dtcbnfnu1#

异常的“staleconnectionexception”部分来自websphere,“io错误:连接重置”来自oracle jdbc驱动程序,通常指向liberty和oracle之间的连接丢失。这可能是由于长时间运行的查询的网络超时或某些数据库资源(如表或行)上的死锁造成的。为了进一步排除故障,您可能会发现使用jdbc或 timedOperations-1.0 自由的特点如下:https://www.ibm.com/support/knowledgecenter/en/sseqtp_liberty/com.ibm.websphere.wlp.doc/ae/cwlp_timeop.html 或者 eventLogging-1.0 此处描述的功能https://www.ibm.com/support/knowledgecenter/en/sseqtp_liberty/com.ibm.websphere.wlp.doc/ae/rwlp_eventlogging.html

相关问题