Learn how to a build a cloud-first strategyRegister Now


Another java.lang.noClassDefFoundError (JRADIUS)

Posted on 2009-02-19
Medium Priority
Last Modified: 2012-08-14

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


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)

Open in new window

Question by:marcelocbf
  • 4
  • 2
LVL 92

Expert Comment

ID: 23688248
how are you running it on the server?


Author Comment

ID: 23688517
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/mysql-connector-java-5.1.6-bin.jar:/var/lib/jre1.6.0_11/lib/jradius-core-1.0.0.jar:/var/lib/jre1.6.0_11/lib/jradius-dictionary-1.0.0.jar:/var/lib/jre1.6.0_11/lib/jradius-extended-1.0.0.jar:/var/lib/jre1.6.0_11/lib/gnu-crypto-2.0.1.jar:/var/lib/jre1.6.0_11/lib/bcprov-jdk15-140.jar:/var/lib/jre1.6.0_11/lib -jar MYJAR.jar

LVL 92

Accepted Solution

objects earned 2000 total points
ID: 23688565
if you use the -jar option it ignores your classpath

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 92

Expert Comment

ID: 23688781
java -cp var/lib/jre1.6.0_11/lib/mysql-connector-java-5.1.6-bin.jar:/var/lib/jre1.6.0_11/lib/jradius-core-1.0.0.jar:/var/lib/jre1.6.0_11/lib/jradius-dictionary-1.0.0.jar:/var/lib/jre1.6.0_11/lib/jradius-extended-1.0.0.jar:/var/lib/jre1.6.0_11/lib/gnu-crypto-2.0.1.jar:/var/lib/jre1.6.0_11/lib/bcprov-jdk15-140.jar:/var/lib/jre1.6.0_11/lib:MYJAR.jar my.package.MainClass


Author Comment

ID: 23688795
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 ...
LVL 92

Expert Comment

ID: 23688809
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 :)


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to implement Singleton Design Pattern in Java.
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month20 days, 17 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question