You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2013/03/04 16:29:12 UTC

[jira] [Assigned] (WICKET-5073) Internal exception in UrlRenderer

     [ https://issues.apache.org/jira/browse/WICKET-5073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sven Meier reassigned WICKET-5073:
----------------------------------

    Assignee: Sven Meier
    
> Internal exception in UrlRenderer
> ---------------------------------
>
>                 Key: WICKET-5073
>                 URL: https://issues.apache.org/jira/browse/WICKET-5073
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.6.0
>            Reporter: Christoph Leiter
>            Assignee: Sven Meier
>
> I get this exception when trying to create a URL with RequestCycle#urlFor:
> org.apache.wicket.WicketRuntimeException: An error occurred while generating an Url for handler 'ResourceReferenceRequestHandler{resourceReference=scope: org.apache.wicket.Application; name: ImageResource; locale: null; style: null; variation: null, pageParameters=publicId=[f74df62d-cbdb-49db-96e4-36e3ea62610e], type=[sr]}'
>         at org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:516) [wicket-core-6.6.0.jar:6.6.0]
>         at org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:473) [wicket-core-6.6.0.jar:6.6.0]
>         at xxx.XXXWebApplication.urlFor(XXXWebApplication.java:161) ~[xxx-web-0.1.0-SNAPSHOT.jar:0.1.0-SNAPSHOT]
> [...]
> Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>         at java.util.ArrayList.rangeCheck(ArrayList.java:604) ~[na:1.7.0_10]
>         at java.util.ArrayList.remove(ArrayList.java:445) ~[na:1.7.0_10]
>         at org.apache.wicket.request.UrlRenderer.removeCommonPrefixes(UrlRenderer.java:319) ~[wicket-request-6.6.0.jar:6.6.0]
>         at org.apache.wicket.request.UrlRenderer.renderRelativeUrl(UrlRenderer.java:220) ~[wicket-request-6.6.0.jar:6.6.0]
>         at org.apache.wicket.request.UrlRenderer.renderUrl(UrlRenderer.java:117) ~[wicket-request-6.6.0.jar:6.6.0]
>         at org.apache.wicket.request.cycle.RequestCycle.renderUrl(RequestCycle.java:529) [wicket-core-6.6.0.jar:6.6.0]
>         at org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:511) [wicket-core-6.6.0.jar:6.6.0]
>         ... 46 common frames omitted
> The app uses a context path and no filter path. I see that UrlRenderer#removeCommonPrefixes receives an empty list and the code in the method assumes that context path + filter path is always a common prefix and tries to remove it later from the empty list.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira