On 6/28/07, Watter <[EMAIL PROTECTED]> wrote:



Watter wrote:
>
> I now have a new issue. Jean-Baptiste mentions in the JIRA issue that
one
> *must* include the XxxApplication and XxxSession classes. Well, when I
> tried to do so I was unable to access my application. When I included
the
> my versions of those classes, I received the following:
>
> java.lang.IllegalAccessError: tried to access class
> com.ptc.fusion.web.FusionWebApplication$1 from class
> com.ptc.fusion.web.FusionWebApplication
> at
> com.ptc.fusion.web.FusionWebApplication.getSessionFactory(
FusionWebApplication.java:137)
>
> The code at that location is:
>
> protected final ISessionFactory getSessionFactory() {
>       return new ISessionFactory() {
>       private static final long serialVersionUID = 1L;
>                       public Session newSession(Request request,
Response response) {
>                       return new FusionAuthenticatedWebSession(
FusionWebApplication.this,
> request);
>               }
>       };
> }
>
> It seems that there may be a problem with my using
> "FusionWebApplication.this" in the inner class. Is there way around
this?
> Perhaps another way to refer to the parent class?
>
I think I found a workaround for at least part of the problem. It seems
that
I can override newSession() instead of getSessionFactory() with something
like this:

        public Session newSession(Request request, Response response) {
                return new FusionAuthenticatedWebSession(this, request);
        }

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:

    java.lang.ClassCastException:
com.ptc.fusion.web.FusionAuthenticatedWebSession

I retrieve the session in my base page to check a few user variables. It's
there that I get the ClassCastException. Here's the actual code:

    User user = ((FusionAuthenticatedWebSession)Session.get()).getUser();

I'll paste the entire stack trace at the end of the message. As I said,
this
only happens after using my back button and then clicking on a link as far
as I can tell. Anyway, if anyone has any ideas, they'd be much
appreciated.

Thanks,
Matt


Good to hear that the wildcard applies to all characters and you don't have
to explicitly exclude all sub packages.  I was of course trying all kinds of
options as I was deperate at the time : )

I actually continued to have problems after closing the JIRA issue, but
realized only after submitting the login page and getting a reference to the
session User very similar to your case.  But then I realized I had Acegi
also in the works so after excluding org.acegisecurity.* things are fine.
Maybe something similar for you also.

Thanks,

Peter.


-------------------
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
at
com.ptc.fusion.web.FusionAuthenticatedWebSession.get(
FusionAuthenticatedWebSession.java:43)
at
com.ptc.fusion.web.pages.template.FusionTemplate$AdminMenuItems.<init>(
FusionTemplate.java:136)
at
com.ptc.fusion.web.pages.template.FusionTemplate.<init>(
FusionTemplate.java:71)
at
com.ptc.fusion.web.pages.ListOrganization.<init>(ListOrganization.java:35)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at
org.apache.wicket.session.DefaultPageFactory.newPage(
DefaultPageFactory.java:58)
at org.apache.wicket.markup.html.link.PageLink$1.getPage(PageLink.java:66)
at org.apache.wicket.markup.html.link.PageLink.onClick(PageLink.java:153)
at org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:222)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.wicket.RequestListenerInterface.invoke(
RequestListenerInterface.java:186)
at

org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents
(ListenerInterfaceRequestTarget.java:73)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(
AbstractRequestCycleProcessor.java:90)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
:1031)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1107)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java
:257)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java
:127)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1065)
at

org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal
(OpenSessionInViewFilter.java:173)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(
OncePerRequestFilter.java:77)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1065)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java
:365)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java
:185)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java
:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java
:689)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(
ContextHandlerCollection.java:146)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java
:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java
:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(
HttpConnection.java:751)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java
:329)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java
:475)

Complete stack:

org.apache.wicket.WicketRuntimeException: 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
at
org.apache.wicket.RequestListenerInterface.invoke(
RequestListenerInterface.java:197)
at

org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents
(ListenerInterfaceRequestTarget.java:73)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(
AbstractRequestCycleProcessor.java:90)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
:1031)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1107)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java
:257)

java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.wicket.RequestListenerInterface.invoke(
RequestListenerInterface.java:186)
at

org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents
(ListenerInterfaceRequestTarget.java:73)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(
AbstractRequestCycleProcessor.java:90)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java
:1031)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1107)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java
:257)
--
View this message in context:
http://www.nabble.com/Has-something-changed-in-markup-inheritance--tf3963374.html#a11335416
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to