Print the class and the classloader for the object you're trying
to cast.  You'll see that they don't match.

Try
        System.out.println(theInstance.getClass());
        System.out.println(theInstance.getClass().getClassLoader());

Compare this to
        System.out.println(new Solver().getClass());
        System.out.println(new Solver().getClass().getClassLoader());

and you'll see that they don't match.

Your problem might be a fundamental misunderstanding of how classloaders
work.  I recommend you read Shiang Leng's and Bracha's paper on
loaders, see http://java.sun.com/people/gbracha/classloaders.ps

        - Godmar



----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to