Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

select * works but not "select count(*)" via JDBC - forum topic by vganti

$
0
0

I am running queries through a JDBC driver. I am able to execute select * from DBC.AccessRights with no issue. However, when I execute "SELECT COUNT(*) FROM DBC.AccessRights" I get the following error. Any help is appreciated. I can run both queries from bteq on the server.
 
2013-03-14.11:09:04.955 TERAJDBC4 ERROR [thread applet-elation.Main-2] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@8e4ac25 Read message 1: Incomplete LAN message header: read 0 bytes
2013-03-14.11:09:04.962 TERAJDBC4 ERROR [thread applet-elation.Main-2] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@8e4ac25 Read message 1 failed; closing socket due to: java.io.IOException: Incomplete LAN message header: read 0 bytes
2013-03-14.11:09:05.047 TERAJDBC4 ERROR [thread applet-elation.Main-2] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@8e4ac25 Packet receive Thu Mar 14 11:09:05 PDT 2013 socket orig=ec2-50-19-2-147.compute-1.amazonaws.com local=0.0.0.0/0.0.0.0:52596 remote=ec2-50-19-2-147.compute-1.amazonaws.com/50.19.2.147:1025 keepalive=unavailable nodelay=unavailable receive=unavailable send=unavailable linger=unavailable traffic=unavailable concurrent=3 contimeout=10000 conwait=1000 connecttime=85 connecttotaltime=88 connectattempts=1 connectfailures=0 failurecache={} cid=642df736 sess=3273 java.io.IOException: Incomplete LAN message header: read 0 bytes  at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetworkIOIF.java:689)  at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:831)  at com.teradata.jdbc.jdbc_4.statemachine.StatementReceiveState.action(StatementReceiveState.java:144)  at com.teradata.jdbc.jdbc_4.statemachine.StatementController.runBody(StatementController.java:122)  at com.teradata.jdbc.jdbc_4.statemachine.StatementController.run(StatementController.java:113)  at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:380)  at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:322)  at com.teradata.jdbc.jdbc_4.TDStatement.doNonPrepExecuteQuery(TDStatement.java:310)  at com.teradata.jdbc.jdbc_4.TDStatement.executeQuery(TDStatement.java:1085)  at elation.base.DBConnection.query(DBConnection.java:88)  at elation.profiler.Profiler.getCount(Profiler.java:63)  at elation.profiler.Profiler.getProfile(Profiler.java:79)  at elation.Main.work(Main.java:92)  at elation.Main.start(Main.java:110)  at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.start(Unknown Source)  at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)  at java.lang.Thread.run(Thread.java:722)
com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata JDBC Driver] [TeraJDBC 14.00.00.33] [Error 804] [SQLState 08S01] Socket communication failure for Packet receive Thu Mar 14 11:09:05 PDT 2013 socket orig=ec2-50-19-2-147.compute-1.amazonaws.com local=0.0.0.0/0.0.0.0:52596 remote=ec2-50-19-2-147.compute-1.amazonaws.com/50.19.2.147:1025 keepalive=unavailable nodelay=unavailable receive=unavailable send=unavailable linger=unavailable traffic=unavailable concurrent=3 contimeout=10000 conwait=1000 connecttime=85 connecttotaltime=88 connectattempts=1 connectfailures=0 failurecache={} cid=642df736 sess=3273 java.io.IOException: Incomplete LAN message header: read 0 bytes  at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetworkIOIF.java:689)  at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:831)  at com.teradata.jdbc.jdbc_4.statemachine.StatementReceiveState.action(StatementReceiveState.java:144)  at com.teradata.jdbc.jdbc_4.statemachine.StatementController.runBody(StatementController.java:122)  at com.teradata.jdbc.jdbc_4.statemachine.StatementController.run(StatementController.java:113)  at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:380)  at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:322)  at com.teradata.jdbc.jdbc_4.TDStatement.doNonPrepExecuteQuery(TDStatement.java:310)  at com.teradata.jdbc.jdbc_4.TDStatement.executeQuery(TDStatement.java:1085)  at elation.base.DBConnection.query(DBConnection.java:88)  at elation.profiler.Profiler.getCount(Profiler.java:63)  at elation.profiler.Profiler.getProfile(Profiler.java:79)  at elation.Main.work(Main.java:92)  at elation.Main.start(Main.java:110)  at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.start(Unknown Source)  at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)  at java.lang.Thread.run(Thread.java:722)
    at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDriverJDBCException(ErrorFactory.java:93)
    at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDriverJDBCException(ErrorFactory.java:68)
    at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeIoJDBCException(ErrorFactory.java:206)
    at com.teradata.jdbc.jdbc_4.util.ErrorAnalyzer.analyzeIoError(ErrorAnalyzer.java:61)
    at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:838)
    at com.teradata.jdbc.jdbc_4.statemachine.StatementReceiveState.action(StatementReceiveState.java:144)
    at com.teradata.jdbc.jdbc_4.statemachine.StatementController.runBody(StatementController.java:122)
    at com.teradata.jdbc.jdbc_4.statemachine.StatementController.run(StatementController.java:113)
    at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:380)
    at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:322)
    at com.teradata.jdbc.jdbc_4.TDStatement.doNonPrepExecuteQuery(TDStatement.java:310)
    at com.teradata.jdbc.jdbc_4.TDStatement.executeQuery(TDStatement.java:1085)
    at elation.base.DBConnection.query(DBConnection.java:88)
    at elation.profiler.Profiler.getCount(Profiler.java:63)
    at elation.profiler.Profiler.getProfile(Profiler.java:79)
    at elation.Main.work(Main.java:92)
    at elation.Main.start(Main.java:110)
    at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.start(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.IOException: Incomplete LAN message header: read 0 bytes
    at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetworkIOIF.java:689)
    at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:831)
    ... 15 more

Tags: 

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>