Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
01-27-2013, 04:34 PM #1
- Join Date
- Jan 2011
- Thanked 0 Times in 0 Posts
Exception Error - Shed Some Light?
I need help with this problem please I would like to know what this error is telling me. Thank you guys <3
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/ftpserver/ftplet/FtpException Caused by: java.lang.ClassNotFoundException: org.apache.ftpserver.ftplet.FtpException at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) Could not find the main class: com.spilka.server.ChatServer. Program will exit
C:\Users\Administrator>java -cp c:\server.zip com.spilka.server.ChatServer Exception in thread "main" java.lang.NullPointerException at com.spilka.server.ChatServer.q(Unknown Source) at com.spilka.server.ChatServer.q(Unknown Source) at com.spilka.server.ChatServer.<init>(Unknown Source) at com.spilka.server.ChatServer.main(Unknown Source)
01-28-2013, 03:33 PM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,648 Times in 2,617 Posts
The first one appears to be missing the external library. Make sure you add the library on the classpath when invoking it (or as a part of the manifest if its jar'd). It also appears to not be able to invoke the main method on com.spilka.server.ChatServer.
The second is simply caused by a non-instance of an object which you are attempting to dereference. To what depth, we don't know you'll need to trace the stack to get to the cause. So within the main, you can follow the tack to the q and find that something is being derferenced which is null. Perhaps the argument itself is null. It can be try/caught since its an Exception to prevent the program from terminating, but that only has use if you have a fallback to go on (which chances are would be an error message and then exit anyway).
Last edited by Fou-Lu; 01-28-2013 at 03:36 PM.PHP Code:
header('HTTP/1.1 420 Enhance Your Calm');