[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Strange happenings



Folks,

  I updated my woody system this morning and now Java is hosed. Has
  anyone else noticed something awry?

  I was able to limit the problem to the classloader as shown in the
  following small file:

//package com.openwave.util.test;

public class TestResource {
    public TestResource() {
        System.err.println(getClass().getClassLoader());
        System.err.println(getClass().getClassLoader().getResource("foo"));
    }

    public static void main(String[] args) {
        new TestResource();
    }
}

[wohler@uluru:615]$ javac TestResource.java; java TestResource; touch foo
sun.misc.Launcher$AppClassLoader@7fdcde
file:/home/wohler/opwv/vxml/builder/com/openwave/util/test/foo

  So far, so good. Now, uncomment out the package declaration above,
  and recompile and run:

[wohler@uluru:616]$ javac TestResource.java; java com.openwave.util.test.TestResource
sun.misc.Launcher$ExtClassLoader@7d8483
null

  Note the extension class loader, and its inability to find foo. On
  my other Debian systems that also just got updated, this example
  uses the AppClassLoader as before and works fine.

  Hey, just got this:

[wohler@uluru:613]$ javac TestResource.java; java TestResource      
sun.misc.Launcher$AppClassLoader@7fdcde
file:/home/wohler/opwv/vxml/builder/com/openwave/util/test/foo


****************
Another exception has been detected while we were handling last error.
Dumping information about last error:
ERROR REPORT FILE = (N/A)
PC                = 0x0x40260988
SIGNAL            = 11
FUNCTION NAME     = (N/A)
LIBRARY NAME      = (N/A)
Please check ERROR REPORT FILE for further information, if there is any.
Good bye.
Aborted

  Now it's gone. Anyone there know class loaders better than I that
  might be able to lend some advice? I wonder why this one system is
  affected this way?

-- 
Bill Wohler <wohler@newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and mh-e. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.



Reply to: