You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org> on 2007/06/23 12:47:26 UTC

[jira] Resolved: (WICKET-685) ReloadingWicketFilter not working with markup inheritance

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

Jean-Baptiste Quenot resolved WICKET-685.
-----------------------------------------

    Resolution: Invalid

It's a bit tricky to make the reloading work with Spring.  You have to define class naming conventions and enforce them.  The main idea behind all of this, is that you will come across problems if the same class is loaded in two different classloaders, one is the parent classloader, and the other is the reloading classloader.

In your include/exclude patterns, I don't see the point of excluding "org.springframework.*", this should not be needed.  But of course JtracApplication and JtracSession *must* be included, otherwise you won't be able to use them successfully in the Wicket components, as you will have two copies of the class in two different classloaders.

And about Wicket making your usecase fail suddenly is because the internal handling of classes has slightly changed recently, but what you encounter is just a side effect of the misconfigured include/exclude patterns in the first place.

Glad it works now and that you use this feature successfully.

> ReloadingWicketFilter not working with markup inheritance
> ---------------------------------------------------------
>
>                 Key: WICKET-685
>                 URL: https://issues.apache.org/jira/browse/WICKET-685
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>            Reporter: Peter Thomas
>            Assignee: Jean-Baptiste Quenot
>
> This is happening for latest snapshot (2007-06-22).  Last time I refreshed from Maven was 2007-06-06 when things were working fine.
> Problem occurs when I use the ReloadingWicketFilter, does not matter if in Wicket development mode or not.
> My login page is not using markup inheritance, it works fine.  But after login success, next page (home page) causes this error:
> =========
> 2007-06-22 22:46:15,531 [btpool0-6] DEBUG [org.apache.wicket.application.ReloadingClassLoader] - clzLocation=/E:/peter/jtrac-trunk/jtrac/target/jtrac/WEB-INF/classes/info/jtrac/wicket/BasePage.class
> 2007-06-22 22:46:15,562 [btpool0-6] INFO [org.apache.wicket.application.ReloadingClassLoader] - Watching changes of class E:\peter\jtrac-trunk\jtrac\target\jtrac\WEB-INF\classes\info\jtrac\wicket\BasePage.class
> 2007-06-22 22:46:15,562 [btpool0-6] DEBUG [org.apache.wicket.application.ReloadingClassLoader] - clzLocation=/E:/peter/jtrac-trunk/jtrac/target/jtrac/WEB-INF/classes/info/jtrac/wicket/DashboardPage.class
> 2007-06-22 22:46:15,562 [btpool0-6] INFO [org.apache.wicket.application.ReloadingClassLoader] - Watching changes of class E:\peter\jtrac-trunk\jtrac\target\jtrac\WEB-INF\classes\info\jtrac\wicket\DashboardPage.class
> 2007-06-22 22:46:15,562 [btpool0-6] ERROR [org.apache.wicket.RequestCycle] - Markup of type 'html' for component 'info.jtrac.wicket.DashboardPage' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried:
> [Page class = info.jtrac.wicket.DashboardPage, id = 1, version = 0]
> org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'info.jtrac.wicket.DashboardPage' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried:
> [Page class = info.jtrac.wicket.DashboardPage, id = 1, version = 0]
> 	at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:342)
> 	at org.apache.wicket.markup.html.WebPage.onBeforeRender(WebPage.java:363)
> 	at org.apache.wicket.Component.beforeRender(Component.java:846)
> 	at org.apache.wicket.Page.renderPage(Page.java:885)
> 	at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:225)
> ============
> Root cause:
> org.apache.wicket.WicketRuntimeException: Parameter clazz must be instance of container
> at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:244)
> at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.checkForMarkupInheritance(InheritedMarkupMarkupLoader.java:99)
> at org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:65)
> at org.apache.wicket.markup.loader.DefaultMarkupLoader.loadMarkup(DefaultMarkupLoader.java:56)
> at org.apache.wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:389)
> at org.apache.wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:462)
> at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:282)
> at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:188)
> at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:331)
> at org.apache.wicket.markup.html.WebPage.onBeforeRender(WebPage.java:363)
> at org.apache.wicket.Component.beforeRender(Component.java:846)
> at org.apache.wicket.Page.renderPage(Page.java:885)
> at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:225)
> ===========
> Couple of other points, if I now type in the URL of another page which is bookmarkable, that works and from there if I go to the home page things are fine.  Looks like now the class + markup gets cached etc.
> Another thing is if in my extension of ReloadingWicketFilter I exclude the class that is the base page for markup inheritance, things start working but I get a different class conflict error somewhere deep in the navigation and component hierarchy, let me know if you need me to send the lof for this also.
> If this is of any relevance, I am using a custom AuthorizationStrategy - so that is how the login page comes up in the first place: throw new RestartResponseAtInterceptPageException(LoginPage.class) - and then from Login page I do continueToOriginalDestination() - maybe this has something to do with it?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.