• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoClassDefFoundError in sun.misc. Unsafe.ensureClassInitialized

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi again all, here's my latest challenge...
While trying to run a report (using Jasper reports) on my new server I am getting a NoClassDefFoundError thrown by sun.misc.Unsafe.ensureClassInitialized().
I have included a full stack trace below, but it looks like the de-serializer is not finding one of the classes that was serialized when compiling the report.
So far so good.
The problem I have is that the exception has no message, and therefore I have no way of knowing which class it cannot find.
I have checked the javadoc for NoClassDefFoundError and it seems that there are no other methods that might provide the information about which class (which seems a strange ommission - you would have thought there would be a "getUnfoundClassName" method or something).
Does anyone have any suggestions on how I can track down the missing class ?
Please respond, even if only to say "no idea mate, sorry!".
Cheers
Steve
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since it says "native method" in

I am wondering if there is a DLL that it is looking for.
Bill
 
Steve Leach
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not a bad suggestion, except that it's running on a Linux system. I had a problem the other day because the X-Window libraries weren't installed, and that reported a problem in a different native method. It was a "library not found" error rather than a "class not found" error though.
The other issue is that, even if it is a missing library, I have no way to know which one is missing.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
facing the same issue with my code.
not sure what will be the solution
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

Beware of classes whose package name starts with sun or com.sun; they may be removed from the JVM without notice.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Welcome to the Ranch

Beware of classes whose package name starts with sun or com.sun; they may be removed from the JVM without notice.



And have been.
 
reply
    Bookmark Topic Watch Topic
  • New Topic