SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-641
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Shay Banon
Reporter: Jake Robb
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Compass

Incorrect method name in reflection code in OracleIndexOutputHelper

Created: 23/May/08 03:04 PM   Updated: 03/Jun/08 03:54 PM
Component/s: None
Affects Version/s: 2.0.0 GA
Fix Version/s: None


 Description  « Hide
I'm trying to use Compass 2.0.0 with an Oracle 9i database.

I found the following bug on line 57 of OracleIndexOutputHelper.java in the method getBlobOutputStream(ResultSet rs):

getBlobMethod.setTargetMethod("getBLOB");

The actual name of the method is "getBlob", so the method fails with a NoSuchMethodException a few lines later when it tries to invoke the method.

I'd submit a patch, but it would be easier for someone who's already a committer to just go change three characters in the code and commit it themselves.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Jake Robb added a comment - 23/May/08 03:07 PM
I apologize. This code is in Lucene, not Compass. This issue can be closed/deleted. Sorry!

Jake Robb added a comment - 23/May/08 03:19 PM
I apologize again. This code is indeed in Compass. Why does some Compass code exist in the org.apache.lucene project base? That seems counterintuitive and sketchy to me.

Shay Banon added a comment - 24/May/08 03:59 PM
OracleResultSet has a method called getBLOB (as well as getBlob which is part of the Jdbc spec). No?

Jake Robb added a comment - 28/May/08 08:36 AM
According to the JavaDoc, it does. I'm on vacation this week and can't check for you, but clearly OracleResultSet is not the class in question.

I updated my local copy of the code, recompiled Compass, and have been using it successfully for about a week now.


Shay Banon added a comment - 29/May/08 01:12 PM
Is there a chance that OracleResultSet gets wrapped by another class?

Jake Robb added a comment - 03/Jun/08 03:51 PM
Right you are. I'm using Kodo (a JDO implementation) to as my external data source provider, and queries executed on this transaction return a resultset wrapped in a custom Kodo class.

It's not an ideal situation, but it seems to me that an instanceof check would be appropriate, using getBLOB if available, but falling back to getBlob.


Jake Robb added a comment - 03/Jun/08 03:54 PM
Hmmm, apparently I've forgotten how to type, and I don't have permission to edit my comment. That should have read:

---------

Right you are. I'm using Kodo (a JDO implementation) as my external data source provider, and queries executed on the resulting datasource return a resultset wrapped in a custom Kodo class.

It's not an ideal situation, but it seems to me that an instanceof check would be appropriate, using getBLOB if available, but falling back to getBlob.