1 Reply Latest reply: Mar 28, 2013 8:02 PM by 816366 RSS

    dblink连接异常,不知道是不是网络原因

    957243
      我们系统通过DBLINK的方式从XX银行数据中心取数,DBLINK.DATACENT是在系统(我公司的报表平台)创建的一个DBLINK连接。系统定时在每天早上进行数据抽取,使用上述提到的DBLINK。
      从11月02日上线后至今,抽数过程中共发生过两次错误,错误如下,在网上搜了一下,多数是说网络不稳定。我们也问了其他从数据中心取数的系统,人家的数据都没啥问题。
      希望知情的大师们给点儿建议:
      日志如下:

      2012.12.25 06:00:00 WARN DefaultQuartzScheduler_Worker-6 org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob - Invocation of method 'firstAllScore' on target class [class $Proxy5] failed
      org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from jihe_end@DBLINK.DATACENT where acctdt=to_date(?,'yyyyMMdd') and status='1']; nested exception is java.sql.SQLException: ORA-02068: following severe error from DBLINK.DATACENT
      ORA-03113: end-of-file on communication channel

           at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:108)
           at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
           at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:582)
           at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:616)
           at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:645)
           at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:653)
           at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.sjzxDateIsReady(ScoreServiceImpl.java:812)
           at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.impSJZXdata(ScoreServiceImpl.java:864)
           at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.riskScore(ScoreServiceImpl.java:1001)
           at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.score(ScoreServiceImpl.java:735)
           at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.firstAllScore(ScoreServiceImpl.java:894)
           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:585)
           at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
           at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
           at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
           at $Proxy5.firstAllScore(Unknown Source)
           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:585)
           at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:283)
           at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:272)
           at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
           at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
           at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
      Caused by: java.sql.SQLException: ORA-02068: following severe error from DBLINK.DATACENT
      ORA-03113: end-of-file on communication channel

           at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
           at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
           at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
           at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
           at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
           at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
           at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
           at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
           at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
           at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
           at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:623)
           at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:566)
           ... 28 more
      2012.12.25 06:00:00 INFO DefaultQuartzScheduler_Worker-6 org.quartz.core.JobRunShell - Job DEFAULT.firstAllScoreJobDetail threw a JobExecutionException:
      org.quartz.JobExecutionException: Invocation of method 'firstAllScore' on target class [class $Proxy5] failed [See nested exception: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from jihe_end@DBLINK.DATACENT where acctdt=to_date(?,'yyyyMMdd') and status='1']; nested exception is java.sql.SQLException: ORA-02068: following severe error from DBLINK.DATACENT
      ORA-03113: end-of-file on communication channel
      ]
           at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:287)
           at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
           at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
           at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
      Caused by: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from jihe_end@DBLINK.DATACENT where acctdt=to_date(?,'yyyyMMdd') and status='1']; nested exception is java.sql.SQLException: ORA-02068: following severe error from DBLINK.DATACENT
      ORA-03113: end-of-file on communication channel

           at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:108)
           at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
           at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:582)
           at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:616)
           at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:645)
           at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:653)
           at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.sjzxDateIsReady(ScoreServiceImpl.java:812)
           at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.impSJZXdata(ScoreServiceImpl.java:864)
           at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.riskScore(ScoreServiceImpl.java:1001)
           at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.score(ScoreServiceImpl.java:735)
           at com.resoft.riskmonitor.score.service.impl.ScoreServiceImpl.firstAllScore(ScoreServiceImpl.java:894)
           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:585)
           at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
           at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
           at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
           at $Proxy5.firstAllScore(Unknown Source)
           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:585)
           at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:283)
           at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:272)
           ... 3 more
      Caused by: java.sql.SQLException: ORA-02068: following severe error from DBLINK.DATACENT
      ORA-03113: end-of-file on communication channel

           at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
           at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
           at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
           at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
           at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
           at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
           at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
           at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
           at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
           at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
           at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:623)
           at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:566)
           ... 28 more