You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ulrich Stärk <ul...@spielviel.de> on 2009/01/30 13:49:13 UTC

Re: Coercion error [solved]

I was using a pre-made template and the css include was hardcoded there. 
When the browser tried to get the css, Tapestry misunderstood that as a 
page activation context and tried to coerce it which failed.

Uli

Ulrich Stärk schrieb:
> Hi,
> 
> with 5.1.0.0-SNAPSHOT I'm getting this really weird coercion exception:
> 
> Caused by: java.lang.IllegalArgumentException: Exception in method 
> de.spielviel.mailadmin.pages.account.ListAccount.onActivate(de.spielviel.mailadmin.entities.MxDomain) 
> (at ListAccount.java:50), parameter #1: Coercion of screen.css to type 
> java.lang.Integer (via String --> Long, Long --> Integer) failed: For 
> input string: "screen.css"
>     at 
> org.apache.tapestry5.internal.services.ComponentEventImpl.coerceContext(ComponentEventImpl.java:81) 
> 
>     at 
> de.spielviel.mailadmin.pages.account.ListAccount.dispatchComponentEvent(ListAccount.java) 
> 
>     at 
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:939) 
> 
>     at 
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1118) 
> 
>     ... 50 more
> Caused by: java.lang.RuntimeException: Coercion of screen.css to type 
> java.lang.Integer (via String --> Long, Long --> Integer) failed: For 
> input string: "screen.css"
>     at 
> org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl$TargetCoercion.coerce(TypeCoercerImpl.java:69) 
> 
>     at 
> org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl.coerce(TypeCoercerImpl.java:133) 
> 
>     at $TypeCoercer_11f270d78b9.coerce($TypeCoercer_11f270d78b9.java)
>     at 
> org.apache.tapestry5.internal.hibernate.HibernateEntityValueEncoder.toValue(HibernateEntityValueEncoder.java:79) 
> 
>     at 
> org.apache.tapestry5.internal.services.ContextValueEncoderImpl.toValue(ContextValueEncoderImpl.java:47) 
> 
>     at 
> $ContextValueEncoder_11f270d78f5.toValue($ContextValueEncoder_11f270d78f5.java) 
> 
>     at 
> org.apache.tapestry5.internal.URLEventContext.get(URLEventContext.java:43)
>     at 
> org.apache.tapestry5.internal.services.ComponentEventImpl.coerceContext(ComponentEventImpl.java:77) 
> 
>     ... 53 more
> Caused by: java.lang.NumberFormatException: For input string: "screen.css"
>     at 
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) 
> 
>     at java.lang.Long.parseLong(Long.java:403)
>     at java.lang.Long.<init>(Long.java:671)
>     at 
> org.apache.tapestry5.ioc.services.TapestryIOCModule$8.coerce(TapestryIOCModule.java:182) 
> 
>     at 
> org.apache.tapestry5.ioc.services.TapestryIOCModule$8.coerce(TapestryIOCModule.java:180) 
> 
>     at 
> org.apache.tapestry5.ioc.services.CoercionTuple$CoercionWrapper.coerce(CoercionTuple.java:51) 
> 
>     at 
> org.apache.tapestry5.ioc.internal.services.CompoundCoercion.coerce(CompoundCoercion.java:43) 
> 
>     at 
> org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl$TargetCoercion.coerce(TypeCoercerImpl.java:65) 
> 
>     ... 60 more
> 
> In my layout component I'm including the screen.css with 
> @IncludeStylesheet({ "context:layout/screen.css" }) and it somehow seems 
> that tapestry is trying to use that as the activation context for my 
> onActivate method. This seems wrong to me. Has anyone seen this before 
> and can tell me how to fix it?
> 
> Uli
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org