4 Replies Latest reply on Aug 27, 2013 7:19 PM by Steven Hawkins

    Exception after commit

    kchen007 Apprentice

      We hava teiid jdbc client, after moving to 8.4, whenever we are committing a transaction, an exception will be thrown from server side, the teiid is running inside JBOSS:

      13:50:10,291 ERROR [org.teiid.TRANSPORT] (New I/O worker #2) Unhandled exception, closing client instance: java.io.IOException: An existing connection was forci

      bly closed by the remote host

              at sun.nio.ch.SocketDispatcher.read0(Native Method) [rt.jar:1.6.0_27]

              at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25) [rt.jar:1.6.0_27]

              at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:198) [rt.jar:1.6.0_27]

              at sun.nio.ch.IOUtil.read(IOUtil.java:166) [rt.jar:1.6.0_27]

              at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:243) [rt.jar:1.6.0_27]

              at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:64) [netty-3.6.2.Final.jar:]

              at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107) [netty-3.6.2.Final.jar:]

              at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) [netty-3.6.2.Final.jar:]

              at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88) [netty-3.6.2.Final.jar:]

              at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [netty-3.6.2.Final.jar:]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_27]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_27]

              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_27]

       

      The client code looks like this:

        Class.forName("org.teiid.jdbc.TeiidDriver");
        Connection con = DriverManager.getConnection("jdbc:teiid:Application@mm://localhost:31000", "user", "password");
        con.setAutoCommit(false);
        //Statement statement = con.createStatement();
        PreparedStatement statement = con.prepareStatement("INSERT INTO TableName(......) values(?,..)");
          
          // set the value
          ....
          
        int ret = statement.executeUpdate();
        con.commit();
        con.close();