Does anyone know how to solve the exception java.lang.NoClassDefFoundError? I understand that it occurs when you can not find the class in the classpath, or am I wrong? The strange thing is that I found it without problem and from one day to the next I stopped doing it. The classes you do not find is from a project called Trdiario , which generated the jar and placed it at this address: C: \ Company \ lib , along with other auxiliary libraries . I add to a project called Development, a new library, adding all the jars of the folder C: \ Company \ lib with add Library and as IDE I use Eclipse.
It should be noted that only the classes of the Trdiario.jar jar do not recognize me.
I would appreciate if someone can guide me to solve the conflict.
This is the trace of the error:
java.lang.NoClassDefFoundError: TotClt
at com.TrDiario.TotCltC.ejecutarTotClt(TotCltW.cbl:400)
at com.Riesgo.VerCategoriaJNDI.CargarDatos(VerCategoriaJNDI.java:559)
at com.Riesgo.VerCategoriaJNDI$3.actionPerformed(VerCategoriaJNDI.java:143)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: TotClt
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)
... 39 more
When I generate the jar of the Trdiario project, this warning appears:
JAR export finished with warnings. See details for additional information.
Could not find source file attribute for: 'C:\Users\User\desarrolloCD\Trdiario99\bin\com\TrDiario\PorSucursalC2$_MF_LCTYPE_1.class'
Source name not found in a class file - exported all class files in Trdiario99/bin/com/TrDiario