[ 
https://issues.apache.org/jira/browse/SOLR-1794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12857267#action_12857267
 ] 

Stein Kåre Skytteren edited comment on SOLR-1794 at 4/15/10 6:50 AM:
---------------------------------------------------------------------

A fixed version of  org.apache.solr.handler.dataimport.FieldReaderDataSource 
Change line 89 and 110 to use getMethod instead of getDeclaredMethod.

This works for us on Weblogic 10.3.2.

Since I cannot commit to the repository I hope that someone will update the 
file so we may upgrade without deploying our own version of this class.

      was (Author: skytteren):
    A fixed version of  
org.apache.solr.handler.dataimport.FieldReaderDataSource 
Change line 89 and 110 to use getMethod instead of getDeclaredMethod.

This works for us on Weblogic 10.3.2.
  
> Dataimport of CLOB fields fails when getCharacterStream() is defined in a 
> superclass
> ------------------------------------------------------------------------------------
>
>                 Key: SOLR-1794
>                 URL: https://issues.apache.org/jira/browse/SOLR-1794
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>         Environment: Oracle WebLogic 10.3.2
>            Reporter: Gunnar Gauslaa Bergem
>         Attachments: FieldReaderDataSource.java
>
>
> When running Solr on WebLogic application server 10.3.2, the dataimport for 
> CLOB fields are failing. Line 109 in FieldReaderDataSource.java 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(DataImportHandlerException.java:72)
>         at 
> org.apache.solr.handler.dataimport.FieldReaderDataSource.readCharStream(FieldReaderDataSource.java:118)
>         at 
> org.apache.solr.handler.dataimport.ClobTransformer.readFromClob(ClobTransformer.java:69)
>         at 
> org.apache.solr.handler.dataimport.ClobTransformer.transformRow(ClobTransformer.java:61)
>         at 
> org.apache.solr.handler.dataimport.EntityProcessorWrapper.applyTransformer(EntityProcessorWrapper.java:195)
>         at 
> org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:241)
>         at 
> org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:357)
>         at 
> org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:383)
>         at 
> org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:242)
>         at 
> org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:180)
>         at 
> org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:331)
>         at 
> org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:389)
>         at 
> org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:370)
> Caused by: java.lang.NoSuchMethodException: 
> weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB.getCharacterStream()
>         at java.lang.Class.getDeclaredMethod(Class.java:1937)
>         at 
> org.apache.solr.handler.dataimport.FieldReaderDataSource.readCharStream(FieldReaderDataSource.java:109)
>         ... 11 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to