Return-Path: X-Original-To: apmail-manifoldcf-dev-archive@www.apache.org Delivered-To: apmail-manifoldcf-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 18F2311DFD for ; Tue, 16 Sep 2014 13:29:34 +0000 (UTC) Received: (qmail 54677 invoked by uid 500); 16 Sep 2014 13:29:34 -0000 Delivered-To: apmail-manifoldcf-dev-archive@manifoldcf.apache.org Received: (qmail 54619 invoked by uid 500); 16 Sep 2014 13:29:34 -0000 Mailing-List: contact dev-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list dev@manifoldcf.apache.org Received: (qmail 54607 invoked by uid 99); 16 Sep 2014 13:29:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Sep 2014 13:29:33 +0000 Date: Tue, 16 Sep 2014 13:29:33 +0000 (UTC) From: "Karl Wright (JIRA)" To: dev@manifoldcf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CONNECTORS-1032) Can't crawl MySQL database tables 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/CONNECTORS-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14135419#comment-14135419 ] Karl Wright commented on CONNECTORS-1032: ----------------------------------------- Ok, that's not useful then. I still suspect, though, that the problem is that your MySQL database is in a mode that makes its return columns not be recognizable. Let's see whether this is true. In the file connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java, around line 282, you should see: {code} IDynamicResultRow row = idSet.getNextRow(); if (row == null) break; try { Object o = row.getValue(JDBCConstants.idReturnColumnName); ... {code} Can you change that to: IDynamicResultRow row = idSet.getNextRow(); if (row == null) break; try { System.out.println("Columns returned:"); Iterator debugiter = row.getColumns(); while (debugiter.hasNext()) { System.out.println(" " + debugIter.next()); } Object o = row.getValue(JDBCConstants.idReturnColumnName); {code} Please rebuild, restart, and send me the output from standard out. Thanks! Karl > Can't crawl MySQL database tables > --------------------------------- > > Key: CONNECTORS-1032 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1032 > Project: ManifoldCF > Issue Type: Bug > Components: JDBC connector > Reporter: Karl Wright > Assignee: Karl Wright > > Against some indeterminate version of MySQL, the seeding query: > {code} > SELECT command_id AS $(IDCOLUMN) FROM icinga_commands > {code} > ... produces the following: > Error: Bad seed query; doesn't return $(IDCOLUMN) column. Try using quotes around $(IDCOLUMN) variable, e.g. "$(IDCOLUMN)". > So does: > {code} > SELECT command_id AS "$(IDCOLUMN)" FROM icinga_commands > {code} > The first level of diagnosis will be to determine what column names are in fact being returned. IDynamicResultRow has the following method: > {code} > public Iterator getColumns(); > {code} > ... which we will need to use to get at the column names. -- This message was sent by Atlassian JIRA (v6.3.4#6332)