lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] Updated: (SOLR-1794) Dataimport of CLOB fields fails when getCharacterStream() is defined in a superclass
Date Tue, 19 Oct 2010 01:40:28 GMT


Robert Muir updated SOLR-1794:

    Attachment: SOLR-1794.patch

I don't understand why reflection is being used here at all.

getCharacterStream and getBinaryStream are both defined as public methods in the java.sql.Clob/Blob
interfaces since java 1.4, so all the reflection and comments like:

//Most of the JDBC drivers have getBinaryStream defined as public

make no sense to me... of course its public, it *must be* !

all tests patch with the reflection removed.

> Dataimport of CLOB fields fails when getCharacterStream() is defined in a superclass
> ------------------------------------------------------------------------------------
>                 Key: SOLR-1794
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>         Environment: Oracle WebLogic 10.3.2
>            Reporter: Gunnar Gauslaa Bergem
>         Attachments:, SOLR-1794.patch
> When running Solr on WebLogic application server 10.3.2, the dataimport for CLOB fields
are failing. Line 109 in illustrates the problem:
> Method m = clob.getClass().getDeclaredMethod("getCharacterStream");
> Since getDeclaredMethod instead of getMethod is used, the getCharacterStream() method
will not be found if it is defined in a superclass of clob. This is exactly what
> happens in e.g. WebLogic 10.3.2, since the object returned is a dynamically created wrapper
class called Clob_oracle_sql_CLOB. This class does not define
> getCharacterStream(), but it inherits from another class that does. This problem will
also occur in other places where getDeclaredMethod used in conjunction with the CLOB
> or BLOB datatypes.
> Stacktrace:
> org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to get reader from
clob Processing Document # 1
>         at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(
>         at org.apache.solr.handler.dataimport.FieldReaderDataSource.readCharStream(
>         at org.apache.solr.handler.dataimport.ClobTransformer.readFromClob(
>         at org.apache.solr.handler.dataimport.ClobTransformer.transformRow(
>         at org.apache.solr.handler.dataimport.EntityProcessorWrapper.applyTransformer(
>         at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(
>         at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(
>         at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(
>         at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(
>         at org.apache.solr.handler.dataimport.DocBuilder.execute(
>         at org.apache.solr.handler.dataimport.DataImporter.doFullImport(
>         at org.apache.solr.handler.dataimport.DataImporter.runCmd(
>         at org.apache.solr.handler.dataimport.DataImporter$
> Caused by: java.lang.NoSuchMethodException: weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB.getCharacterStream()
>         at java.lang.Class.getDeclaredMethod(
>         at org.apache.solr.handler.dataimport.FieldReaderDataSource.readCharStream(
>         ... 11 more

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message