RE: DataImportHandlerException for custom DIH Transformer
Hi, This problem is usually because your custom Transformer is in the solr/lib folder, when it needs to be in the webapps .war file (under WEB-INF/lib of course). Place your custom Transformer in a .jar in your .war and you should be good to go. Thanks, Peter Subject: RE: DataImportHandlerException for custom DIH Transformer From: Vladimir Sutskever vladimir.sutske...@... Date: 1969-12-31 19:00 I am experiencing a similar situation? Any comments? -Original Message- From: Shashikant Kore [mailto:shashik...@gmail.com] Sent: Wednesday, September 08, 2010 2:54 AM To: solr-user@lucene.apache.org Subject: Re: DataImportHandlerException for custom DIH Transformer Resurrecting an old thread. I faced exact problem as Tommy and the jar was in {solr.home}/lib as Noble had suggested. My custom transformer overrides following method as per the specification of Transformer class. public Object transformRow(MapString, Object row, Context context); But, in the code (EntityProcessorWrapper.java), I see the following line. final Method meth = clazz.getMethod(TRANSFORM_ROW, Map.class); This doesn't match the method signature in Transformer. I think this should be final Method meth = clazz.getMethod(TRANSFORM_ROW, Map.class, Context.class); I have verified that adding a method transformRow(MapString, Object row) works. Am I missing something? --shashi 2010/2/8 Noble Paul നോബിള് नोब्ळ् noble.p...@corp.aol.com On Mon, Feb 8, 2010 at 9:13 AM, Tommy Chheng tommy.chh...@gmail.com wrote: I'm having trouble making a custom DIH transformer in solr 1.4. I compiled the General TrimTransformer into a jar. (just copy/paste sample code from http://wiki.apache.org/solr/DIHCustomTransformer) I placed the jar along with the dataimporthandler jar in solr/lib (same directory as the jetty jar) do not keep in solr/lib it wont work. keep it in {solr.home}/lib Then I added to my DIH data-config.xml file: transformer=DateFormatTransformer, RegexTransformer, com.chheng.dih.transformers.TrimTransformer Now I get this exception when I try running the import. org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.NoSuchMethodException: com.chheng.dih.transformers.TrimTransformer.transformRow(java.util.Map) at org.apache.solr.handler.dataimport.EntityProcessorWrapper.loadTransformers(EntityProcessorWrapper.java:120) I noticed the exception lists TrimTransformer.transformRow(java.util.Map) but the abstract Transformer class defines a two parameter method: transformRow(MapString, Object row, Context context)? -- Tommy Chheng Programmer and UC Irvine Graduate Student Twitter @tommychheng http://tommy.chheng.com -- - Noble Paul | Systems Architect| AOL | http://aol.com
Re: DataImportHandlerException for custom DIH Transformer
Resurrecting an old thread. I faced exact problem as Tommy and the jar was in {solr.home}/lib as Noble had suggested. My custom transformer overrides following method as per the specification of Transformer class. public Object transformRow(MapString, Object row, Context context); But, in the code (EntityProcessorWrapper.java), I see the following line. final Method meth = clazz.getMethod(TRANSFORM_ROW, Map.class); This doesn't match the method signature in Transformer. I think this should be final Method meth = clazz.getMethod(TRANSFORM_ROW, Map.class, Context.class); I have verified that adding a method transformRow(MapString, Object row) works. Am I missing something? --shashi 2010/2/8 Noble Paul നോബിള് नोब्ळ् noble.p...@corp.aol.com On Mon, Feb 8, 2010 at 9:13 AM, Tommy Chheng tommy.chh...@gmail.com wrote: I'm having trouble making a custom DIH transformer in solr 1.4. I compiled the General TrimTransformer into a jar. (just copy/paste sample code from http://wiki.apache.org/solr/DIHCustomTransformer) I placed the jar along with the dataimporthandler jar in solr/lib (same directory as the jetty jar) do not keep in solr/lib it wont work. keep it in {solr.home}/lib Then I added to my DIH data-config.xml file: transformer=DateFormatTransformer, RegexTransformer, com.chheng.dih.transformers.TrimTransformer Now I get this exception when I try running the import. org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.NoSuchMethodException: com.chheng.dih.transformers.TrimTransformer.transformRow(java.util.Map) at org.apache.solr.handler.dataimport.EntityProcessorWrapper.loadTransformers(EntityProcessorWrapper.java:120) I noticed the exception lists TrimTransformer.transformRow(java.util.Map) but the abstract Transformer class defines a two parameter method: transformRow(MapString, Object row, Context context)? -- Tommy Chheng Programmer and UC Irvine Graduate Student Twitter @tommychheng http://tommy.chheng.com -- - Noble Paul | Systems Architect| AOL | http://aol.com
RE: DataImportHandlerException for custom DIH Transformer
I am experiencing a similar situation? Any comments? -Original Message- From: Shashikant Kore [mailto:shashik...@gmail.com] Sent: Wednesday, September 08, 2010 2:54 AM To: solr-user@lucene.apache.org Subject: Re: DataImportHandlerException for custom DIH Transformer Resurrecting an old thread. I faced exact problem as Tommy and the jar was in {solr.home}/lib as Noble had suggested. My custom transformer overrides following method as per the specification of Transformer class. public Object transformRow(MapString, Object row, Context context); But, in the code (EntityProcessorWrapper.java), I see the following line. final Method meth = clazz.getMethod(TRANSFORM_ROW, Map.class); This doesn't match the method signature in Transformer. I think this should be final Method meth = clazz.getMethod(TRANSFORM_ROW, Map.class, Context.class); I have verified that adding a method transformRow(MapString, Object row) works. Am I missing something? --shashi 2010/2/8 Noble Paul നോബിള് नोब्ळ् noble.p...@corp.aol.com On Mon, Feb 8, 2010 at 9:13 AM, Tommy Chheng tommy.chh...@gmail.com wrote: I'm having trouble making a custom DIH transformer in solr 1.4. I compiled the General TrimTransformer into a jar. (just copy/paste sample code from http://wiki.apache.org/solr/DIHCustomTransformer) I placed the jar along with the dataimporthandler jar in solr/lib (same directory as the jetty jar) do not keep in solr/lib it wont work. keep it in {solr.home}/lib Then I added to my DIH data-config.xml file: transformer=DateFormatTransformer, RegexTransformer, com.chheng.dih.transformers.TrimTransformer Now I get this exception when I try running the import. org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.NoSuchMethodException: com.chheng.dih.transformers.TrimTransformer.transformRow(java.util.Map) at org.apache.solr.handler.dataimport.EntityProcessorWrapper.loadTransformers(EntityProcessorWrapper.java:120) I noticed the exception lists TrimTransformer.transformRow(java.util.Map) but the abstract Transformer class defines a two parameter method: transformRow(MapString, Object row, Context context)? -- Tommy Chheng Programmer and UC Irvine Graduate Student Twitter @tommychheng http://tommy.chheng.com -- - Noble Paul | Systems Architect| AOL | http://aol.com This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of securities, accuracy and completeness of information, viruses, confidentiality, legal privilege, and legal entity disclaimers, available at http://www.jpmorgan.com/pages/disclosures/email.
DataImportHandlerException for custom DIH Transformer
I'm having trouble making a custom DIH transformer in solr 1.4. I compiled the General TrimTransformer into a jar. (just copy/paste sample code from http://wiki.apache.org/solr/DIHCustomTransformer) I placed the jar along with the dataimporthandler jar in solr/lib (same directory as the jetty jar) Then I added to my DIH data-config.xml file: transformer=DateFormatTransformer, RegexTransformer, com.chheng.dih.transformers.TrimTransformer Now I get this exception when I try running the import. org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.NoSuchMethodException: com.chheng.dih.transformers.TrimTransformer.transformRow(java.util.Map) at org.apache.solr.handler.dataimport.EntityProcessorWrapper.loadTransformers(EntityProcessorWrapper.java:120) I noticed the exception lists TrimTransformer.transformRow(java.util.Map) but the abstract Transformer class defines a two parameter method: transformRow(MapString, Object row, Context context)? -- Tommy Chheng Programmer and UC Irvine Graduate Student Twitter @tommychheng http://tommy.chheng.com
Re: DataImportHandlerException for custom DIH Transformer
On Mon, Feb 8, 2010 at 9:13 AM, Tommy Chheng tommy.chh...@gmail.com wrote: I'm having trouble making a custom DIH transformer in solr 1.4. I compiled the General TrimTransformer into a jar. (just copy/paste sample code from http://wiki.apache.org/solr/DIHCustomTransformer) I placed the jar along with the dataimporthandler jar in solr/lib (same directory as the jetty jar) do not keep in solr/lib it wont work. keep it in {solr.home}/lib Then I added to my DIH data-config.xml file: transformer=DateFormatTransformer, RegexTransformer, com.chheng.dih.transformers.TrimTransformer Now I get this exception when I try running the import. org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.NoSuchMethodException: com.chheng.dih.transformers.TrimTransformer.transformRow(java.util.Map) at org.apache.solr.handler.dataimport.EntityProcessorWrapper.loadTransformers(EntityProcessorWrapper.java:120) I noticed the exception lists TrimTransformer.transformRow(java.util.Map) but the abstract Transformer class defines a two parameter method: transformRow(MapString, Object row, Context context)? -- Tommy Chheng Programmer and UC Irvine Graduate Student Twitter @tommychheng http://tommy.chheng.com -- - Noble Paul | Systems Architect| AOL | http://aol.com