lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davidphilip cherian <davidphilipcher...@gmail.com>
Subject Re: problem with solr plugin
Date Sat, 19 Dec 2015 16:21:02 GMT
Hi Sara,

The error is clear: class not found exception, which means solr couldn't
locate that jar file.

If you are not using solr-cloud then place that custom jar under
solr_home/lib folder.
You can also hard code the path of this jar file in solrconfig.xml under
/lib element.

If you are using solr-cloud, I think you should upload that zookeeper.



On Sat, Dec 19, 2015 at 5:58 PM, sara hajili <hajili.sara@gmail.com> wrote:

> hi i wanna to have own normalization .
> i write 2 class one class form normalization filter factort that extends
> token filter factory and imoplement multiTermAwarecomponent
> and an other one class is normalization factory that extends token filter.
> then i create a jar from this classes with dependencies .
> and i add this jar file to solr_home/dist and
> solr_home/contrib/extraction/lib
> and i use this class in schema in this way:
> <fieldType name="sample_normalizer" class="solr.TextField"
> positionIncrementGap="100">
>     <analyzer>
>  <tokenizer class="solr.StandardTokenizerFactory"/>
> <filter
> class="com.ponila.set.textanalyzer.PersianCustomNormalizerFilterFactory"/>
>    </analyzer>
> </fieldType>
> but i get this error when i added a core to solr:
>
> org.apache.solr.common.SolrException: Could not load conf for core
> post: Plugin init failure for [schema.xml] fieldType
> "sample_normalizer": Plugin init failure for [schema.xml]
> analyzer/filter: Error loading class
> 'com.ponila.set.textanalyzer.PersianCustomNormalizerFilterFactory'.
> Schema file is D:\solr-5.3.1\example\poinila\solr\post\conf\schema.xml
>         at
> org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:80)
>         at
> org.apache.solr.core.CoreContainer.create(CoreContainer.java:721)
>         at
> org.apache.solr.core.CoreContainer.create(CoreContainer.java:697)
>         at
> org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:629)
>         at
> org.apache.solr.handler.admin.CoreAdminHandler.handleRequestInternal(CoreAdminHandler.java:214)
>         at
> org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:194)
>         at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)
>         at
> org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:675)
>         at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:443)
>         at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:214)
>         at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
>         at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>         at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
>         at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
>         at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>         at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
>         at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
>         at org.eclipse.jetty.server.Server.handle(Server.java:499)
>         at
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
>         at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
>         at
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
>         at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
>         at java.lang.Thread.run(Thread.java:744)
> Caused by: org.apache.solr.common.SolrException: Plugin init failure
> for [schema.xml] fieldType "sample_normalizer": Plugin init failure
> for [schema.xml] analyzer/filter: Error loading class
> 'com.ponila.set.textanalyzer.PersianCustomNormalizerFilterFactory'.
> Schema file is D:\solr-5.3.1\example\poinila\solr\post\conf\schema.xml
>         at
> org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:596)
>         at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:175)
>         at
> org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55)
>         at
> org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69)
>         at
> org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:104)
>         at
> org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:75)
>         ... 30 more
> Caused by: org.apache.solr.common.SolrException: Plugin init failure
> for [schema.xml] fieldType "sample_normalizer": Plugin init failure
> for [schema.xml] analyzer/filter: Error loading class
> 'com.ponila.set.textanalyzer.PersianCustomNormalizerFilterFactory'
>         at
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:178)
>         at
> org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:489)
>         ... 35 more
> Caused by: org.apache.solr.common.SolrException: Plugin init failure
> for [schema.xml] analyzer/filter: Error loading class
> 'com.ponila.set.textanalyzer.PersianCustomNormalizerFilterFactory'
>         at
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:178)
>         at
> org.apache.solr.schema.FieldTypePluginLoader.readAnalyzer(FieldTypePluginLoader.java:399)
>         at
> org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:104)
>         at
> org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:52)
>         at
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:152)
>         ... 36 more
> Caused by: org.apache.solr.common.SolrException: Error loading class
> 'com.ponila.set.textanalyzer.PersianCustomNormalizerFilterFactory'
>         at
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:491)
>         at
> org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:560)
>         at
> org.apache.solr.schema.FieldTypePluginLoader$3.create(FieldTypePluginLoader.java:381)
>         at
> org.apache.solr.schema.FieldTypePluginLoader$3.create(FieldTypePluginLoader.java:375)
>         at
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:152)
>         ... 40 more
> Caused by: java.lang.ClassNotFoundException:
> com.ponila.set.textanalyzer.PersianCustomNormalizerFilterFactory
>         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:789)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:270)
>         at
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:475)
>         ... 44 more
>
> how i solve this?
>
> plzzzzzz help me
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message