Topic on User talk:OrenBochman

Tim.landscheidt (talkcontribs)

As you seem to be a maven maven :-), perhaps you can shed some light on this: I'm using Fedora 16, and on a clean Git clone of mwdumper, mvn package successfully builds build/mwdumper-1.16.jar. But when I want to execute it:

[tim@passepartout ~/src/mwdumper.2]$ java -jar build/mwdumper-1.16.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream
        at org.mediawiki.dumper.Dumper.main(Dumper.java:129)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        ... 1 more
[tim@passepartout ~/src/mwdumper.2]$ java -classpath /usr/share/java/apache-commons-compress.jar -jar build/mwdumper-1.16.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream
        at org.mediawiki.dumper.Dumper.main(Dumper.java:129)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        ... 1 more
[tim@passepartout ~/src/mwdumper.2]$ unzip -l /usr/share/java/apache-commons-compress.jar | fgrep org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream
    15957  05-24-2012 18:33   org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.class
     1531  05-24-2012 18:33   org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream$Data.class
[tim@passepartout ~/src/mwdumper.2]$

Any idea why this doesn't work?

87.169.100.34 (talkcontribs)

I am seeing this problem as well when building mwdumper. This class is not included with the source code, so it's not compiled with the maven code from the git repository. Unfortunately I didn't find any documentation to solve this problem and mwdumper code has no documentation as well. Any help you find handles versions which are 5 or more years old :(

74.87.88.74 (talkcontribs)

Crazy enough, but on:

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/tools/mwdumper.git;a=summary

go back in time to this entry:

2009-11-22 Robert Stojnić Parse the title into Title format for liquid threads commit | commitdiff | tree | snapshot

and click on snapshot. Build from that download. You might find it works for you. For me, it was the first that didn't give me the headache you describe... all newer ones did.

Good luck!

193.22.173.10 (talkcontribs)

I removed all references with bz2 from the sources:

- commented out the BZip2 lines (with the corresponding "if else") and classes in Tools.java and Dumper.java

After that the project started successfully with the latest git.

Ofcourse, no bz2 for you.

193.22.173.10 08:50, 17 January 2013 (UTC)

Reply to "Problem with mwdumper"