marcelocbf
asked on
Another java.lang.noClassDefFoundError (JRADIUS)
Hello,
I'm developing an application to use a library JRadius. I downloaded their package with some .JAR files in it. I added them to Netbeans, developed, tested (some parts, because of the nature of the application, but runs fine).
But I get NoClassDefFoundError when trying to run on the server ... I really have no idea what that should be, and I'm tired of testing .. maybe there is something I'm missing.
The .JAR files are on the classpath, I downloaded them 3 times to make sure they are not corrupted
Below is my ClassPath variable
CLASSPATH=/var/lib/jre1.6. 0_11/lib/m ysql-conne ctor-java- 5.1.6-bin. jar:/var/l ib/jre1.6. 0_11/lib/j radius-cor e-1.0.0.ja r:/var/lib /jre1.6.0_ 11/lib/jra dius-dicti onary-1.0. 0.jar:/var /lib/jre1. 6.0_11/lib /jradius-e xtended-1. 0.0.jar:/v ar/lib/jre 1.6.0_11/l ib/gnu-cry pto-2.0.1. jar:/var/l ib/jre1.6. 0_11/lib/b cprov-jdk1 5-140.jar: /var/lib/j re1.6.0_11 /lib
Thanks in advance,
Here is the error ...
I'm developing an application to use a library JRadius. I downloaded their package with some .JAR files in it. I added them to Netbeans, developed, tested (some parts, because of the nature of the application, but runs fine).
But I get NoClassDefFoundError when trying to run on the server ... I really have no idea what that should be, and I'm tired of testing .. maybe there is something I'm missing.
The .JAR files are on the classpath, I downloaded them 3 times to make sure they are not corrupted
Below is my ClassPath variable
CLASSPATH=/var/lib/jre1.6.
Thanks in advance,
Here is the error ...
Exception in thread "main" java.lang.NoClassDefFoundError: net/jradius/packet/attribute/RadiusAttribute
Caused by: java.lang.ClassNotFoundException: net.jradius.packet.attribute.RadiusAttribute
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)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
how are you running it on the server?
ASKER
I invoked it in a lot of ways ...
My class is in a JAR file with it as a Main class ...
java -jar MYJAR.jar
java -jar MYJAR.jar -Xdebug
java -cp MYJAR.jar my.package.MainClass
java -cp var/lib/jre1.6.0_11/lib/my sql-connec tor-java-5 .1.6-bin.j ar:/var/li b/jre1.6.0 _11/lib/jr adius-core -1.0.0.jar :/var/lib/ jre1.6.0_1 1/lib/jrad ius-dictio nary-1.0.0 .jar:/var/ lib/jre1.6 .0_11/lib/ jradius-ex tended-1.0 .0.jar:/va r/lib/jre1 .6.0_11/li b/gnu-cryp to-2.0.1.j ar:/var/li b/jre1.6.0 _11/lib/bc prov-jdk15 -140.jar:/ var/lib/jr e1.6.0_11/ lib -jar MYJAR.jar
My class is in a JAR file with it as a Main class ...
java -jar MYJAR.jar
java -jar MYJAR.jar -Xdebug
java -cp MYJAR.jar my.package.MainClass
java -cp var/lib/jre1.6.0_11/lib/my
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
java -cp var/lib/jre1.6.0_11/lib/my sql-connec tor-java-5 .1.6-bin.j ar:/var/li b/jre1.6.0 _11/lib/jr adius-core -1.0.0.jar :/var/lib/ jre1.6.0_1 1/lib/jrad ius-dictio nary-1.0.0 .jar:/var/ lib/jre1.6 .0_11/lib/ jradius-ex tended-1.0 .0.jar:/va r/lib/jre1 .6.0_11/li b/gnu-cryp to-2.0.1.j ar:/var/li b/jre1.6.0 _11/lib/bc prov-jdk15 -140.jar:/ var/lib/jr e1.6.0_11/ lib:MYJAR. jar my.package.MainClass
ASKER
Man ... Just three words I LOVE YOU !!!!
Three days I've spent on this ...
How can't I find this information elsewhere on the web ????
Thanks again ...
Three days I've spent on this ...
How can't I find this information elsewhere on the web ????
Thanks again ...
cause theres so much rubbish on the web these days its becoming increasingly difficult to find the answers you need.
glad I could help you out :)
glad I could help you out :)