• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

java.lang. NoClassDefFoundError

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all:
I'm using Eclipse with Struts framework and am trying to create and convert a SVG graphic to JPG. This is the error that i've been getting:

java.lang.NoClassDefFoundError rg/apache/batik/dom/svg/ExtensibleSVGDOMImplementation

Now I've made sure multiple times to import the jar file. I'm deploying my application on the JBoss server and find this jar file in JBoss deploy directory too when I deploy the application. But the same error persists. I have had a couple of NoClassDefFound errors before, and I corrected them the same way, by importing the jar file into the WEB-APP/lib directory of my application. They worked, but this error is adamant !!

Any ideas anyone? Also, my apologies if I've posted this in the wrong forum.
Thanks
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ravi Pat:
They worked, but this error is adamant !!


, Good comment.

Have you installing the latest package from batik ??
Other suggestion could be write small function and see whether the class exist or not.
Class classExists(String classname) {
try {
return Class.forName(classname);
} catch (ClassNotFoundException e) {
return null;
}
}


Or you can try to instantiate a object of it from a jsp or servlet and see whether its works
 
Ravi Pat
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Balaji...thanks for your reply. Actually, i wasn't importing all the jar files into the run-time classpath. Its kinda strange, coz the error that I mentioned before persisted for a long time until I decided to use all the jar files that came with Batik. And presto..it worked.

I suspect, the problem was being caused because some of the jar files might be interdependent, but i'm not sure. Perhaps someone worked extensively with Batik might comment.

But now here's the thing...all my SVG-XML was rasterized to JPG just fine, however it shows JPGs as broken images. I thought it would leave JPGs alone, but apparently it tries to rasterize those too. Any ideas on this?

Thanks everyone..
best
ravi
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic