Thanks. Yeah took me a while to figure out I needed to do something like transformer="com.mycompany.solr.MyTransformer" on the entity before it would work ...

- Jon

On Jun 18, 2008, at 1:51 PM, Brendan Grainger wrote:

Hi,

I set up the new DataimportHandler last night to replace some custom import code I'd written and so far I'm loving it thank you.

I had one issue you might want to know about it. I have some solr extensions I've written and packaged in a jar which I place in:

solr-home/lib

as per:

http://wiki.apache.org/solr/SolrPlugins#head-59e2685df65335e82f8936ed55d260842dc7a4dc

This works well for my handlers but a custom Transformer I wrote and packaged the same way was throwing a ClassNotFoundException. I tracked it down to the DocBuilder.loadClass method which was just doing a Class.forName. Anyway, I fixed it for the moment by probably do something stupid and creating a SolrResourceLoader (which I imagine could be an instance variable, but at 3am I just wanted to get it working). Anyway, this fixes the problem:

 @SuppressWarnings("unchecked")
 static Class loadClass(String name) throws ClassNotFoundException {
   SolrResourceLoader loader = new SolrResourceLoader( null );
   return loader.findClass(name);
    // return Class.forName(name);
 }

Brendan

  • Slight issue with clas... Brendan Grainger
    • Re: Slight issue ... Jon Baer
      • Re: Slight is... Noble Paul നോബിള്‍ नोब्ळ्
        • Re: Sligh... Brendan Grainger
          • Re: S... Noble Paul നോബിള്‍ नोब्ळ्
            • ... Brendan Grainger
            • ... Chris Hostetter
              • ... Noble Paul നോബിള്‍ नोब्ळ्
                • ... Brian Carmalt
                • ... Erik Hatcher
                • ... William Silva
                • ... Noble Paul നോബിള്‍ नोब्ळ्

Reply via email to