Another java.lang.noClassDefFoundError (JRADIUS)

Posted on 2009-02-19
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$ Source)

        at Method)

        at 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
    LVL 92

    Expert Comment

    how are you running it on the server?


    Author Comment

    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

    if you use the -jar option it ignores your classpath

    LVL 92

    Expert Comment

    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

    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

    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

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
    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…
    Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    733 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now