用dblink 连接的远程库,间隔一段时后执行时报下面错误Io 异常: End of TNS data channel; nested exception is java.sql.SQLException: Io 异常: End of TNS data channel,如果重启服后务问题就消失(但间隔一段时间还会出现),如不重启每交执行还会接着报org.springframework.dao.DataAccessResourceFailureException: StatementCallback; SQL [select to_char(sysdate-1,'yyyy-mm-dd') bsrq,'fdlqn' type,'全年量' lb,t.plan_xh,t.plan_cdmc,nvl(t.plan_data,0)/10000 val from [email protected] t where t.plan_date=to_date(to_char(sysdate-1,'yyyy-mm-dd'),'yyyy-mm-dd') and t.plan_xh='90001' union select to_char(sysdate-1,'yyyy-mm-dd') bsrq,'fdl1' type,'#1全年量' lb,t.plan_xh,t.plan_cdmc,nvl(t.plan_data,0)/10000 val from [email protected] t where t.plan_date=to_date(to_char(sysdate-1,'yyyy-mm-dd'),'yyyy-mm-dd') and t.plan_xh='10001' union select to_char(sysdate-1,'yyyy-mm-dd') bsrq,'fdl2' type,'#2全年量' lb,t.plan_xh,t.plan_cdmc,nvl(t.plan_data,0)/10000 val from [email protected] t where t.plan_date=to_date(to_char(sysdate-1,'yyyy-mm-dd'),'yyyy-mm-dd') and t.plan_xh='20001' union select to_char(sysdate-1,'yyyy-mm-dd') bsrq,'fdl3' type,'#3全年量' lb,t.plan_xh,t.plan_cdmc,nvl(t.plan_data,0)/10000 val from [email protected] t where t.plan_date=to_date(to_char(sysdate-1,'yyyy-mm-dd'),'yyyy-mm-dd') and t.plan_xh='30001' union select to_char(sysdate-1,'yyyy-mm-dd') bsrq,'fdl4' type,'#4全年量' lb,t.plan_xh,t.plan_cdmc,nvl(t.plan_data,0)/10000 val from [email protected] t where t.plan_date=to_date(to_char(sysdate-1,'yyyy-mm-dd'),'yyyy-mm-dd') and t.plan_xh='40001' union select to_char(sysdate-1,'yyyy-mm-dd') bsrq,'ncydl' type,'年已用量' lb,t.plan_xh,t.plan_cdmc,nvl(t.plan_data,0)/10000 val from [email protected] t where t.plan_date=to_date(to_char(sysdate-1,'yyyy-mm-dd'),'yyyy-mm-dd') and t.plan_xh='90193' union select to_char(sysdate-1,'yyyy-mm-dd') bsrq,'nhml' type,'年耗量' lb,t.plan_xh,t.plan_cdmc,nvl(t.plan_data,0) val from [email protected] t where t.plan_date=to_date(to_char(sysdate-1,'yyyy-mm-dd'),'yyyy-mm-dd') and t.plan_xh='90022' union select to_char(sysdate-1,'yyyy-mm-dd') bsrq,'ccmhn' type,'存量' lb,t.plan_xh,t.plan_cdmc,nvl(t.plan_data,0) val from [email protected] t where t.plan_date=to_date(to_char(sysdate-1,'yyyy-mm-dd'),'yyyy-mm-dd') and t.plan_xh='90134' union select to_char(sysdate-1,'yyyy-mm-dd') bsrq,'ccmhr' type,'存量' lb,t.plan_xh,t.plan_cdmc,nvl(t.plan_data,0) val from [email protected] t where t.plan_date=to_date(to_char(sysdate-1,'yyyy-mm-dd'),'yyyy-mm-dd') and t.plan_xh='90134' union select to_char(sysdate-1,'yyyy-mm-dd') bsrq,'rhmlr' type,'日耗量' lb,t.plan_xh,t.plan_cdmc,nvl(t.plan_data,0) val from [email protected] t where t.plan_date=to_date(to_char(sysdate-1,'yyyy-mm-dd'),'yyyy-mm-dd') and t.plan_xh='90022' union select to_char(sysdate-1,'yyyy-mm-dd') bsrq,'rfdlr' type,'日量' lb,t.plan_xh,t.plan_cdmc,nvl(t.plan_data,0)/10000 val from [email protected] t where t.plan_date=to_date(to_char(sysdate-1,'yyyy-mm-dd'),'yyyy-mm-dd') and t.plan_xh='90001' ]; Io 异常: End of TNS data channel; nested exception is java.sql.SQLException: Io 异常: End of TNS data channelat org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:253)at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:406)at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:455)at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:463)at org.springframework.jdbc.core.JdbcTemplate.queryForList(JdbcTemplate.java:494)at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.queryForList(SimpleJdbcTemplate.java:234)at com.hzj.portal.common.dao.impl.BaseDaoImpl.findMultiColumnAllList(BaseDaoImpl.java:276)at com.inverteddata.dao.impl.AutoZbDataDAOImpl.SendValues(AutoZbDataDAOImpl.java:468)at com.inverteddata.dao.impl.AutoZbDataDAOImpl.insertDate(AutoZbDataDAOImpl.java:432)at com.inverteddata.service.impl.AutoZbDataServiceImpl.getZbata(AutoZbDataServiceImpl.java:34)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)at java.lang.reflect.Method.invoke(Unknown Source)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)at $Proxy80.getZbata(Unknown Source)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)at java.lang.reflect.Method.invoke(Unknown Source)at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:264)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: Io 异常: End of TNS data channelat oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:806)at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1031)at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:830)at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1124)at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1264)at com.mchange.v2.c3p0.impl.NewProxyStatement.executeQuery(NewProxyStatement.java:35)at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:440)at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:395)... 28 more
详细解决方案
Io 错误: End of TNS data channel; nested exception is java.sql.SQLException: Io
热度:887 发布时间:2016-05-05 10:42:33.0
相关解决方案
- java 乱码 汉字是 ? 如何转换成汉字
- java web 登录次数限制,该如何解决
- java 工商银行网银支付 B2B的 都亟需什么,需要注意什么
- Java Applet程序从JDK6升级到7时遇到的有关问题
- Exception in thread "main" org.hibernate.HibernateException: /hibernate.cfg.xml解决办法
- java web 视频相干
- 请教一个关于链接后缀的有关问题(java web 应用)
- java 系统单点登录解决方案
- java.lang.NumberFormatException: For input string: "id"该如何处理
- java.lang.NoSuchMethodException: setId([Ljava.lang.String;)解决方法
- java 获取客户端IP解决办法
- JAVA 后台怎么获得前台页面FCKedit编辑器中的内容以及内容的样式
- java 正则化匹配有关问题
- java web 受阻
- java.lang.IllegalStateException: No output folder,该怎么解决
- 大神们开始觅错啦!org.hibernate.exception.SQLGrammarException: could not execute query
- java.lang.NoSuchMethodError: org.springframework.util.ReflectionUtils.makeAccess,该如何解决
- java 乱码有关问题 急求大神
- java EE错误如何解决阿,都是过了,没有能解决的!
- java 工程打包有关问题 多谢各位大神!多谢
- JAVA WEB导航条,该怎么处理
- java.sql.SQLException: Access denied for user 'root'@'localhost' (using password,该如何处理
- java 中Node 有关问题
- 关于 java 引述传递和值传递,你的知否
- 吐了,java Timer 终止不了。
- Java Web 学习中有关问题,请高手指教
- java web中的url地址小疑点。
- java web开发解决办法
- java.lang.NullPointerException解决方法
- 关于 java cast 有关问题,你明白不