3 Replies Latest reply on Jun 3, 2009 5:32 PM by vijay aneraye

    I am having java.sql.SQLException: Io exception: End of TNS

    cheenu78 Newbie

      Hi All,

      I am running on jboss3.2.2RC3 on windows XP and Linux 9.0.
      I am getting an error while publishing to topic (Not always). I am publishing object message. Can anyone tell me where I am going wrong?

      Thanks and Regards
      Srinivas

      My Code look like this :

      Object tmp=iniCtx.lookup("UIL2XAConnectionFactory");
      TopicConnectionFactory tcf=(TopicConnectionFactory)tmp;
      conn=tcf.createTopicConnection();
      topic=(Topic)iniCtx.lookup("topic/testTopic");
      session=conn.createTopicSession(false,TopicSession.AUTO_ACKNOWLEDGE);

      //==== few lines which donot have any significance here are omitted
      TopicPublisher send = session.createPublisher(topic);

      ObjectMessage tm=session.createObjectMessage(msg);
      send.publish(tm);
      send.close();

      My configurations are as below:

      My uil2-service.xml looks like this :

      <?xml version="1.0" encoding="UTF-8"?>
      
      <!-- $Id: uil2-service.xml,v 1.1.2.1 2003/08/23 22:21:28 ejort Exp $ -->
      
      <server>
      
       <!-- JBossMQ using the Unified Invocation Layer
       All communication uses one socket connection -->
      
       <mbean code="org.jboss.mq.il.uil2.UILServerILService"
       name="jboss.mq:service=InvocationLayer,type=UIL2">
       <depends optional-attribute-name="Invoker">jboss.mq:service=Invoker</depends>
       <attribute name="ConnectionFactoryJNDIRef">UIL2ConnectionFactory</attribute>
       <attribute name="XAConnectionFactoryJNDIRef">UIL2XAConnectionFactory</attribute>
       <attribute name="ServerBindPort">8093</attribute>
       <attribute name="PingPeriod">60000</attribute>
       <attribute name="EnableTcpNoDelay">true</attribute>
       <!-- Used to disconnect the client if there is no activity -->
       <!-- Ensure this is greater than the ping period -->
       <attribute name="ReadTimeout">70000</attribute>
       <!-- The size of the buffer (in bytes) wrapping the socket -->
       <!-- The buffer is flushed after each request -->
       <attribute name="BufferSize">102400</attribute>
       <!-- Large messages may block the ping/pong -->
       <!-- A pong is simulated after each chunk (in bytes) for both reading and writing -->
       <!-- It must be larger than the buffer size -->
       <attribute name="ChunkSize">1000000</attribute>
       </mbean>
      
      </server>


      my jboss mq destination.xml is as follows :
      <mbean code="org.jboss.mq.server.jmx.Topic"
       name="jboss.mq.destination:service=Topic,name=testTopic">
       <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
       <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
       <attribute name="SecurityConf">
       <security>
       <role name="guest" read="true" write="true"/>
       <role name="publisher" read="true" write="true" create="false"/>
       <role name="durpublisher" read="true" write="true" create="true"/>
       </security>
       </attribute>
       </mbean>


      while publishing my message to topic/testTopic I get error often like this :

      java.sql.SQLException: Io exception: End of TNS data channel
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:335)
      at oracle.jdbc.driver.OracleConnection.rollback(OracleConnection.java:1200)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.rollback(LocalManagedConnection.java:116)
      at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.rollback(TxConnectionManager.java:859)
      at org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1647)
      at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:449)
      at org.jboss.tm.TxManager.rollback(TxManager.java:263)
      at org.jboss.mq.pm.jdbc2.PersistenceManager$TransactionManagerStrategy.endTX(PersistenceManager.java:174)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.saveToStorage(PersistenceManager.java:1194)
      at org.jboss.mq.server.MessageCache.saveToStorage(MessageCache.java:414)
      at org.jboss.mq.server.MessageReference.makeSoft(MessageReference.java:252)
      at org.jboss.mq.server.MessageCache.validateSoftReferenceDepth(MessageCache.java:354)
      at org.jboss.mq.server.MessageCache.addInternal(MessageCache.java:133)
      at org.jboss.mq.server.MessageCache.add(MessageCache.java:102)
      at org.jboss.mq.server.JMSTopic.addMessage(JMSTopic.java:299)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:409)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:385)
      at org.jboss.mq.server.JMSServerInterceptorSupport.addMessage(JMSServerInterceptorSupport.java:135)
      at org.jboss.mq.security.ServerSecurityInterceptor.addMessage(ServerSecurityInterceptor.java:162)
      at org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:234)
      at org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:137)
      at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:86)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:355)
      at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)

      12:34:06,116 WARN [JBossManagedConnectionPool] ResourceException cleaning up ManagedConnection:org.jboss.resource.JBossResourceException: Could not cleanup: ; - nested throwable: (java.sql.SQLException: Io exception: End of TNS data channel)
      12:34:06,136 INFO [JBossManagedConnectionPool] Exception destroying ManagedConnection
      org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: Io exception: End of TNS data channel)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:452)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:232)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy(InternalManagedConnectionPool.java:394)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.returnConnection(InternalManagedConnectionPool.java:270)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool.returnConnection(JBossManagedConnectionPool.java:701)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.returnManagedConnection(BaseConnectionManager2.java:464)
      at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TxRemover.afterCompletion(TxConnectionManager.java:669)
      at org.jboss.tm.TransactionImpl.doAfterCompletion(TransactionImpl.java:1325)
      at org.jboss.tm.TransactionImpl.rollback(TransactionImpl.java:451)
      at org.jboss.tm.TxManager.rollback(TxManager.java:263)
      at org.jboss.mq.pm.jdbc2.PersistenceManager$TransactionManagerStrategy.endTX(PersistenceManager.java:174)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.saveToStorage(PersistenceManager.java:1194)
      at org.jboss.mq.server.MessageCache.saveToStorage(MessageCache.java:414)
      at org.jboss.mq.server.MessageReference.makeSoft(MessageReference.java:252)
      at org.jboss.mq.server.MessageCache.validateSoftReferenceDepth(MessageCache.java:354)
      at org.jboss.mq.server.MessageCache.addInternal(MessageCache.java:133)
      at org.jboss.mq.server.MessageCache.add(MessageCache.java:102)
      at org.jboss.mq.server.JMSTopic.addMessage(JMSTopic.java:299)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:409)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:385)
      at org.jboss.mq.server.JMSServerInterceptorSupport.addMessage(JMSServerInterceptorSupport.java:135)
      at org.jboss.mq.security.ServerSecurityInterceptor.addMessage(ServerSecurityInterceptor.java:162)
      at org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:234)
      at org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:137)
      at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:86)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:355)
      at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: java.sql.SQLException: Io exception: End of TNS data channel
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:335)
      at oracle.jdbc.driver.OracleConnection.close(OracleConnection.java:1256)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:228)
      ... 27 more
      12:34:06,877 ERROR [SocketManager] Failed to handle: org.jboss.mq.il.uil2.msgs.AddMsg32922362[msgType: m_addMessage, msgID: 6, error: null]
      org.jboss.mq.SpyJMSException: Could not store message: 6 msg=3 hard NOT_STORED PERSISTENT queue=TOPIC.testTopic.ID:7.-2147483648 priority=4 hashCode=27739962; - nested throwable: (java.sql.SQLException: Io exception: End of TNS data channel)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.saveToStorage(PersistenceManager.java:1183)
      at org.jboss.mq.server.MessageCache.saveToStorage(MessageCache.java:414)
      at org.jboss.mq.server.MessageReference.makeSoft(MessageReference.java:252)
      at org.jboss.mq.server.MessageCache.validateSoftReferenceDepth(MessageCache.java:354)
      at org.jboss.mq.server.MessageCache.addInternal(MessageCache.java:133)
      at org.jboss.mq.server.MessageCache.add(MessageCache.java:102)
      at org.jboss.mq.server.JMSTopic.addMessage(JMSTopic.java:299)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:409)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:385)
      at org.jboss.mq.server.JMSServerInterceptorSupport.addMessage(JMSServerInterceptorSupport.java:135)
      at org.jboss.mq.security.ServerSecurityInterceptor.addMessage(ServerSecurityInterceptor.java:162)
      at org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:234)
      at org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:137)
      at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:86)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:355)
      at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: java.sql.SQLException: Io exception: End of TNS data channel
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
      at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:335)
      at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1860)
      at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1771)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2361)
      at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:422)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:308)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:742)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.saveToStorage(PersistenceManager.java:1169)

        • 1. Re: I am having java.sql.SQLException: Io exception: End of
          Adrian Brock Master

           


          Caused by: java.sql.SQLException: Io exception: End of TNS data channel
          at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
          at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
          at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:335)


          This is an Oracle problem.

          Can we stop posting SQLExceptons and network exceptions in this forum.
          JBossMQ uses JDBC and the network, but these exceptions are almost always
          problems with the database or the network configuration.

          • 2. Re: I am having java.sql.SQLException: Io exception: End of
            Adrian Brock Master

            Addtionally, as I have said many times before.

            The XAConnectionFactory is for internal use by the application server
            or some other client that understands JTA.

            • 3. Re: I am having java.sql.SQLException: Io exception: End of
              vijay aneraye Newbie

              Hi All,
              I am using oracle 10g and tomcat, and I am alos running through same problem. consoled message says that
              java.sql.SQLException: Io exception: End of TNS data channel
              at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
              org.apache.jasper.servlet.JspServlet 2009-06-03 17:14:44,718 -- DEBUG --
              org.apache.jasper.servlet.JspServlet 2009-06-03 17:14:44,937 -- DEBUG --
              org.apache.jasper.servlet.JspServlet 2009-06-03 17:14:45,015 -- DEBUG --


              Can you please help me to resolve this kind of proble,

              Thnaks
              Vijay A