lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Soika <ralph.so...@imixs.com>
Subject Lucene 6 Support in Wildfly 10 ?
Date Fri, 26 Aug 2016 17:34:54 GMT
Hi,

I try to migrate the lucene version from 4.10.4 to 6.2.0 (or 5.5.2) in 
my application, which is running on Wildfly 10 with java 8.
When I try to create a Lucene IndexWriter :

// create a IndexWriter Instance
Directory indexDir = FSDirectory.open(Paths.get(indexDirectoryPath));
IndexWriterConfig indexWriterConfig;
indexWriterConfig = new IndexWriterConfig( new ClassicAnalyzer());
writer= new IndexWriter(indexDir, indexWriterConfig);

I got the following exception:

  java.util.ServiceConfigurationError: Cannot instantiate SPI class: 
org.apache.lucene.codecs.simpletext.SimpleTextPostingsFormat
   at org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:82)
   at org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:51)
   at org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:38)
   at 
org.apache.lucene.codecs.PostingsFormat$Holder.<clinit>(PostingsFormat.java:49) 

   at 
org.apache.lucene.codecs.PostingsFormat.forName(PostingsFormat.java:112)
   at 
org.apache.lucene.codecs.lucene54.Lucene54Codec.<init>(Lucene54Codec.java:161) 

   at 
org.apache.lucene.codecs.lucene54.Lucene54Codec.<init>(Lucene54Codec.java:81) 

   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)


   at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)


   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
   at java.lang.Class.newInstance(Class.java:442)
   at org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:72)
   at org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:51)
   at org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:38)
   at org.apache.lucene.codecs.Codec$Holder.<clinit>(Codec.java:47)
   at org.apache.lucene.codecs.Codec.getDefault(Codec.java:140)
   at 
org.apache.lucene.index.LiveIndexWriterConfig.<init>(LiveIndexWriterConfig.java:120)


   at 
org.apache.lucene.index.IndexWriterConfig.<init>(IndexWriterConfig.java:140) 

   at 
org.imixs.workflow.lucene.LuceneUpdateService.createIndexWriter(LuceneUpdateService.java:308)


   at 
org.imixs.workflow.lucene.LuceneUpdateService.updateDocuments(LuceneUpdateService.java:230)


   at 
org.imixs.workflow.lucene.LuceneUpdateService.updateDocument(LuceneUpdateService.java:213)


   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 

   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 

   at java.lang.reflect.Method.invoke(Method.java:498)
   at 
org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)


   at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 

   at 
org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437) 

   at 
org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)


   at 
org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)


   at 
org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)


   at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 

   at 
org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)


   at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 

   at 
org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437) 

   at 
org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)


   at 
org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)


   at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 

   at 
org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)


   at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 

   at 
org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) 

   at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 

   at 
org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) 

   at 
org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)


   at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 

   at 
org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:53)


   at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 

   at 
org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:254) 

   ... 221 more
Caused by: java.lang.IllegalAccessException: Class 
org.apache.lucene.util.NamedSPILoader can not access a member of class 
org.apache.lucene.codecs.simpletext.SimpleTextPostingsFormat with 
modifiers "public"

I did not understand what this exception means to me.

Thanks for any help.

===
Ralph




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