You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Mahalakshmi Ananthanarayanan <ma...@cisco.com> on 2004/01/08 14:45:07 UTC

NoClassDefFoundError: ServletContext using jdk1.4.1 for Axis clients


 I would like to know the most earliest Name,Date and Description of the 
build , in which fix for bug # 14457
 is available .Kindly  reply  at your earliest.
 
 
  Pointer http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14457
  Bug #   14457
  Description of  the bug  Axis clients that run without "servlet.jar" 
get NoClassDefFoundError:

ServletContext when using jdk1.4.1.  This didn't happen with jdk1.3.1.  It 
looks like the method EngineConfigurationFactoryFinder.newFactory has specific 
handling code for NoClassDefFoundErrors at line 227 (Axis 1.0), but using 1.4, 
the error occurs slightly early, at line 214 where there is no handler.  I 
presume this is due to a difference in class loading in 1.4.

A work-around for 1.4 appears to be to include "servlet.jar" along with any 
client code.

Here's the stack for the failure.  Using 1.3, the handler at line 224 would 
have just logged the problem.

Exception in thread "main" java.lang.NoClassDefFoundError: 
javax/servlet/ServletContext
[Loaded java.lang.StackTraceElement from /home/billg/jdk1.4.1/jre/lib/rt.jar]
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:1627)
    at java.lang.Class.getMethod0(Class.java:1746)
    at java.lang.Class.getDeclaredMethod(Class.java:1233)
    at org.apache.commons.discovery.tools.ClassUtils.findPublicStaticMethod
(ClassUtils.java:112)
    at 
org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory
(EngineConfigurationFactoryFinder.java:214)
    at 
org.apache.axis.configuration.EngineConfigurationFactoryFinder.access$300
(EngineConfigurationFactoryFinder.java:92)

  Regards,
  Mahalakshmi .


Re: NoClassDefFoundError: ServletContext using jdk1.4.1 for Axis clients

Posted by Steve Loughran <st...@iseran.com>.
Mahalakshmi Ananthanarayanan wrote:
> 
> 
>  I would like to know the most earliest Name,Date and Description of the 
> build , in which fix for bug # *14457*
>  is available .Kindly  reply  at your earliest.
>  
>  
> *  Pointer* http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14457
>   *Bug #*   14457
>   *Description of  the bug*  Axis clients that run without "servlet.jar" 
> get NoClassDefFoundError:

The defect is marked as fixed, with a date associated with it; the 
implication being that the fix is in the repository from that moment

Try CVS_HEAD or the current 1.2Alpha, there should be a 1.2Beta shortly. 
   I would recommend getting the CVS_HEAD version and building it 
yourself, as that gives you the best way of regression testing any 
changes between now and the 1.2 shipment.

-steve