Results 1 to 5 of 5
  1. #1
    djgovins is offline Member
    Join Date
    Jun 2011
    Location
    India
    Posts
    10
    Rep Power
    0

    Default 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.

    Java Code:
    java.lang.ClassNotFoundException : org.apache.lucene.analysis.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.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default

    Where are you deploying that jar file?
    Is this a Tomcat server?

  3. #3
    djgovins is offline Member
    Join Date
    Jun 2011
    Location
    India
    Posts
    10
    Rep Power
    0

    Default

    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.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default

    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.

  5. #5
    djgovins is offline Member
    Join Date
    Jun 2011
    Location
    India
    Posts
    10
    Rep Power
    0

Similar Threads

  1. Error -- java.lang.ClassNotFoundException
    By dewitrydan in forum New To Java
    Replies: 18
    Last Post: 03-02-2012, 04:25 PM
  2. Replies: 8
    Last Post: 11-04-2010, 01:46 PM
  3. java.lang.ClassNotFoundException
    By ravian in forum New To Java
    Replies: 1
    Last Post: 01-07-2008, 10:31 AM
  4. Replies: 1
    Last Post: 07-23-2007, 11:54 PM
  5. Replies: 1
    Last Post: 06-27-2007, 05:57 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •