My first guess would be that your rendered page has image/script elements
that are referenced using relative urls:

<img src="assets/img.gif"/> which would be translated to

"..../productdetail/assets/img.gif" in the browser request.

My second guess is that the link you clicked on isn't what you think, but
that seems less likely.

Josh

On 10/10/07, Josh Penza <[EMAIL PROTECTED]> wrote:
>
> Can someone explain the following exception?
>
> I click on a productdetail url like ('..../productdetail/9)
> The system.out in ProductDetail. java prints nicely 9 to the screen.
> **
> *void* onActivate(Long productId) {
>     *this*.productId = productId;
>     System.*out*.println("ProductDetail.onActivate :" + *this*.productId);
> }
>
> But where does the "assets" String come from??
>
> Exception in method
> org.example.web.tapestry.pages.ProductDetail.onActivate(
> java.lang.Long) (at ProductDetail.java:49), parameter #1: Coercion of
> assets
> to type java.lang.Long (via String --> Long) failed: For input string:
> "assets"
>
> Caused by: *java.lang.RuntimeException*: Coercion of assets to type
> java.lang.Long (via String --> Long) failed: For input string: "assets"
>
> at org.apache.tapestry.ioc.internal.services.TypeCoercerImpl.coerce(*
> TypeCoercerImpl.java:154*)
>
> at $TypeCoercer_1158a09422d.coerce($TypeCoercer_1158a09422d.java)
>
> at org.apache.tapestry.internal.services.ComponentEventImpl.coerceContext
> (*
> ComponentEventImpl.java:90*)
>
> ... 43 more
>
> Caused by: *java.lang.NumberFormatException*: For input string: "assets"
>
> 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.tapestry.ioc.services.TapestryIOCModule$9.coerce(*
> TapestryIOCModule.java:232*)
>
> at org.apache.tapestry.ioc.services.TapestryIOCModule$9.coerce(*
> TapestryIOCModule.java:230*)
>
> at org.apache.tapestry.ioc.services.CoercionTuple$CoercionWrapper.coerce(*
> CoercionTuple.java:53*)
>
> at org.apache.tapestry.ioc.internal.services.TypeCoercerImpl.coerce(*
> TypeCoercerImpl.java:150*)
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

Reply via email to