commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rice...@netscape.net (Rice Yeh)
Subject RE: ClassCastException raised in newFactory() method when starting from JUnit test
Date Wed, 01 May 2002 12:48:15 GMT
Hi,
  Sorry, I past wrong attachement. The original one will not cause this problem. I attache
a new one, which just moves 

        Digester d = new Digester();
        System.out.println("OK");
to testLogging() method.

Regards,
Rice

riceyeh@netscape.net (Rice Yeh) wrote:

>Hi all,
>
>  Just wonder why ClassCastException is raised at line 496 of LogFactory in newFactory()
method when running as a JUnit test? I found this problem when running RequiredNameTest in
commons-validator. When casting a class to some superclass, does classloader from other thread
form a namespace and so can NOT cast it? Java language spec seems not regulate this. I have
proven this with a small program.
>  Attached are JUnit test files I use to study this problem.
>
>Regards,
>Rice
>
>
>__________________________________________________________________
>Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience
of buying online with Shop@Netscape! http://shopnow.netscape.com/
>
>Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
>


__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience
of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

Mime
View raw message