You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Angelo Luis <an...@gmail.com> on 2006/09/14 17:34:00 UTC

Why this ClassCastException ???

i'm having a unusual ClassCastException in my code, then i do that test and
dont understand this result:

System.out.println(scroller instanceof HtmlDataScroller);
System.out.println(scroller);

12:27:37,531 INFO  [STDOUT] false
12:27:37,531 INFO  [STDOUT]
org.apache.myfaces.custom.datascroller.HtmlDataScroller@178ff42


Why this???

Re: Why this ClassCastException ???

Posted by Mike Kienenberger <mk...@gmail.com>.
Another possibility is that you have two tomahawk jars in your
classpath, and you're using one class of HtmlDataScroller for each
one.

Adding the following line may provide more insight.

System.out.println(HtmlDataScroller.class.getName());


On 9/14/06, Paul Spencer <pa...@apache.org> wrote:
> What package is HtmlDataScroller in ?  Look at you imports.
>
> Paul Spencer
>
> Angelo Luis wrote:
> > i'm having a unusual ClassCastException in my code, then i do that test and
> > dont understand this result:
> >
> > System.out.println(scroller instanceof HtmlDataScroller);
> > System.out.println(scroller);
> >
> > 12:27:37,531 INFO  [STDOUT] false
> > 12:27:37,531 INFO  [STDOUT]
> > org.apache.myfaces.custom.datascroller.HtmlDataScroller@178ff42
> >
> >
> > Why this???
> >
>
>

Re: Why this ClassCastException ???

Posted by Paul Spencer <pa...@apache.org>.
What package is HtmlDataScroller in ?  Look at you imports.

Paul Spencer

Angelo Luis wrote:
> i'm having a unusual ClassCastException in my code, then i do that test and
> dont understand this result:
> 
> System.out.println(scroller instanceof HtmlDataScroller);
> System.out.println(scroller);
> 
> 12:27:37,531 INFO  [STDOUT] false
> 12:27:37,531 INFO  [STDOUT]
> org.apache.myfaces.custom.datascroller.HtmlDataScroller@178ff42
> 
> 
> Why this???
>