lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karthik N S" <kart...@controlnet.co.in>
Subject RE: BOOLEAN EXCEPTION APPSERVER
Date Fri, 11 Feb 2005 09:52:55 GMT
Hi

   I removed the Lucene1.4.3.jar from the webapp dir and the result
Exception raised


Feb 11, 2005 3:48:26 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Error configuring application listener of class
com.controlnet.servertool.WebContextReporter
java.lang.NoClassDefFoundError: org/apache/lucene/analysis/Analyzer
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
        at java.lang.Class.getConstructor0(Class.java:1762)
        at java.lang.Class.newInstance0(Class.java:276)
        at java.lang.Class.newInstance(Class.java:259)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3546)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4031)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
55)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:886)
        at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:849
)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
        at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1079)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:437)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2009)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:538)

So this mean's I have Only one Copy of Lucene in the Classpath of Tomcat5

and The same Exceptions are also avaliable for Windows2000 / Linux gentoo
servers.

Please Help

Thx in advance

-----Original Message-----
From: Miles Barr [mailto:miles@runtime-collective.com]
Sent: Friday, February 11, 2005 2:51 PM
To: Lucene Users List
Subject: Re: BOOLEAN EXCEPTION APPSERVER


On Fri, 2005-02-11 at 12:20 +0530, Karthik N S wrote:
> I am getting this error on  ' Every FIRST SEARCH  after  Startup of
> the WEBSERVER '
>
> and I have declared the following code only once in the  method of
> execution
>
>
> <%@ page import="org.apache.lucene.search.BooleanQuery"%>
> BooleanQuery.setMaxClauseCount(Integer.MAX_VALUE);
>
> The Exception  is as follows
>
> Feb 11, 2005 12:16:42 PM org.apache.catalina.core.StandardWrapperValve
> invoke
> SEVERE: Servlet.service() for servlet jsp threw exception
> java.lang.LinkageError: duplicate class definition:
> org/apache/lucene/search/BooleanQuery
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
> at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
> at
>
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo
ader.java:1626)
> at
>
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.jav
a:850)
> at
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1299)
> at
>
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1181)
> at
> org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:148)
> at
> org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:69)

> o/S  = Gentoo Linux
> java = 1.4.1
> Ram = 256
> webserver Tomcat5.5.3

It looks like the class definition is being loaded twice. But if it's
being done by different classloaders it should be fine. You might have
two different versions on Lucene being loaded. Tomcat uses several
classloaders depending on where it finds the JAR file:

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html

Make sure you only have one copy of the Lucene JAR visible to Tomcat.



--
Miles Barr <miles@runtime-collective.com>
Runtime Collective Ltd.


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message