lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noble Paul (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (SOLR-1675) Placing Custom Transform in example/lib directory does not work properly
Date Sat, 19 Dec 2009 05:28:18 GMT

     [ https://issues.apache.org/jira/browse/SOLR-1675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Noble Paul reassigned SOLR-1675:
--------------------------------

    Assignee: Noble Paul

> Placing Custom Transform in example/lib directory does not work properly
> ------------------------------------------------------------------------
>
>                 Key: SOLR-1675
>                 URL: https://issues.apache.org/jira/browse/SOLR-1675
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>            Reporter: Matt Inger
>            Assignee: Noble Paul
>            Priority: Blocker
>         Attachments: SqlArrayTransformer.java
>
>
> I have created a Custom transformer for transforming a javax.sql.Array instance into
a java.lang.Object[] value, and placed it in the example/lib directory.  I then configured
the transformer appropriately in my db-data-config.xml:
> {code}
> <entity ...
> transformer="org.apache.solr.handler.dataimport.SqlArrayTransformer"
> {code}
> However, when i try to actually index my documents, i get the following error in the
console:
> {code}
> org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.NoClassDefFoundError:
org/apache/solr/handler/dataimport/Transformer
> 	at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:424)
> 	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.NoClassDefFoundError: org/apache/solr/handler/dataimport/Transformer
> 	at java.lang.ClassLoader.defineClass1(Native Method)
> 	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> 	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
> 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
> 	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> 	at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:375)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
> 	at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:579)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
> 	at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:579)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> 	at java.lang.Class.forName0(Native Method)
> 	at java.lang.Class.forName(Class.java:242)
> 	at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:357)
> 	at org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:728)
> 	at org.apache.solr.handler.dataimport.EntityProcessorWrapper.loadTransformers(EntityProcessorWrapper.java:103)
> {code}
> It seems there is some issue with the classloader going on here, and the only solution
to this problem seems to be to find the exploded web application in the "work" directory,
and place the .jar file for my transformer in the WEB-INF/lib directory there.  My guess is
that the classloader for the custom transformer class is not using the web application's class
loader as it's parent classloader, and as a result, the Transformer class can't be found.
> I believe I tried this in 1.5-dev as well and had no success either.

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


Mime
View raw message