* Watter:
>
>
>
> Jean-Baptiste Quenot-3 wrote:
> >
> > * Watter:
> >
> >> With that, I can get past the error I reported
> >> earlier. Unfortunately, I'm seeing something else now. If I go
> >> to a page, then use my browser back button to go back a page,
> >> and then click on any other link, I get a ClassCastException for
> >> FusionAuthenticatedWebSession:
> >
> > If you don't paste the include/exclude patterns, it will be very
> > hard to help you.
> >
> You're right, of course. Here is all the relevant information I can think
> of, and thank you for your help.
>
> Wicket Version: latest 1.3.0-incubating-SNAPSHOT from wicketstuff maven
> repository
>
> ReloadingFilter Patterns:
>
>
> ReloadingClassLoader.includePattern("com.ptc.fusion.web.FusionAuthenticatedWebSession*");
>
> ReloadingClassLoader.includePattern("com.ptc.fusion.web.FusionWebApplication*");
> ReloadingClassLoader.includePattern("com.ptc.fusion.web.pages*");
> ReloadingClassLoader.includePattern("com.ptc.fusion.web.security*");
> ReloadingClassLoader.includePattern("com.ptc.fusion.web.dataprovider*");
>
> (the * after FusionWebApplication was added at your suggestion and allowed
> me to revert back to overriding getSessionFactory())
>
> Here are some important parts of the FusionAuthenticatedWebSession:
>
> public class FusionAuthenticatedWebSession extends WebSession {
>
> private static final long serialVersionUID = 1L;
> private User user;
>
> @SpringBean(name = "ldapauthenticationManager")
> AuthenticationProvider ldapAuthenticationProvider;
>
> @SpringBean(name = "daoauthenticationManager")
> AuthenticationProvider daoAuthenticationProvider;
>
> @SpringBean(name = "webSettings")
> private WebSettings webSettings;
>
>
>
> public FusionAuthenticatedWebSession(WebApplication application, Request
> request) {
> super(application, request);
> InjectorHolder.getInjector().inject(this);
> }
>
> public static FusionAuthenticatedWebSession get() {
> return (FusionAuthenticatedWebSession) Session.get();
> }
>
> /** True when the user is signed in */
> private boolean signedIn;
>
> public boolean authenticate(final String username, final String
> password) {
> //do some authentication work
> }
>
> public final boolean signIn(final String username, final String
> password) {
> signedIn = authenticate(username, password);
> return signedIn;
> }
>
>
> /* Accessors */
> public final boolean isSignedIn() {
> return signedIn;
> }
>
> public User getUser() {
> return user;
> }
> }
>
> I call the get() method of this class in a few places and it's that call
> that causes the error when using the ReloadingFilter and after I hit the
> back button.
>
> WicketMessage: Method onLinkClicked of interface
> org.apache.wicket.markup.html.link.ILinkListener targeted at component
> [MarkupContainer [Component id = listOrganizationLink, page =
> com.ptc.fusion.web.pages.user.ListUsers, path =
> 77:adminMenuItems:listOrganizationLink.PageLink, isVisible = true,
> isVersioned = true]] threw an exception
>
> Root cause:
>
> java.lang.ClassCastException:
> com.ptc.fusion.web.FusionAuthenticatedWebSession
It means com.ptc.fusion.web.FusionAuthenticatedWebSession is
already loaded in other classes that did not match the inclusion
patterns.
To debug your usecase, set a conditional breakpoint in
ReloadingClassLoader.loadClass() when class name is
com.ptc.fusion.web.FusionAuthenticatedWebSession. Maybe I could
also add some debug log statements to help you diagnose.
Sometimes it is really difficult to understand where your class is
loaded from.
--
Jean-Baptiste Quenot
aka John Banana Qwerty
http://caraldi.com/jbq/
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user