One reason your app crashes on you is that you're passing in a class of '[',
which of course doesn't exist.  Try using 'java.util.Vector', for example,
and life is happy once again.
There may be a bug here, but I don't know if this is the example you wish to
submit to Sun.  Any other examples?


                                                                Erik Sahl
                                                                [EMAIL PROTECTED]



> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Scott
> M Stark
> Sent: Tuesday, July 06, 1999 3:44 AM
> To: [EMAIL PROTECTED]
> Subject: Isolated HotSpot crash to ClassLoader.findSystemClass("[")
>
>
> This isolated example program reproduces the crash seen with HotSpot +
> a servlet engine and I have submitted this as a bug to Sun(internal review
> ID of: 85224):
>
>
> public class AdaptiveClassLoader extends ClassLoader
> {
>  protected synchronized Class loadClass(String name, boolean resolve)
>   throws ClassNotFoundException
>  {
>   // The class object that will be returned.
>   Class c = null;
>
>   // Attempt to load the class from the system
>   try
>   {
> System.out.println("loadSystemClass -> ");
>    c = loadSystemClass(name, resolve);
> System.out.println(c);
>    if (c != null)
>    {
>     if (resolve) resolveClass(c);
>     return c;
>    }
>   }
>   catch (Exception e)
>   {
>    c = null;
>   }
>
>   return c;
>  }
>
>  private Class loadSystemClass(String name, boolean resolve)
>   throws NoClassDefFoundError, ClassNotFoundException
>  {
> System.out.println("findSystemClass -> ");
>   Class c = findSystemClass(name);
> System.out.println(c);
>   // Throws if not found.
>
>   if (resolve) resolveClass(c);
>
>   return c;
>  }
>
>  public static void main(String[] args) throws Exception
>  {
>   AdaptiveClassLoader loader = new AdaptiveClassLoader();
>   Class c = loader.loadClass("[");
>   c.newInstance();
>  }
> }
>
>
> bash-2.02$ java -version
> java version "1.2.1"
> HotSpot VM (1.0fcs, mixed mode, build E)
> bash-2.02$ java AdaptiveClassLoader
> loadSystemClass ->
> findSystemClass ->
> #
> # HotSpot Virtual Machine Error, Internal Error
> #
> # Error ID: 4649454C44345950450E4350500026
> #
> bash-2.02$
>
>
>
>
> ******************************************************************
> **************
> Bear Stearns is not responsible for any recommendation,
> solicitation, offer or
> agreement or any information about any transaction, customer
> account or account
> activity contained in this communication.
> ******************************************************************
> **************
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to