noclassdeffounderror

NoClassDefFoundError: javax/swing/GroupLayout$Group on Mac Computer

I am having a runtime error ONLY when I test my Java program on a mac computer. It tests perfectly fine on various Windows operating systems. This is the error message I get on a Mac computer... Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/swing/GroupLayout$Group at project.MainPanel.calculateButton...

Java NoClassDefFoundError when the jar clearly has it

I have a simple class that imports another class from another jar. Everything compiles great, but trying to run it... $ jar tvf ../../pig-2.1.jar | grep TupleFact 1641 Mon Feb 02 17:56:32 UTC 2009 org/apache/pig/data/DefaultTupleFactory.class 2289 Mon Feb 02 17:56:30 UTC 2009 org/apache/pig/data/TupleFactory.class $ javac ../src/Conver...

NoClassDefFoundError in spring

Hello, I wrote a Spring application which runs on Weblogic 10.3. In this application I have some JMS Queue consumers. Sometimes I got an error when the application is closing or opening (I saw this error in both situation) saying: java.lang.NoClassDefFoundError: org/springframework/jms/connection/SmartConnectionFactory at...

Class-path in manifest not read when running jar in Unix

Hi, I have a client application that needs to run on Unix. It works fine in Windows but i get a NoClassDefFound exception in unix. Here's my manifest file: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.6.5 Created-By: 2.3 (IBM Corporation) Main-Class: com.main.Client Class-Path: lib/commons-lang-2.3.jar lib/commons-io-1.3.2.jar lib/...

Java: Load class while jar-file is updated

My Java program loads classes dynamically at runtime. All classes are located in the same jar. After deploying a new jar file, I sometimes get errors while the jar file is copying (NoClassDefFoundError etc.). This goes away the next time I run the program of course. Is there a way to preload classes so that my program is not affected wh...

Eclipse + DN + C3P0

I'm trying to put C3P0 up & running. http://www.datanucleus.org/products/accessplatform/rdbms/c3p0.html I have These as Plugins (app runs fine): datanucleus-connectionpool-1.0.2.jar datanucleus-core-1.1.0.m3.jar datanucleus-enhancer-1.1.0.m1.jar datanucleus-rdbms-1.1.0.m3.jar I added (to the classpath): c3p0-0.9.1.2.jar And the par...

NoClassDefFoundError without any class name

Hello, 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". ...

How to analyse a NoClassDefFoundError caused by an ignored ExceptionInInitializerError?

Today I spent my afternoon with analysing a NoClassDefFoundError. After verifying the classpath again and again, it turned out that there was a static member of a class that threw an Exception that was ignored the first time. After that every use of the class throw a NoClassDefFoundError without a meaningful stacktrace: Exception in thr...

How to collect all classes implementing an interface at runtime?

For running all my test classes automatically, I look for all class files inside a dedicated directory, convert the path to a package name and check if this class implements the given interface: try { Class<? > myTestClass = Class.forName( constructedClassName ); if( myTestClass.isInstance( MyTestInterface.class ) ) { te...

JAVA - Weird NoClassDefFoundError in : com/lowagie/textDocumentException

Hi, This is the situation. I need to add PDF generation to a program that already has PNG generation. Initially the 2 classes involved are : ActionUsuels From where the constructor of CaptureImage3D is called. When I added the PDF generation I added a method at the CaptureImage3D class. Before adding the PDF generation, the PNG gener...

NoClassDefFoundError while importing a class with an inner class

Hi! I'm not being able to import a particular class (FinanceService) from a jar. All the others work fine, including the inner-class FinanceService$Versions. I'm getting a NoClassDefFound exception, and I'm not sure how to proceed. This exception occurs, paraphrasing an answer I've found here, when the source was successfully compiled,...

Applet class loader cannot find one of the classes in the jar

I get the ff. error in Java Console occassionally: Exception in thread "thread applet-my.package.MyApplet-10" java.lang.NoClassDefFoundError: another/package/SomeClass at my.package.MyApplet.init(MyApplet.java:95) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown...

Error launching a Java app from a Win32 C++ app using CreateProcess

I'm trying to launch a Java app from a C++ app using the following code: #include <windows.h> #include <memory.h> #include <tchar.h> int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { STARTUPINFOW siStartupInfo; PROCESS_INFORMATION piProcessInfo; memset(&siStartupI...

How to avoid no main class and no class def found error using DropBox and Eclipse for Java

I use Eclipse to write Java code and use DropBox to sync my code with others' across our multiple computers. Most of the time, everything works as expected: if anyone makes a change on either end, the change is saved and when the other person refreshes the Eclipse workspace, the changes come through and can be viewed and run successfully...

Custom JSTL TagLib and TomCat Problem

I've just created a custom taglib which runs fine with Jetty. When using TomCat 6.0 I get the following exception: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/sql/Result Any ideas on how to resolve this issue? I'm using Facelets and JSF 1.2. Thxs. ...

Why it could not find the main class?

I have a very simple code: package mygame; public class RunGame { public static void main(String[] args) { System.out.println(args[0]); } } I can compile that code but I cannot run it. When I type "java RunGame" in the command line I get: Exception in thread "main" java.lang.NoClassDefFoundError: RunGame (wrong...

Android: When do classes get unloaded by the system?

Hi, This is a very weird problem. My app that runs just fine but somehow if I leave my phone for an hour or two while my app is running, I get the following error when I come back to it later: java.lang.NoClassDefFoundError: yoga.database.Manager at yoga.YogaActivity.openDatabase(YogaActivity.java:294) at yoga.YogaActivity.initData(Yo...

Approach for fixing NoClassDefFoundError?

I'm seeing this question is getting asked a lot in many different contexts. Perhaps we can set some strategies for locating and fixing it? I'm noobish myself so all I can contribute are horror stories and questions, sorry... It seems this is thrown when a class is visible at compile time but not at run time... how can this happen? In...

Class initialization issues loading java.util.logging.LogManager in Android Dalvik VM

I've done changes in an Android native library and installed a new system.img file but am now getting an unrelated Error on startup. I can get past it by swallowing the error but I wanted to know if anyone can explain what the issue is. The Android implementation of Logger.java claims that it is Forcing the LogManager to be initialized ...

Why does the the Java VM not recover after "Too many open files" errors?

In certain well-understood circumstances, our application will open too many sockets (database connections) and reach the maximum open files that the OS allows. We understand this; we are fixing the issue and also bumping up the limit. What we can't explain is why parts of our application don't recover even after the number of connectio...