Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

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

Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
Nothing? Or something? Like this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic