users@glassfish.java.net

Re: Problem using CXF on Glassfish 3.1.1: keep getting the Metro

From: <forums_at_java.net>
Date: Wed, 11 Jan 2012 13:20:51 -0600 (CST)

Hi Fabien,

again if you want me to help, you need to provide more details... ;-)

A NoClassDefFoundError indicates that the JVM looked in its internal class
definition data structure for the definition of a class and did not find it:

  * either not at all (i.e. it should have a nested ClassNotFoundException
    saying that it could not be loaded from the classpath),
  * or not within the visibility scope of the particular classloader which is
    trying to load it - e.g. the class might be available in an unrelated
    sibling or child classloader),
  * or this might indicate that the JVM previously attempted to load a class
    from the classpath, but it failed for some reason - now we're trying
    again, but we're not even going to try to load it, because we failed
    loading it earlier. The earlier failure could be a ClassNotFoundException
    or an ExceptionInInitializerError (indicating a failure in the static
    initialization block) or any number of other problems.

Therefore, a NoClassDefFoundError most likely is not a classpath problem, but
rather again a problem in classloader setup/visibility.

Does your NoClassDefFoundError include a nested exception? What does this one
say (or, what does the exact stack trace look like)? Did you double-check
again that the affected class is not available more than once (and first time
loaded "locally" by the web-app classloader in non-delegation mode, such that
second time load attempt by the EAR/EJB classloader fails)?

HTH & best regards,

Andreas

-- 
Andreas Loew | Senior Java Architect
Oracle Advanced Customer Services
ORACLE Germany


--
[Message sent by forum member 'al130959']
View Post: http://forums.java.net/node/881765