File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes Websphre + Flex ClassLoader issue: java.lang.NoClassDefFoundError: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Websphre + Flex ClassLoader issue: java.lang.NoClassDefFoundError:" Watch "Websphre + Flex ClassLoader issue: java.lang.NoClassDefFoundError:" New topic

Websphre + Flex ClassLoader issue: java.lang.NoClassDefFoundError:

Ajay Kamble
Ranch Hand

Joined: Jan 23, 2009
Posts: 51
I am using Flex 4 (and BlazeDS) on WebSphere

The setup needed for Flex/BlazeDS is that you put blazeds jars in WEB-INF/lib folder of the project. Below are the jars in WEB-INF/lib,

You also load a Flex servlet in web.xml (just like Struts servlet or JSF sevlet), so that it can intercept Flex requests and delegate to proper components.

When I run application I get below error,

I am not able to understand why Websphere says NoClassDefFoundError for, which is part of Java API.

Below is my classloader hierarchy,

The last ClassLoader [#7] is the one which loads BlazeDS jars from WEB-INF/lib folder. Then as shown in exception stack trace if calls other Flex classes and HttpClient classes (which are available to the same class loader), but when it needs it fails.

I am not sure why this happens. If #7 cannot see this class, is it not true that it should go to its parent class loaders upto the Bootstrap class loader? And it is difficult to imagine why none of the classloaders are unable to load class from Java API.

Please help!
subject: Websphre + Flex ClassLoader issue: java.lang.NoClassDefFoundError:
It's not a secret anymore!