incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Connectors Framework > How to Write an Output Connector
Date Thu, 21 Oct 2010 17:03:00 GMT
Space: Apache Connectors Framework (https://cwiki.apache.org/confluence/display/CONNECTORS)
Page: How to Write an Output Connector (https://cwiki.apache.org/confluence/display/CONNECTORS/How+to+Write+an+Output+Connector)
Comment: https://cwiki.apache.org/confluence/display/CONNECTORS/How+to+Write+an+Output+Connector?focusedCommentId=24183871#comment-24183871

Comment added by Farzad:
---------------------------------------------------------------------

I got it working, thanks.  A problem that took a lot of time was the column names.  I defined
all mine in upper case.  For some reason, they are converted to lower case.  I was getting
an exception thrown, because I was looking for a column value using the original handle.

So is this a bug?  If not, I think it should be documented to use lowercase only for db column
names.

Another problem I hit was perfroming a query.  It seems that I can only pass the value using
an array list.  Here is my first call that didn't work.

IResultSet result = performQuery("SELECT * FROM " + getTableName() + " WHERE " + hashsum +
"=" + hashsumVal, null, null, null);

It gives an error the column name doesn't exist, where it is using the hashsumVal as the column
name.  See below.  I then used the ArrayList method and it worked.  Is there something I did
wrong in my first attempt?

ArrayList list = new ArrayList();
list.add(hashsumVal);
IResultSet result = performQuery("SELECT * FROM " + getTableName() + " WHERE " + hashsum +
"=?", list, null, null);

Worker thread aborting and restarting due to database connection reset: Database exception:
Exception doing query: ERROR: column "c46875547f6b97bac41132f6f8a057cc10060fbc69b5b26428d6d561e00ae1f"
does not exist
org.apache.manifoldcf.core.interfaces.ManifoldCFException: Database exception: Exception doing
query: ERROR: column "c46875547f6b97bac41132f6f8a057cc10060fbc69b5b26428d6d561e00ae1f" does
not exist
 at org.apache.manifoldcf.core.database.Database.executeViaThread(Database.java:421)
 at org.apache.manifoldcf.core.database.Database.executeUncachedQuery(Database.java:465)
 at org.apache.manifoldcf.core.database.Database$QueryCacheExecutor.create(Database.java:1091)
 at org.apache.manifoldcf.core.cachemanager.CacheManager.findObjectsAndExecute(CacheManager.java:144)
 at org.apache.manifoldcf.core.database.Database.executeQuery(Database.java:167)
 at org.apache.manifoldcf.core.database.DBInterfacePostgreSQL.performQuery(DBInterfacePostgreSQL.java:754)
 at org.apache.manifoldcf.core.database.BaseTable.performQuery(BaseTable.java:229)
 at org.apache.manifoldcf.agents.output.dupfinder.DataManager.insertData(DataManager.java:116)
 at org.apache.manifoldcf.agents.output.dupfinder.DupFinderConnector.addOrReplaceDocument(DupFinderConnector.java:74)
 at org.apache.manifoldcf.agents.incrementalingest.IncrementalIngester.addOrReplaceDocument(IncrementalIngester.java:1424)
 at org.apache.manifoldcf.agents.incrementalingest.IncrementalIngester.performIngestion(IncrementalIngester.java:409)
 at org.apache.manifoldcf.agents.incrementalingest.IncrementalIngester.documentIngest(IncrementalIngester.java:304)
 at org.apache.manifoldcf.crawler.system.WorkerThread$ProcessActivity.ingestDocument(WorkerThread.java:1586)
 at org.apache.manifoldcf.crawler.connectors.filesystem.FileConnector.processDocuments(FileConnector.java:275)
 at org.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector.processDocuments(BaseRepositoryConnector.java:423)
 at org.apache.manifoldcf.crawler.system.WorkerThread.run(WorkerThread.java:585)
Caused by: org.postgresql.util.PSQLException: ERROR: column "c46875547f6b97bac41132f6f8a057cc10060fbc69b5b26428d6d561e00ae1f"
does not exist
 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
 at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
 at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
 at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
 at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:337)
 at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:329)
 at org.apache.manifoldcf.core.database.Database.execute(Database.java:526)
 at org.apache.manifoldcf.core.database.Database$ExecuteQueryThread.run(Database.java:381)


In reply to a comment by Karl Wright:
The only other transaction error that DATABASE_TRANSACTION_ABORT can represent is deadlock. 
So unless you are in a transaction you should not see that one.\\

Change your notification preferences: https://cwiki.apache.org/confluence/users/viewnotifications.action

Mime
View raw message