tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remy Maucherat" <>
Subject Re: Problems with Tomcat4, Reflection & Classloading
Date Fri, 04 Jan 2002 11:04:59 GMT
> Hi all,
>       I am using Tomcat 4.0 final, JDK 1.4 beta 3, Win98 for dev.
> I am using a automatic bean population class to automatically populate
> based on request object just like in Struts.
>    Ok, now the problem comes during population when I receive the
> exception.
> java.lang.IllegalArgumentException: object is not an instance of declaring
> class
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> I notice this problem when Tomcat is left unused for sometime & also when
> class when compiled is re-loaded by tomcat. since some property is not set
> its validation fails & is sent back to form page with the errors
> highlighted.

I also get the error with the HEAD of Tomcat, and Slide (both during init,
and the error occurs all the time).

>   If I continue sending request or try to refresh the page it then gives
> the following error
> Root Cause:
> java.lang.NoClassDefFoundError: sun/reflect/MethodAccessorImpl
> at sun.misc.Unsafe.defineClass(Native Method)
> at sun.reflect.ClassDefiner.defineClass(
> at
> This seems to be a serious error in classloading mechanism or in
> I am using exactly same logic as in struts so should not be wrong, coz the
> bean population etc works fine for a long time perfectly well until the
> server is kept idle for some time or reloading of classes.
>   Once again my config is Tomcat 4.0 final, Win98, JDK 1.4 beta 3.

There's also a tester failure with JDK 1.4, which doesn't happen with other
JDKs. Until proven wrong, I'll assume both are a JDK issue.
If I were you, I would try a different JDK (1.3.1 looks like a good choice).


To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message