NoClassDefFoundError without a class name

I'm not quite sure if this is specific to Sun Java Systems Application Server but there are occasions where I run into a NoClassDefFoundError where the class in question, the one not found, is not mentioned in the error.

Does anyone know what conditions would lead to a NoClassDefFoundError being raised without specifying which class was not found?

Edit: Java 1.4


Asked by: Dexter310 | Posted: 28-01-2022






Answer 1

are you using Java 5 ?

There is a bug about your problem and it is corrected for Java 6.

Here is the reference

Answered by: Thomas666 | Posted: 01-03-2022



Similar questions

java - NoClassDefFoundError without any class name

I am trying to run a java task from ant. I am trying to run the "org.apache.tools.ant.launch.Launcher" class. I keep on getting the "NoClassDefFoundError" without any class name being specified. I am also getting a "ClassNotFoundException" along with that displaying a message "Could not find the main class: . Program will exit". Here's a snippet of the error [java] Exception in thread "main" java.lang.NoCl...


oop - NoClassDefFoundError when using class

I am learning Java from scratch. I installed the JDK, and I got the Hello World Program running. I am trying to run a simple accountdemo program. In Account.java, I have : public class Account { protected double balance; // Constructor to initialize balance public Account( double amount ) { balance = amount; } // Overloaded constructor for empty balance public Account() { bala...


java - NoClassDefFoundError and Could not find or load main class

I am using the code from Rome's tutorials page http://wiki.java.net/twiki/bin/view/Javawsxml/Rome05TutorialFeedReader . Also trying this one: http://wiki.java.net/twiki/bin/view/Javawsxml/Rome05TutorialFeedReader Co...


java - NoClassDefFoundError but class is there

I get the following Android exception if launching the following code. I have a server - client application and an server agent which communicated with each other. Now I just get this exception in the Android application and not on the server agent. I know that this worked some time before correctly. 12-18 20:36:41.626: E/AndroidRuntime(19441): FATAL EXCEPTION: AsyncTask #1 12-18 20:36:41.626: E/AndroidRunt...


java - NoClassDefFoundError on class present in jar

I searched a lot, but could not find a solution for my issue. I generated stubs from a wsdl using wsimport, and added to my project. Following is the error I get when I try to initialize a class MyServiceEp from the stub. I identify this as probably a j-boss 7 issue. But I am new to the server and do not know the workaround for this. I tried adding <property name="org.jboss....


java - NoClassDefFoundError when trying to load class

I am getting a java.lang.NoClassDefFoundError when trying to instantiate some class I will try to simplify the structure of my projects: I have 2 jar files A (with a.class inside) and B (with b.class) I am trying to instantiate a 'b' class inside 'a' code. JAR A is dependant on JAR B. JAR A is a regular JAR file which is located in application/lib and JAR B...


java - NoClassDefFoundError : cannot find main class in jar file

After countless days of trying to find an answer to my question, I've decided to post it here. I've been developping a monitoring application for my company, and as I'm about to distribute it, the jar file seems not runnable. The exact error is : Error: Could not find or load main class net.nephty.connectwisemonitoring.app.Main Caused by: java.lang.ClassNotFoundException: net.nephty.connectwisemonitoring.app...


NoClassDefFoundError while trying to run my jar with java.exe -jar...what's wrong?

I have an application that I'm trying to wrap into a jar for easier deployment. The application compiles and runs fine (in a Windows cmd window) when run as a set of classes reachable from the CLASSPATH. But when I jar up my classes and try to run it with java 1.6 in the same cmd window, I start getting exceptions: C:\dev\myapp\src\common\datagen>C:/apps/jdk1.6.0_07/bin/java.exe -classpath C:\myapp\lib...


java - NoClassDefFoundError on command-line with new NetBeans project

I've created a new J2SE project in NetBeans, and I can run it from the IDE, but when I try to run it using Ant on the command line, I get the following problem: <snip> run: [java] Exception in thread "main" java.lang.NoClassDefFoundError: IndexBuilder [java] Java Result: 1 <snip> Based on the snippet from project.properties below, the clas...


java - NoClassDefFoundError on JFace FontRegistry

When I launch an SWT application (via an Eclipse launch profile), I receive the following stack trace: Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jface/resource/FontRegistry at org.eclipse.jface.resource.JFaceResources.getFontRegistry(JFaceResources.java:338) at org.eclipse.jface.window.Window.close(Window.java:313) at org.eclipse.jface.dialogs.Dialog.close(Dialog.jav...


java - Why is this NoClassDefFoundError being thrown when the class exists?

I've tried to create a generic Observable class that I can use in my program: public class GeoGolfObserver<T> extends Observable { public GeoGolfObserver() { super(); } public void passObject(T object) { setChanged(); notifyObservers(object); } } It is created using: GeoGolfObserver<Cache> cacheObserver = new GeoG...


java - NoClassDefFoundError inside jar

I have a class that that sits in a package called com.toptur.sysTray all it does is load system tray it does not use any external packages. i create a SysTray object to install the system tray. Everthing builds fine. i can run the application from command line and systray gets installed. But when i try to create a jar from the class files and run it i get NoClassDefFoundError. Package and its class files are in the...


java - Ant + JUnit: NoClassDefFoundError

Ok, I'm frustrated! I've hunted around for a good number of hours and am still stumped. Environment: WinXP, Eclipse Galileo 3.5 (straight install - no extra plugins). So, I have a simple JUnit test. It runs fine from it's internal Eclipse JUnit run configuration. This class has no dependencies on anything. To narrow this problem down as much as possible it simply contains: @Test public v...


unix - Java Application NoClassDefFoundError

Created a Java application to upload documents via CIS (Content Integration Suite) to a storage application. The app runs successfully in RAD, but as a executable jar in a unix environment, getting a NoClassDefFoundError. I can not find the class on my local machine and there are not references to the class on the internet. The manifest contains that class path for the needed jar files and the main class. ...


jax rpc - Java JAX-RPC NoClassDefFoundError

I am new to JAX-RPC. I tried creating a simple Java bean in RAD 7.0, and went through the options to create a JAX-RPC webservice. My method is as below. public byte[] getData(byte[] argument) { <Customclass> proxy = new <Customclass>(); List outputList = new ArrayList(); try { // Call a method on proxy } catch (Exception e) { // TODO Auto-generated catch block ...


java - Catching webservice exception with CXF: NoClassDefFoundError: SOAPFaultBuilder

I've been using Apache CXF wsdl2java generated code to call methods from a webservice for some time now, which so far has been working fine.. The problem I'm having is that when the webservice (implemented just down the hall from me) legitimately throws a soap exception, CXF comes up with the following Error message: Could not initialize class com.sun.xml.internal.ws.fault.SOAPFaultBuilder


Java in bash at university fails with NoClassDefFoundError

I know there are many posts concerning NoClassDefFoundError, they all seem to be talking about jar files. While I'm comfortable with java in eclipse, I'm pretty lost as to why the simplest thing I can come up with is not functioning, unless they broke something on the university side of this. public class hello { public static void main (String args[]) { System.out.println ("Hello World!"); ...






Still can't find your answer? Check out these amazing Java communities for help...



Java Reddit Community | Java Help Reddit Community | Dev.to Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)



top