googlegsa / manager.v3

Google Search Appliance Connector Manager
Apache License 2.0
10 stars 10 forks source link

Oracle connector db store: JdbcStore.setField fails when connector info is inserted/updated #244

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Setup Oracle as the store for google connector (in the 
applicationContext.properties/applicationContext.xml
2. Start up the connector server.
3. Setup connector through the GSA connector page.
4. The save operation does not work because because of exception thrown from 
the JdbcStore.setField method.

What is the expected output? What do you see instead?
The same operation should work.

What version of the product are you using? On what operating system?
Connector Manager 3.0.8 on Tomcat7
Windows 7
Oracle 11g

Please provide any additional information below.
- From what I can see the table GOOGLE_CONNECTORS.PROPERTY_VALUE is defined as 
a CLOB field if the persistent data store is Oracle
- The Oracle connection does not allow for values in this column to be set 
using the java.sql.ResultSet updateString method. This happens at line #s 495 
and 509 in com.google.enterprise.connector.persist.JdbcStore 
- To get this fixed, for Oracle connections, I changed the code to do use the 
java.sql.ResultSet updateClob method. Please see attached a diff report 
highlighting the changes (left side is the original file/right side is the file 
with changes). 

Please let me know if this can be considered as a patch fix in a next release 
or if another fix is implemented: alex@ikayzo.com. This issue came up while 
working on a search project at PIMCO.

Original issue reported on code.google.com by alex@ikayzo.com on 3 Jul 2013 at 8:28

Attachments: