#89 ANts Logger not found

closed
nobody
None
5
2011-01-21
2010-11-29
johndoe32102002
No

When compiling ANts with ant, the jar under the dist folder will not run because of this error:

java -jar ANts*
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at ants.p2p.Ant.<clinit>(Ant.java:54)
at ants.p2p.gui.FrameAnt.<clinit>(FrameAnt.java:51)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
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)
... 2 more
Could not find the main class: ants.p2p.gui.FrameAnt. Program will exit.

Here are the compiling warnings (18):
[javadoc] /home/user/temp/ANtsP2P/src/ants/p2p/utils/donkey/DonkeyHashFile.java:89: warning - @param argument "fis" is not a parameter name.
[javadoc] /home/user/temp/ANtsP2P/src/ants/p2p/utils/encoding/Base64.java:912: warning - Tag @link: can't find InputStream in ants.p2p.utils.encoding.Base64
[javadoc] /home/user/temp/ANtsP2P/src/ants/p2p/utils/encoding/Base64.java:1147: warning - Tag @link: can't find OutputStream in ants.p2p.utils.encoding.Base64
[javadoc] /home/user/temp/ANtsP2P/src/ants/p2p/utils/encoding/Base64.java:371: warning - @options is an unknown tag.
[javadoc] /home/user/temp/ANtsP2P/src/ants/p2p/utils/encoding/Base64.java:506: warning - @param argument "breakLines" is not a parameter name.
[javadoc] /home/user/temp/ANtsP2P/src/ants/p2p/utils/encoding/Base64.java:930: warning - Tag @link: can't find InputStream in ants.p2p.utils.encoding.Base64
[javadoc] /home/user/temp/ANtsP2P/src/ants/p2p/utils/encoding/Base64.java:957: warning - Tag @link: can't find InputStream in ants.p2p.utils.encoding.Base64
[javadoc] /home/user/temp/ANtsP2P/src/ants/p2p/utils/encoding/Base64.java:1165: warning - Tag @link: can't find OutputStream in ants.p2p.utils.encoding.Base64
[javadoc] /home/user/temp/ANtsP2P/src/ants/p2p/utils/encoding/Base64.java:1191: warning - Tag @link: can't find OutputStream in ants.p2p.utils.encoding.Base64
[javadoc] /home/user/temp/ANtsP2P/src/ants/p2p/utils/misc/Random.java:76: warning - @status is an unknown tag.
[javadoc] /home/user/temp/ANtsP2P/src/ants/p2p/utils/misc/Random.java:170: warning - @param argument "seed" is not a parameter name.
[javadoc] /home/user/temp/ANtsP2P/src/com/limegroup/gnutella/bootstrap/BootstrapServer.java:24: warning - Tag @see: reference not found: GWebCache
[javadoc] /home/user/temp/ANtsP2P/src/com/limegroup/gnutella/bootstrap/BootstrapServer.java:24: warning - Tag @see: reference not found: HostCatcher
[javadoc] /home/user/temp/ANtsP2P/src/ants/p2p/utils/misc/Random.java:107: warning - Tag @see: can't find next() in ants.p2p.utils.misc.Random
[javadoc] Building index for all the packages and classes...
[javadoc] Building index for all classes...
[javadoc] Generating /home/user/temp/ANtsP2P/dist/javadoc/stylesheet.css...
[javadoc] 18 warnings

Discussion

  • Roberto Rossi
    Roberto Rossi
    2011-01-21

    You have to include the Apache log4j distribution in your list of libraries (classpath) when you compile.

     
  • Roberto Rossi
    Roberto Rossi
    2011-01-21

    • status: open --> closed