That was it.  Thanks for the help!

-----Original Message-----
From: Davor Hrg [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 16, 2007 2:27 AM
To: Tapestry users
Subject: Re: T5 - Authentication filter

it may be usefull,
please check that you havent put your ASO class in components package
or pages package (those classes get enhanced and can cause class cast
exceptions)

Davor Hrg

On 7/16/07, bmg125 <[EMAIL PROTECTED]> wrote:
>
>
> Otho did you ever find a solution to the the Class Cast Exception when
> using
> the @ApplicationState annotation?  I have read and reread the docs and
it
> seems like my code should work.  I am basically just trying to create
an
> ASO
> with the default persistence strategy and constructor.  So I am not
sure I
> understand why I am getting the class cast exception.
>
> -BGregory
>
>
>
> Otho wrote:
> >
> > Hi all!
> > Was there a solution to this really strange ClassCastException
already?
> >
> > I have the same problem in the following circumstances:
> >
> > public class Search extends BaseComponent
> > {
> >     @Component
> >     private Form simpleSearch;
> >
> >     @ApplicationState
> >     private SimpleSearchString simpleSearchString;
> >
> >     private String searchTerm; // wil be populated by the form;
> >
> >     /* Form Handler */
> >
> >     String onSuccess()
> >     {
> >         if (searchTerm == null)
> >             return null;
> >
> >
> >>>>>        getSimpleSearchString().setSearchTerm(searchTerm);
> >         return "ExtendedSearch";
> >     }
> >
> >     public SimpleSearchString getSimpleSearchString()
> >     {
> >         return simpleSearchString;
> >     }
> >
> >>>>> This line gives the following stacktrace
> >
> > java.lang.ClassCastException myapp.state.SimpleSearchString cannot
be
> cast
> > to myapp.state.SimpleSearchString
> > Stack trace
> >
> >    - myapp.components.search.Search._$read_simpleSearchString(
> Search.java
> >    )
> >    -
myapp.components.search.Search.getSimpleSearchString(Search.java
> :79)
> >    - myapp.components.search.Search.onSuccess(Search.java:53)
> >    -
myapp.components.search.Search.handleComponentEvent(Search.java)
> >
> >
> > This happens regardless of if I access simpleSearchString directly
or
> with
> > the getter.
> > Any idead what causes this somewhat puzzling behaviour?
> >
> > Regards,
> > Otho
> >
>
> --
> View this message in context:
>
http://www.nabble.com/T5---Authentication-filter-tf3726392.html#a1160794
6
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to