lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Munendra S N (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-8076) SEVERE: Unable to load Transformer: foo.FieldTransformer
Date Tue, 23 Jul 2019 15:34:00 GMT

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

Munendra S N commented on SOLR-8076:
------------------------------------

Can this be closed?? 

> SEVERE: Unable to load Transformer: foo.FieldTransformer
> --------------------------------------------------------
>
>                 Key: SOLR-8076
>                 URL: https://issues.apache.org/jira/browse/SOLR-8076
>             Project: Solr
>          Issue Type: Bug
>         Environment: Solr Version :- 4.2.1.2013.03.26.08.26.55/Jetty
> OS : -Ubuntu
>            Reporter: lijo
>            Priority: Major
>   Original Estimate: 504h
>  Remaining Estimate: 504h
>
> While creating an custom transformer for data importer ,I am getting the following error.
I made a custom jar and placed it in solr/lib and put it in dist/ folder also.But both times
it is giving the  error.
> I can see the jar is loading when solr started as follows.
> Sep 20, 2015 8:59:47 PM org.apache.solr.core.SolrResourceLoader replaceClassLoader
> INFO: Adding 'file:/var/www/solr/example/solr/lib/foo.jar' to classloader
> Error is :-
> SEVERE: Unable to load Transformer: foo.FieldTransformer
> java.lang.ClassNotFoundException: Unable to load foo.FieldTransformer or org.apache.solr.handler.dataimport.foo.FieldTransformer
> 	at org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:911)
> 	at org.apache.solr.handler.dataimport.EntityProcessorWrapper.loadTransformers(EntityProcessorWrapper.java:107)
> 	at org.apache.solr.handler.dataimport.EntityProcessorWrapper.applyTransformer(EntityProcessorWrapper.java:168)
> 	at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:256)
> 	at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:465)
> 	at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:404)
> 	at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:319)
> 	at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:227)
> 	at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:422)
> 	at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:487)
> 	at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:468)
> Caused by: org.apache.solr.common.SolrException: Error loading class 'foo.FieldTransformer'
> 	at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:440)
> 	at org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:901)
> 	... 10 more
> Caused by: java.lang.ClassNotFoundException: foo.FieldTransformer
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> 	at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:793)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> 	at java.lang.Class.forName0(Native Method)
> 	at java.lang.Class.forName(Class.java:274)
> 	at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:424)
> 	... 11 more
> I made changes in data-config file as follows.
> <entity name="products" transformer="foo.FieldTransformer" query = "select .....'">
> My java file contains the following code.
> package foo;
> import java.util.Map;
> public class FieldTransformer {
>     public Object transformRow(Map<String, Object> row) {
>         row.put("field_"+row.get("third_price"), row.get("id"));
>         return row;
>     }
> }
> and jar contains the following folder structure.
> foo/FieldTransformer.class
> META-INF/MANIFEST.MF
> What is the issue?



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message