[ 
https://issues.apache.org/jira/browse/DRILL-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15123839#comment-15123839
 ] 

Akon Dey commented on DRILL-4326:
---------------------------------

Additional debug information after setting {{exec.errors.verbose}} to {{true}}:

{noformat}
0: jdbc:drill:zk=local> ALTER SESSION SET `exec.errors.verbose` = true;
+-------+-------------------------------+
|  ok   |            summary            |
+-------+-------------------------------+
| true  | exec.errors.verbose updated.  |
+-------+-------------------------------+
1 row selected (0.098 seconds)
0: jdbc:drill:zk=local> select * from ips;
Error: DATA_READ ERROR: The JDBC storage plugin failed while trying setup the 
SQL query.

sql SELECT *
FROM "test"."ips"
plugin pgdb
Fragment 0:0

[Error Id: dba791eb-7e34-4e87-bd34-47bced92dad8 on 10.200.104.128:31010]

  (org.postgresql.util.PSQLException) ERROR: relation "test.ips" does not exist
  Position: 15
    org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse():2103
    org.postgresql.core.v3.QueryExecutorImpl.processResults():1836
    org.postgresql.core.v3.QueryExecutorImpl.execute():257
    org.postgresql.jdbc2.AbstractJdbc2Statement.execute():512
    org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags():374
    org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery():254
    org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
    org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
    org.apache.drill.exec.store.jdbc.JdbcRecordReader.setup():177
    org.apache.drill.exec.physical.impl.ScanBatch.<init>():108
    org.apache.drill.exec.physical.impl.ScanBatch.<init>():136
    org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():40
    org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():33
    org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():147
    org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
    org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():127
    org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
    org.apache.drill.exec.physical.impl.ImplCreator.getRootExec():101
    org.apache.drill.exec.physical.impl.ImplCreator.getExec():79
    org.apache.drill.exec.work.fragment.FragmentExecutor.run():230
    org.apache.drill.common.SelfCleaningRunnable.run():38
    java.util.concurrent.ThreadPoolExecutor.runWorker():1142
    java.util.concurrent.ThreadPoolExecutor$Worker.run():617
    java.lang.Thread.run():745 (state=,code=0)
java.sql.SQLException: DATA_READ ERROR: The JDBC storage plugin failed while 
trying setup the SQL query.

sql SELECT *
FROM "test"."ips"
plugin pgdb
Fragment 0:0

[Error Id: dba791eb-7e34-4e87-bd34-47bced92dad8 on 10.200.104.128:31010]

  (org.postgresql.util.PSQLException) ERROR: relation "test.ips" does not exist
  Position: 15
    org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse():2103
    org.postgresql.core.v3.QueryExecutorImpl.processResults():1836
    org.postgresql.core.v3.QueryExecutorImpl.execute():257
    org.postgresql.jdbc2.AbstractJdbc2Statement.execute():512
    org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags():374
    org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery():254
    org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
    org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
    org.apache.drill.exec.store.jdbc.JdbcRecordReader.setup():177
    org.apache.drill.exec.physical.impl.ScanBatch.<init>():108
    org.apache.drill.exec.physical.impl.ScanBatch.<init>():136
    org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():40
    org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():33
    org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():147
    org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
    org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():127
    org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
    org.apache.drill.exec.physical.impl.ImplCreator.getRootExec():101
    org.apache.drill.exec.physical.impl.ImplCreator.getExec():79
    org.apache.drill.exec.work.fragment.FragmentExecutor.run():230
    org.apache.drill.common.SelfCleaningRunnable.run():38
    java.util.concurrent.ThreadPoolExecutor.runWorker():1142
    java.util.concurrent.ThreadPoolExecutor$Worker.run():617
    java.lang.Thread.run():745

        at 
org.apache.drill.jdbc.impl.DrillCursor.nextRowInternally(DrillCursor.java:247)
        at 
org.apache.drill.jdbc.impl.DrillCursor.loadInitialSchema(DrillCursor.java:290)
        at 
org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:1923)
        at 
org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:73)
        at 
net.hydromatic.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:404)
        at 
net.hydromatic.avatica.AvaticaStatement.executeQueryInternal(AvaticaStatement.java:351)
        at 
net.hydromatic.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:338)
        at 
net.hydromatic.avatica.AvaticaStatement.execute(AvaticaStatement.java:69)
        at 
org.apache.drill.jdbc.impl.DrillStatementImpl.execute(DrillStatementImpl.java:101)
        at sqlline.Commands.execute(Commands.java:841)
        at sqlline.Commands.sql(Commands.java:751)
        at sqlline.SqlLine.dispatch(SqlLine.java:746)
        at sqlline.SqlLine.begin(SqlLine.java:621)
        at sqlline.SqlLine.start(SqlLine.java:375)
        at sqlline.SqlLine.main(SqlLine.java:268)
Caused by: org.apache.drill.common.exceptions.UserRemoteException: DATA_READ 
ERROR: The JDBC storage plugin failed while trying setup the SQL query.

sql SELECT *
FROM "test"."ips"
plugin pgdb
Fragment 0:0

[Error Id: dba791eb-7e34-4e87-bd34-47bced92dad8 on 10.200.104.128:31010]

  (org.postgresql.util.PSQLException) ERROR: relation "test.ips" does not exist
  Position: 15
    org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse():2103
    org.postgresql.core.v3.QueryExecutorImpl.processResults():1836
    org.postgresql.core.v3.QueryExecutorImpl.execute():257
    org.postgresql.jdbc2.AbstractJdbc2Statement.execute():512
    org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags():374
    org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery():254
    org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
    org.apache.commons.dbcp.DelegatingStatement.executeQuery():208
    org.apache.drill.exec.store.jdbc.JdbcRecordReader.setup():177
    org.apache.drill.exec.physical.impl.ScanBatch.<init>():108
    org.apache.drill.exec.physical.impl.ScanBatch.<init>():136
    org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():40
    org.apache.drill.exec.store.jdbc.JdbcBatchCreator.getBatch():33
    org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():147
    org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
    org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch():127
    org.apache.drill.exec.physical.impl.ImplCreator.getChildren():170
    org.apache.drill.exec.physical.impl.ImplCreator.getRootExec():101
    org.apache.drill.exec.physical.impl.ImplCreator.getExec():79
    org.apache.drill.exec.work.fragment.FragmentExecutor.run():230
    org.apache.drill.common.SelfCleaningRunnable.run():38
    java.util.concurrent.ThreadPoolExecutor.runWorker():1142
    java.util.concurrent.ThreadPoolExecutor$Worker.run():617
    java.lang.Thread.run():745

        at 
org.apache.drill.exec.rpc.user.QueryResultHandler.resultArrived(QueryResultHandler.java:119)
        at 
org.apache.drill.exec.rpc.user.UserClient.handleReponse(UserClient.java:113)
        at 
org.apache.drill.exec.rpc.BasicClientWithConnection.handle(BasicClientWithConnection.java:46)
        at 
org.apache.drill.exec.rpc.BasicClientWithConnection.handle(BasicClientWithConnection.java:31)
        at org.apache.drill.exec.rpc.RpcBus.handle(RpcBus.java:67)
        at org.apache.drill.exec.rpc.RpcBus$RequestEvent.run(RpcBus.java:374)
        at 
org.apache.drill.common.SerializedExecutor$RunnableProcessor.run(SerializedExecutor.java:89)
        at 
org.apache.drill.exec.rpc.RpcBus$SameExecutor.execute(RpcBus.java:252)
        at 
org.apache.drill.common.SerializedExecutor.execute(SerializedExecutor.java:123)
        at 
org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:285)
        at 
org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:257)
        at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at 
io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:254)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at 
io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
        at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847)
        at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
        at 
io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
        at java.lang.Thread.run(Thread.java:745)
0: jdbc:drill:zk=local>
{noformat}

> JDBC Storage Plugin for PostgreSQL does not work
> ------------------------------------------------
>
>                 Key: DRILL-4326
>                 URL: https://issues.apache.org/jira/browse/DRILL-4326
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Other
>    Affects Versions: 1.3.0, 1.4.0, 1.5.0
>         Environment: Mac OS X JDK 1.8 PostgreSQL 9.4.4 PostgreSQL JDBC jars 
> (postgresql-9.2-1004-jdbc4.jar, postgresql-9.1-901-1.jdbc4.jar, )
>            Reporter: Akon Dey
>
> Queries with the JDBC Storage Plugin for PostgreSQL fail with DATA READ ERROR.
> The JDBC Storage Plugin settings in use are:
> {code}
> {
>   "type": "jdbc",
>   "driver": "org.postgresql.Driver",
>   "url": "jdbc:postgresql://127.0.0.1/test",
>   "username": "akon",
>   "password": null,
>   "enabled": false
> }
> {code}
> Please refer to the following stack for further details:
> {noformat}
> Akons-MacBook-Pro:drill akon$ 
> ./distribution/target/apache-drill-1.5.0-SNAPSHOT/apache-drill-1.5.0-SNAPSHOT/bin/drill-embedded
> Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512M; 
> support was removed in 8.0
> Jan 29, 2016 9:17:18 AM org.glassfish.jersey.server.ApplicationHandler 
> initialize
> INFO: Initiating Jersey application, version Jersey: 2.8 2014-04-29 
> 01:25:26...
> apache drill 1.5.0-SNAPSHOT
> "a little sql for your nosql"
> 0: jdbc:drill:zk=local> !verbose
> verbose: on
> 0: jdbc:drill:zk=local> use pgdb;
> +-------+-----------------------------------+
> |  ok   |              summary              |
> +-------+-----------------------------------+
> | true  | Default schema changed to [pgdb]  |
> +-------+-----------------------------------+
> 1 row selected (0.753 seconds)
> 0: jdbc:drill:zk=local> select * from ips;
> Error: DATA_READ ERROR: The JDBC storage plugin failed while trying setup the 
> SQL query.
> sql SELECT *
> FROM "test"."ips"
> plugin pgdb
> Fragment 0:0
> [Error Id: 26ada06d-e08d-456a-9289-0dec2089b018 on 10.200.104.128:31010] 
> (state=,code=0)
> java.sql.SQLException: DATA_READ ERROR: The JDBC storage plugin failed while 
> trying setup the SQL query.
> sql SELECT *
> FROM "test"."ips"
> plugin pgdb
> Fragment 0:0
> [Error Id: 26ada06d-e08d-456a-9289-0dec2089b018 on 10.200.104.128:31010]
>       at 
> org.apache.drill.jdbc.impl.DrillCursor.nextRowInternally(DrillCursor.java:247)
>       at 
> org.apache.drill.jdbc.impl.DrillCursor.loadInitialSchema(DrillCursor.java:290)
>       at 
> org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:1923)
>       at 
> org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:73)
>       at 
> net.hydromatic.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:404)
>       at 
> net.hydromatic.avatica.AvaticaStatement.executeQueryInternal(AvaticaStatement.java:351)
>       at 
> net.hydromatic.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:338)
>       at 
> net.hydromatic.avatica.AvaticaStatement.execute(AvaticaStatement.java:69)
>       at 
> org.apache.drill.jdbc.impl.DrillStatementImpl.execute(DrillStatementImpl.java:101)
>       at sqlline.Commands.execute(Commands.java:841)
>       at sqlline.Commands.sql(Commands.java:751)
>       at sqlline.SqlLine.dispatch(SqlLine.java:746)
>       at sqlline.SqlLine.begin(SqlLine.java:621)
>       at sqlline.SqlLine.start(SqlLine.java:375)
>       at sqlline.SqlLine.main(SqlLine.java:268)
> Caused by: org.apache.drill.common.exceptions.UserRemoteException: DATA_READ 
> ERROR: The JDBC storage plugin failed while trying setup the SQL query.
> sql SELECT *
> FROM "test"."ips"
> plugin pgdb
> Fragment 0:0
> [Error Id: 26ada06d-e08d-456a-9289-0dec2089b018 on 10.200.104.128:31010]
>       at 
> org.apache.drill.exec.rpc.user.QueryResultHandler.resultArrived(QueryResultHandler.java:119)
>       at 
> org.apache.drill.exec.rpc.user.UserClient.handleReponse(UserClient.java:113)
>       at 
> org.apache.drill.exec.rpc.BasicClientWithConnection.handle(BasicClientWithConnection.java:46)
>       at 
> org.apache.drill.exec.rpc.BasicClientWithConnection.handle(BasicClientWithConnection.java:31)
>       at org.apache.drill.exec.rpc.RpcBus.handle(RpcBus.java:67)
>       at org.apache.drill.exec.rpc.RpcBus$RequestEvent.run(RpcBus.java:374)
>       at 
> org.apache.drill.common.SerializedExecutor$RunnableProcessor.run(SerializedExecutor.java:89)
>       at 
> org.apache.drill.exec.rpc.RpcBus$SameExecutor.execute(RpcBus.java:252)
>       at 
> org.apache.drill.common.SerializedExecutor.execute(SerializedExecutor.java:123)
>       at 
> org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:285)
>       at 
> org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:257)
>       at 
> io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89)
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
>       at 
> io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:254)
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
>       at 
> io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
>       at 
> io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:242)
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
>       at 
> io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
>       at 
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
>       at 
> io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
>       at 
> io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847)
>       at 
> io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
>       at 
> io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
>       at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
>       at 
> io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
>       at java.lang.Thread.run(Thread.java:745)
> 0: jdbc:drill:zk=local>  
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to