[
https://issues.apache.org/jira/browse/WICKET-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501910#comment-13501910
]
Sven Meier commented on WICKET-4872:
------------------------------------
Problem is that in WicketFilter#init() the application is created before the
contextClassLoader is set, thus HomePage.class isn't loaded via the custom
classLoader.
Later MarkupResourceStream#getMarkupClass() resolves classes via WicketObjects,
which uses the custom classLoader via contextClassLoader set in
WicketFilter#processRequest().
> IllegalArgumentException on ReloadingWicketFilter and inheritance markup
> ------------------------------------------------------------------------
>
> Key: WICKET-4872
> URL: https://issues.apache.org/jira/browse/WICKET-4872
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.9, 6.3.0
> Reporter: jun ozeki
> Attachments: eclipse-project.zip
>
>
> simple inheritance markup and ReloadingWicketFilter set like below, throw
> from
> org.apache.wicket.markup.MarkupFactory#getContainerClass(MarkupContainer,
> Class<?>)
> ReloadingClassLoader.includePattern("wicket.inheritance.sample.*");
> Is this way wrong ?
> caused stacktrace is
> Caused by: java.lang.IllegalArgumentException: Parameter clazz must be an
> instance of wicket.inheritance.sample.ChildPage1, but is a
> wicket.inheritance.sample.HomePage
> at
> org.apache.wicket.markup.MarkupFactory.getContainerClass(MarkupFactory.java:378)
> at
> org.apache.wicket.markup.MarkupFactory.getMarkup(MarkupFactory.java:228)
> at
> org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.getBaseMarkup(InheritedMarkupMarkupLoader.java:96)
> at
> org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:66)
> at
> org.apache.wicket.markup.loader.DefaultMarkupLoader.loadMarkup(DefaultMarkupLoader.java:51)
> at
> org.apache.wicket.markup.MarkupFactory.loadMarkup(MarkupFactory.java:430)
--
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