Results 1 to 5 of 5
Thread: java.lang.ClassNotFoundException
- 07-24-2011, 08:16 PM #1
Member
- Join Date
- Jun 2011
- Location
- India
- Posts
- 10
- Rep Power
- 0
java.lang.ClassNotFoundException
I am trying in my doGet code in lucene.java (in the WEB-INF/classes directory) to index some files. But it gives the following error (500 Error) at the point where I declare an analyzer.
I have checked in my lucene-core-3.3.0.jar file and confirmed that this .class file named Analyzer.class exists. I am also properly appending this path to this jar file into the classpath variable (and then exporting it). Where could I be possibly going wrong ? Please help.Java Code:java.lang.ClassNotFoundException : org.apache.lucene.analysis.Analyzer
- 07-25-2011, 10:26 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Where are you deploying that jar file?
Is this a Tomcat server?
- 07-25-2011, 10:38 AM #3
Member
- Join Date
- Jun 2011
- Location
- India
- Posts
- 10
- Rep Power
- 0
Yeah, it is a tomcat6 server.
The lucene-core-3.3.0.jar file is in some random directory, that I have included in my classpath.
- 07-25-2011, 10:41 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Tomcat doesn't work like that.
The classpath is irrelevant to your webapp.
You jar needs to be deployed with your app, and will end up in the WEB-INF/lib directory. Tomcat treats that directory as the classpath for your app.
- 07-25-2011, 11:54 AM #5
Member
- Join Date
- Jun 2011
- Location
- India
- Posts
- 10
- Rep Power
- 0
Similar Threads
-
Error -- java.lang.ClassNotFoundException
By dewitrydan in forum New To JavaReplies: 18Last Post: 03-02-2012, 04:25 PM -
java.lang.ClassNotFoundException: com.sun.star.lang.XEventListener
By Leroy in forum Advanced JavaReplies: 8Last Post: 11-04-2010, 01:46 PM -
java.lang.ClassNotFoundException
By ravian in forum New To JavaReplies: 1Last Post: 01-07-2008, 10:31 AM -
java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
By simon in forum EclipseReplies: 1Last Post: 07-23-2007, 11:54 PM -
java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
By Marcus in forum JDBCReplies: 1Last Post: 06-27-2007, 05:57 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks