Error Java Virtual Machine Exception. Java.lang.noclassdeffounderror
Samples & SAS Notes Focus Areas SUPPORT License Assistance Manage My Software Account Downloads & Hot Fixes TRAINING & BOOKS Books Training Certification SAS Global Academic Program SAS OnDemand For Academics USERS GROUPS Advanced Search support.sas.com Knowledge Base Support Training & Books Store Support Communities Knowledge Base Products & Solutions System Requirements Install Center Third-Party Software Reference Documentation Papers Samples & SAS Notes Browse by Topic Search Samples Search Usage Notes Search Installation Notes Search Problem Notes Focus Areas Problem Note 34512: "Java Virtrual Machine Exception" error with ODS GRAPHICS or PROC SGRENDER and JRE Version 1.6 The following error message might be issued when attempting to produce output using ODS GRAPHICS or PROC SGRENDER: ERROR: Java virtual machine exception. java.lang.NoClassDefFoundError: com/sun/java/swing/SwingUtilities2. This problem is most likely to occur if SUN's Java JRE 1.6 or high is installed and the template that is being used to create the graph contains an ENTRYTITLE, ENTRYFOOTNOTE, or ENTRY statement. To circumvent the problem, remove Version 1.6 of Sun's Java JRE. Operating System and Release InformationProduct FamilyProductSystemSAS ReleaseReportedFixed*SAS SystemSAS/GRAPHz/OS9.2 TS1M09.2 TS2M2Microsoft® Windows® for 64-Bit Itanium-based Systems9.2 TS1M09.2 TS2M2Microsoft Windows Server 2003 Datacenter 64-bit Edition9.2 TS1M09.2 TS2M2Microsoft Windows Server 2003 Enterprise 64-bit Edition9.2 TS1M09.2 TS2M2Microsoft Windows XP 64-bit Edition9.2 TS1M09.2 TS2M2Microsoft® Windows® for x649.2 TS1M09.2 TS2M2Microsoft Windows Server 2003 Datacenter Edition9.2 TS1M09.2 TS2M2Microsoft Windows Server 2003 Enterprise Edition9.2 TS1M09.2 TS2M2Microsoft Windows Server 2003 Standard Edition9.2 TS1M09.2 TS2M2Microsoft Windows XP Professional9.2 TS1M09.2 TS2M2Windows Vista9.2 TS1M09.2 TS2M264-bit Enabled AIX9.2 TS1M09.2 TS2M264-bit Enabled HP-UX9.2 TS1M09.2 TS2M264-bit Enabled Solaris9.2 TS1M09.2 TS2M2HP-UX IPF9.2 TS1M09.2 TS2M2Linux9.2
in Java J2EE I know how frustrating is to see Exception in thread "main" java.lang.NoClassDefFoundError,which is a manifestation of NoClassDefFoundError in Java. I have seen it a couple of times and spent quite a lot time initially to figure out what is wrong, which class is missing etc. The first mistake I did was mingling java.lang.ClassNotfoundException and NoClassDefFoundError, in reality, they are totally different, and my second mistake was using trial and error method to solve this java.lang.NoClassDefFoundError instead of understanding why NoClassDefFoundError is coming, what is the real reason behind NoClassDefFoundError and how to resolve this. In this Java tutorial, I have tried to rectify that mistakes and uncover some secrets of NoClassDefFoundError in Java http://support.sas.com/kb/34512 and will share my experience around it. NoClassDefFoundError is not something which cannot be resolved or hard to resolve it's just its manifestation which puzzles most of Java developer. This is the most common error in Java development along with java.lang.OutOfMemoroyError: Java heap space and java.lang.OutOfMemoryError: PermGen space Anyway lets's see Why NoClassDefFoundError comes in Java and what to do to resolve NoClassDefFoundError in Java. What is the reason of NoClassDefFoundError in Java? NoClassDefFoundError http://javarevisited.blogspot.com/2011/06/noclassdeffounderror-exception-in.html in Java comes when Java Virtual Machine is not able to find a particular class at runtime which was available at compile time. For example, if we have a method call from a class or accessing any static member of a Class and that class is not available during run-time then JVM will throw NoClassDefFoundError. It's important to understand that this is different than ClassNotFoundException which comes while trying to load a class at run-time only and the name was provided during runtime, not at compile-time. Many Java developer mingles this two Error and gets confused. In short, NoClassDefFoundError will come if a class was present during compile time but not available in java classpath during runtime. Normally you will see below line in log when you get NoClassDefFoundError: Exception in thread "main" java.lang.NoClassDefFoundError Exception in thread "main" simply indicate that its "main" thread which is not able to find a particular class it could be any thread so just don't worry. The difference between this error coming in the main thread and another thread is when Exception in thread "main" comes program crashes or shut itself down as opposed to other thread in which case your program will continue to run. If you are really curious and think that you understand how class loading works, I suggest you try some puz
clarification relating to JAVA Tweet Welcome to Talk Stats! Join the discussion today by registering your FREE account. Membership benefits: • http://www.talkstats.com/showthread.php/28461-Error-message-clarification-relating-to-JAVA Get your questions answered by community gurus and expert researchers. • http://stackoverflow.com/questions/1457863/what-causes-and-what-are-the-differences-between-noclassdeffounderror-and-classn Exchange your learning and research experience among peers and get advice and insight. Join Today! + Reply to Thread Results 1 to 5 of 5 Thread: Error message clarification relating to JAVA Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear error java Mode Switch to Hybrid Mode Switch to Threaded Mode 09-26-201210:21 PM #1 kwak123 View Profile View Forum Posts Give Away Points Posts 9 Thanks 2 Thanked 0 Times in 0 Posts Error message clarification relating to JAVA Hello all, Can anyone explain in simplistic terms the reason I would be receiving this error: Java virtual machine exception. error java virtual java.lang.NoClassDefFoundError: com/sas/graphics/applets/statgraph/sgchart/grid/TrellisPlot. Does it mean that my SAS package has not been correctly installed? Thanks, KWAK Reply With Quote 09-27-201212:43 PM #2 copeg View Profile View Forum Posts Location US Posts 26 Thanks 1 Thanked 8 Times in 8 Posts Re: Error message clarification relating to JAVA Can anyone explain in simplistic terms the reason I would be receiving this error: I have not used SAS, but in simplistic Java terms every application is organized into class files. When one class calls another, the java virtual machine tries to find that class based upon all the classes that are listed in what is called the classpath. The error you see means that the class TrellisPlot cannot be found in the application classpath. I'd suspect SAS was not correctly installed, is missing a required library (.jar) somewhere in the application structure, or had the classpath configured incorrectly. I'd recommend contacting SAS customer support Reply With Quote The Following User Says Thank You to copeg For This Useful Post: kwak123(10-10-2012) 09
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up What causes and what are the differences between NoClassDefFoundError and ClassNotFoundException? up vote 287 down vote favorite 145 I want to know the difference between the specified error and the exception. What is the reason for getting each of them and any thought process on how to deal with such errors? While working on a project. If we are modifying the existing code to include the new jar file I get to face these exceptions. Sometimes they will come in client side or server side for a java app distributed through webstart. Possible reasons I have come across: packages not included in build.xml for the client side of code runtime classpath missing for the new jars we are using version conflicts with previous jar But as of now I am dealing with hit and trial method to get things working. Need more clarity and understanding regarding this. java classpath noclassdeffounderror classnotfoundexception share|improve this question edited Jan 6 at 17:21 Sotirios Delimanolis 154k25247361 asked Sep 22 '09 at 2:29 krisp 1,73241621 I often find running the JVM with -verbose (e.g. -verbose:class -verbose:jni) helps — but mogsie reports below their answer that this provides no extra useful information :( –PJTraill Jun 9 at 14:28 add a comment| 12 Answers 12 active oldest votes up vote 317 down vote accepted The difference from the Java API Specifications is a