Menu

NoClassDefFoundError - New to this!

Help
Tim
2006-10-05
2012-09-04
  • Tim

    Tim - 2006-10-05

    Hi,

    As you will probably be immediately aware, I'm quite new to this.

    I am running the following command line in XP:

    java -jar webharvest026.jar config=c:\wh\examples\expekt.xml workdir=c:\wh\

    and get this error no matter what I do:

    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator at CommandLine.main(Unknown Source)

    I know I am doing something wrong, I just don't know what. Help please!?

    Many thanks!

    Tim

     
    • zoombongo

      zoombongo - 2006-10-12

      Thank you ofr fixing this so quickly. webharvest0261 works great now.

       
    • Vladimir Nikic

      Vladimir Nikic - 2006-10-05

      You didn't specify classpath for dependant JARs.
      use -classpath or -cp parameter. Or, put all jars in the same directory (webharvest26.jar + all dependancies) and it will work without specifying classpath.

       
      • Tim

        Tim - 2006-10-05

        Okay, excellent and thank you, a little further ahead. Now I have this error:

        Exception in thread "main" java.lang.NoClassDefFoundError: org/ccil/cowan/tagsoup/Parser

        By the way, I copied all the jar files in to the same folder as webharvest026.jar.

        Thank you for the help and sorry to be a pain.

         
        • Vladimir Nikic

          Vladimir Nikic - 2006-10-05

          Now it seems that the file tagsoup-1.0.1.jar is missing from the class path.

           
          • Tim

            Tim - 2006-10-05

            Well I thought that but I did double check I had copied it alone with all the other files. Here is the name of file that I have included in the path:

            tagsoup-1.0.1.jar

            I also downloaded the file from the creators website to ensure there was no corruption and I stil get the same error.

            Sorry about this!

            Tim

             
    • Tim

      Tim - 2006-10-08

      Sorted.

      I asked a friend who knows a lot more than me about Java! I hear you all saying not difficult :)

      I downloaded eclipse SDK and it ran fine. It was the easiest way for me to set up all the classpath's as I just couldn't do it at command line using -classpath or -cp, my syntax must have just not been correct.

      Cheers!

       
    • zoombongo

      zoombongo - 2006-10-12

      Running on XP SP2

      I'm also seeing this error when I try to use the examples. I have all the files in one dir, both zipped and unzipped. The classpath enviornment variable is set to include the dir with all the files but I still get this error.

      Exception in thread "main" java.lang.NoClassDefFoundError: org/ccil/cowan/tagsoup/Parser

      Anyhelp would be appreciated.

       
    • Vladimir Nikic

      Vladimir Nikic - 2006-10-12

      It was minor bug. Sorry. After adding new version of dependant library (TagSoup) I've forgotten to update manifest file (META-INF\MANIFEST.MF inside Web-Harvest jar file) which contains exact names of dependant jars. Now I created new version for download (webharvest0261.jar) but only change is inside the webharvest026.jar/META-INF/MANIFEST.MF file where instead of "tagsoup-1.0rc3.jar" should be "tagsoup-1.0.1.jar". If you don't want to download new jar, just fix it manualy.

       

Log in to post a comment.