I recompiled my classes with a public constructor and everything goes well.
2014-09-10 22:00 GMT+02:00 Erick Erickson <erickerick...@gmail.com>: > Francesco: > > What was the fix? It'll help others with the same issue..... > > On Wed, Sep 10, 2014 at 6:53 AM, Francesco Valentini > <valentin...@gmail.com> wrote: > > Hi Shawn, > > thank you very much for your quick anwser, > > I fixed it. > > > > Thanks > > Francesco > > > > 2014-09-10 15:34 GMT+02:00 Shawn Heisey <s...@elyograg.org>: > > > >> On 9/10/2014 7:14 AM, Francesco Valentini wrote: > >> > I’m using Solr 4.4.0 distro and now, I have a strange issue while > >> > extending TokenizerFactory with a custom class. > >> > >> I think what we have here is a basic Java error, nothing specific to > >> Solr. This jumps out at me: > >> > >> Caused by: java.lang.NoSuchMethodException: > >> com.mytest.tokenizer.RelationChunkTokenizerFactory.<init>(java.util.Map) > >> at java.lang.Class.getConstructor0(Unknown Source) > >> at java.lang.Class.getConstructor(Unknown Source) > >> at > >> > >> > org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:552) > >> ... 21 more > >> > >> Java is trying to execute a method that doesn't exist. The > >> "getConstructor" pieces after the message suggest that perhaps it's a > >> constructor with a Map as an argument, but I'm not familiar enough with > >> this error to know whether it's trying to run a constructor that doesn't > >> exist, or whether it's trying to actually use a method called "init". > >> > >> The constructor in TokenizerFactory is protected, and all of the > >> existing descendants that I looked at have a public constructor ... this > >> message would make sense in all of the following situations: > >> > >> 1) You didn't create a constructor for your object with a Map argument. > >> 2) You made your constructor protected. > >> 3) You made your constructor private. > >> > >> Thanks, > >> Shawn > >> > >> >