Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 08061172FA for ; Mon, 18 May 2015 17:06:00 +0000 (UTC) Received: (qmail 12630 invoked by uid 500); 18 May 2015 17:06:00 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 12611 invoked by uid 500); 18 May 2015 17:05:59 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 12601 invoked by uid 99); 18 May 2015 17:05:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 May 2015 17:05:59 +0000 Date: Mon, 18 May 2015 17:05:59 +0000 (UTC) From: "Daniel Barclay (Drill) (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (DRILL-2836) "SQLException: column 'TABLE_CATALOG' not found" when trying to connect with JDBC clients MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14545837#comment-14545837 ] Daniel Barclay (Drill) edited comment on DRILL-2836 at 5/18/15 5:05 PM: ------------------------------------------------------------------------ We've recently added, as an internal (unsupported) diagnostic feature, a proxy JDBC driver that traces calls made through it to another JDBC driver. Using it should show the query that SQuirreL is issuing and that is yielding that no-such-column error (or show which call to a JDBC-API method is internally yielding the query that yields that error). To use the tracing proxy: - reconfigure the JDBC client (e.g., SQuirrel) to use a driver class of {{org.apache.drill.jbdbc.proxy.TracingProxyDriver}}, - use a connection URL that consists of "{{jdbc:proxy:org.apache.drill.jdbc.Driver:}}" prepended to the original URL (e.g., "{{jdbc:drill:zk=local}}"), - open a connection to that URL, - use that connection (e.g., perform whatever steps let to the no-such-column error), and - look wherever stderr (the standard error output stream; Java's {{System.err}}) is configured to be sent (e.g., your terminal, a SQuirreL log file, etc.). (There should be lots of lines about JDBC method calls and returns.) Daniel was (Author: dsbos): We've recently added, as an internal (unsupported) diagnostic feature, a proxy JDBC driver that traces calls made through it to another JDBC driver. Using it should show the query that SquirreL is issuing and that is yielding that no-such-column error (or show which call to a JDBC-API method is internally yielding the query that yields that error). To use the tracing proxy: - reconfigure the JDBC client (e.g., Squirrel) to use a driver class of {{org.apache.drill.jbdbc.proxy.TracingProxyDriver}}, - use a connection URL that consists of "{{jdbc:proxy:org.apache.drill.jdbc.Driver:}}" prepended to the original URL (e.g., "{{jdbc:drill:zk=local}}"), - open a connection to that URL, - use that connection (e.g., perform whatever steps let to the no-such-column error), and - look wherever stderr (the standard error output stream; Java's {{System.err}}) is configured to be sent (e.g., your terminal, a SquirreL log file, etc.). (There should be lots of lines about JDBC method calls and returns.) Daniel > "SQLException: column 'TABLE_CATALOG' not found" when trying to connect with JDBC clients > ----------------------------------------------------------------------------------------- > > Key: DRILL-2836 > URL: https://issues.apache.org/jira/browse/DRILL-2836 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC > Affects Versions: 0.9.0 > Environment: Ubuntu 14.04 64 bits. Java "1.7.0_75". Latest SquirreL FX. Latest Netbeans > Reporter: Mariano Ruiz > Assignee: Daniel Barclay (Drill) > Priority: Minor > Fix For: 1.2.0 > > > I'm trying with latest build from Git repo, commit {{#be8d953935461ee6567b0c4d96c503e8b04469d2}}, I run a single node correctly with {{drillbit.sh}} and login with {{sqline}} through "Zookeeper" without problems. > Also I developed a small Java main app and I was able to consume a MongoDB database with basics SQL queries without problem. > But when I try to explore the databases from an advance SQL client like "SquirreL" (following the steps in the official [guide|https://cwiki.apache.org/confluence/display/DRILL/Using+JDBC+to+Access+Apache+Drill+from+SQuirreL]), or with the Netbeans Database Explorer, I cant connect with Apache Drill. > In SQuirreL, I get this: > {code} > java.sql.SQLException: column 'TABLE_CATALOG' not found > Message: java.sql.SQLException: column 'TABLE_CATALOG' not found > java.lang.RuntimeException: java.sql.SQLException: column 'TABLE_CATALOG' not found > at org.squirrelsql.services.sqlwrap.SQLConnection.getSchemas(SQLConnection.java:139) > at org.squirrelsql.session.schemainfo.SchemaCacheFactory.appendSchemas(SchemaCacheFactory.java:159) > at org.squirrelsql.session.schemainfo.SchemaCacheFactory.appendChildren(SchemaCacheFactory.java:76) > at org.squirrelsql.session.schemainfo.SchemaCacheFactory.recursiveAppendChildren(SchemaCacheFactory.java:31) > at org.squirrelsql.session.schemainfo.SchemaCacheFactory.recursiveAppendChildren(SchemaCacheFactory.java:35) > at org.squirrelsql.session.schemainfo.SchemaCacheFactory.createDatabaseStructure(SchemaCacheFactory.java:23) > at org.squirrelsql.session.schemainfo.SchemaCacheFactory.createSchemaCache(SchemaCacheFactory.java:16) > at org.squirrelsql.aliases.dbconnector.DBConnector.doTryConnect(DBConnector.java:150) > at org.squirrelsql.aliases.dbconnector.DBConnector.access$000(DBConnector.java:21) > at org.squirrelsql.aliases.dbconnector.DBConnector$1.call(DBConnector.java:81) > at org.squirrelsql.aliases.dbconnector.DBConnector$1.call(DBConnector.java:77) > at org.squirrelsql.services.progress.ProgressUtil$1.call(ProgressUtil.java:26) > at javafx.concurrent.Task$TaskCallable.call(Task.java:1423) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at javafx.concurrent.Service.lambda$null$488(Service.java:725) > at javafx.concurrent.Service$$Lambda$480/738924402.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at javafx.concurrent.Service.lambda$executeTask$489(Service.java:724) > at javafx.concurrent.Service$$Lambda$478/1701182789.run(Unknown Source) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.sql.SQLException: column 'TABLE_CATALOG' not found > at net.hydromatic.avatica.AvaticaResultSet.findColumn0(AvaticaResultSet.java:76) > at net.hydromatic.avatica.AvaticaResultSet.getAccessor(AvaticaResultSet.java:102) > at net.hydromatic.avatica.AvaticaResultSet.getString(AvaticaResultSet.java:270) > at org.squirrelsql.services.sqlwrap.SQLConnection.getSchemas(SQLConnection.java:101) > ... 21 more > {code} > I don't care if I cannot explore the databases schemas, I'm aware that Apache Drill is an agnostic tool, I just wan't to access to the database from these tools to do some queries with a visual interface with a nice scrollable resultset, and due this error I cannot make queries with these tools or any other database explorer through JDBC. -- This message was sent by Atlassian JIRA (v6.3.4#6332)