Hi,

can you give the *full* stack trace including nested Exceptions (root causes)? 
There is also the problem, that the line numbers are not matching the ones from 
Lucene 4.0 - so maybe you are using different JAR versions in your webapp? This 
could be caused e.g. by an older lucene 4.0 JAR file together with codecs.jar 
of a different version. Please make sure that all JAR files are next to each 
other in the same classloader.

The problem here is *not* that the lucene-codecs.jar file is missing or the 
class was not found. Ignoring the line numbers and looking at the "message" 
text, the problem here is that the code was not able to create an instance of 
that class, but it already found and loaded it. The problem here is that you 
did not post the nested Exception so there is no chance to say, why calling the 
constructor failed. One reason may be a security manager in your application 
server, preventing to init the class, but this cannot be checked unless I have 
the full stack trace.

Does it work if you use standard codec? Why do you use appending? What happens 
when yu use only lucene-core.jar and use the default codec only? If you don't 
use appending codec then there is something really crazy with your setup and we 
need, in any case, the full stack trace.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


> -----Original Message-----
> From: Igal @ getRailo.org [mailto:i...@getrailo.org]
> Sent: Wednesday, January 09, 2013 4:53 AM
> To: java-user@lucene.apache.org
> Subject: Cannot instantiate SPI class
> 
> I'm trying to access Lucene4 from Railo (an open-source application server)
> 
> when I try to create an IndexWriterConfig I get the error:  Cannot
> instantiate SPI class: org.apache.lucene.codecs.appending.AppendingCodec
> 
> any ideas?
> 
> TIA
> 
> stacktrace below:
> 
> Cannot instantiate SPI class:
> org.apache.lucene.codecs.appending.AppendingCodec at
> org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:104):
> 104 at
> org.apache.lucene.codecs.PostingsFormat.forName(PostingsFormat.java:10
> 0):100
> at
> org.apache.lucene.codecs.lucene40.Lucene40Codec.<init>(Lucene40Codec.j
> ava:114):114
> at
> org.apache.lucene.codecs.appending.AppendingCodec.<init>(AppendingCo
> dec.java:34):34
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method):-2 at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source):-
> 1
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source):-1 at java.lang.reflect.Constructor.newInstance(Unknown
> Source):-1 at java.lang.Class.newInstance0(Unknown Source):-1 at
> java.lang.Class.newInstance(Unknown Source):-1 at
> org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:62):62
> at
> org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:42):42
> at
> org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:37):37
> at org.apache.lucene.codecs.Codec.<clinit>(Codec.java:41):41 at
> org.apache.lucene.index.LiveIndexWriterConfig.<init>(LiveIndexWriterConfi
> g.java:118):118
> at
> org.apache.lucene.index.IndexWriterConfig.<init>(IndexWriterConfig.java:1
> 45):145
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method):-2 at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source):-
> 1
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source):-1 at java.lang.reflect.Constructor.newInstance(Unknown
> Source):-1 at
> railo.runtime.reflection.pairs.ConstructorInstance.invoke(ConstructorInstanc
> e.java:34):34
> at
> railo.runtime.reflection.Reflector.callConstructor(Reflector.java:653):653
> at railo.runtime.java.JavaObject.init(JavaObject.java:311):311 at
> railo.runtime.java.JavaObject.call(JavaObject.java:235):235 at
> railo.runtime.java.JavaObject.call(JavaObject.java:272):272 at
> railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Variabl
> eUtilImpl.java:723):723
> at
> railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1506):150
> 6 at
> s21.search.lucene4search_cfc$cf._1(E:\Websites\_S21WAF\CFC\s21\search\
> Lucene4Search.cfc:92):92
> at
> s21.search.lucene4search_cfc$cf.udfCall(E:\Websites\_S21WAF\CFC\s21\sea
> rch\Lucene4Search.cfc):-1
> at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:103):103 at
> railo.runtime.type.UDFImpl._call(UDFImpl.java:371):371 at
> railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284 at
> railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:775):775
> at
> railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Variabl
> eUtilImpl.java:723):723
> at
> railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1506):150
> 6 at
> s21.search.lucene4search_cfc$cf._1(E:\Websites\_S21WAF\CFC\s21\search\
> Lucene4Search.cfc:142):142
> at
> s21.search.lucene4search_cfc$cf.udfCall(E:\Websites\_S21WAF\CFC\s21\sea
> rch\Lucene4Search.cfc):-1
> at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:103):103 at
> railo.runtime.type.UDFImpl._call(UDFImpl.java:371):371 at
> railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284 at
> railo.runtime.ComponentImpl._call(ComponentImpl.java:572):572 at
> railo.runtime.ComponentImpl._call(ComponentImpl.java:490):490 at
> railo.runtime.ComponentImpl.call(ComponentImpl.java:1781):1781 at
> railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Variabl
> eUtilImpl.java:723):723
> at
> railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1506):150
> 6 at
> _test.lucene4_cfm$cf.call(E:\Websites\21solutions\_test\lucene4.cfm:14):14
> at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:772):772
> at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:753):753
> at
> railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.
> java:183):183
> at
> railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:
> 18):18
> at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2255):2255
> at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2222):2222
> at
> railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:31
> 5):315
> at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:29):29 at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:722):722 at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
> lterChain.java:305):305
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChai
> n.java:210):210
> at
> net.twentyonesolutions.servlet.filters.RequestThreadsMonitor.doFilter(Req
> uestThreadsMonitor.java:152):152
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
> lterChain.java:243):243
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChai
> n.java:210):210
> at
> net.twentyonesolutions.servlet.filters.BlockedIpFilter.doFilter(BlockedIpFilte
> r.java:90):90
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
> lterChain.java:243):243
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChai
> n.java:210):210
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:222):222
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> ve.java:123):123
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
> 168):168
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:9
> 9):99
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:118):118
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:4
> 07):407
> at
> org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197):
> 197
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Ab
> stractProtocol.java:585):585
> at
> org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.j
> ava:1813):1813
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source):-1
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source):-
> 1
> at java.lang.Thread.run(Unknown Source):-1
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to