Re: Converting 1.4.7 to 6.12 - Login Error
On Fri, Dec 13, 2013 at 4:55 PM, Entropy wrote: > Thanks Martin, that did it. It now works with the class instead of an > instantiated page. I guess now pages passed through that exception must be > mounted? > No. It should work without mounting too but for some reason it seems it doesn't for you. If you are able to create a quickstart that reproduces the problem on Jetty/Tomcat then please create a ticket and attach it. > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Converting-1-4-7-to-6-12-Login-Error-tp4662916p4663000.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Converting 1.4.7 to 6.12 - Login Error
Thanks Martin, that did it. It now works with the class instead of an instantiated page. I guess now pages passed through that exception must be mounted? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Converting-1-4-7-to-6-12-Login-Error-tp4662916p4663000.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Converting 1.4.7 to 6.12 - Login Error
Hi, Try by mounting the login page to some path. In YourApp#init() method add: mountPage("/login", LoginPage.class); On Thu, Dec 12, 2013 at 9:05 PM, Entropy wrote: > I just tried replacing the exception line with: > > try { > throw new RestartResponseAtInterceptPageException((Page) > getLoginPageClass().newInstance()); > } catch (IllegalAccessException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } catch (InstantiationException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > > And it "works". Works is in quotes because although the LoginPage renders, > something downstream of it breaks when I try to submit, but when I send in > a > Class it treats it like a string URL. When I send in an instnatiated > Page, it works. Anyone know why that might be? > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Converting-1-4-7-to-6-12-Login-Error-tp4662916p4662961.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Converting 1.4.7 to 6.12 - Login Error
I just tried replacing the exception line with: try { throw new RestartResponseAtInterceptPageException((Page) getLoginPageClass().newInstance()); } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InstantiationException e) { // TODO Auto-generated catch block e.printStackTrace(); } And it "works". Works is in quotes because although the LoginPage renders, something downstream of it breaks when I try to submit, but when I send in a Class it treats it like a string URL. When I send in an instnatiated Page, it works. Anyone know why that might be? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Converting-1-4-7-to-6-12-Login-Error-tp4662916p4662961.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Converting 1.4.7 to 6.12 - Login Error
I know it is a web container page. I may not have been clear on this before. The URL I hit is: http://localhost:9080/EquitableSharing Wicket the forwards me to: http://localhost:9080/EquitableSharing/gov.usdoj.afms.esp.modules.login.LoginPage?1 But Wicket is involved because the WicketFilter is running and getting us to the wicket page code, and what's more most of this code is the same as it was when it worked before my version upgrade. Which tells me that most likely I either screwed something up in the upgrade, or missed something. Anyway, I am narrowing my focus on the line: throw new RestartResponseAtInterceptPageException(getLoginPageClass()); because I changed the return value of getLoginPageClass() from LoginPage.class to SearchPage.class, and sure enough, now it tries to forward to the SearchPage's full name as if it were a URL, just like it was doing for LoginPage. The redirected URL in the browser is: http://localhost:9080/EquitableSharing/gov.usdoj.afms.esp.modules.es01.SearchPage So clearly, when I throw that RestartResponseAtInterceptPageException, the class passed is having it's class name used as the URL to redirect to. That URL isn't right of course, the class is a wicket page, not a URL. But this is exactly how the 1.4.7 version of the code used this exception (I did a compare to check). So I am confused. It's almost like the meaning of that exception's parameters changed, but that doesn't appear to be the case. They still take Class. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Converting-1-4-7-to-6-12-Login-Error-tp4662916p4662960.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Converting 1.4.7 to 6.12 - Login Error
Hi, java.io.FileNotFoundException: /gov.usdoj.afms.esp.modules.login.LoginPage at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest( DefaultExtensionProcessor.java:572) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3933) is an exception coming from you web container. There is nothing Wicket related in it. If the markup cannot be found then I'd expect to see Wicket's MarkupNotFoundException. Where /gov.usdoj.afms.esp.modules.login.LoginPage comes from ? Is this a mount path defined by you in YourApp#init() method, via #mountPage() ? Or maybe this url is missing the leading /wicket/bookmarkable prefix that WIcket uses for all pages which are not explicitly mounted. Can you put a breakpoint at DefaultExtensionProcessor.handleRequest( DefaultExtensionProcessor.java:572) and see what happens ? It seems WicketFilter doesn't recognize this url and lets the web container default handler to try it, and it fails. On Thu, Dec 12, 2013 at 3:52 PM, Entropy wrote: > So, the app worked before I made my 1.4.7 -> 6.12 changes. The general > flow > is that when I hit the URL for the app (with no parameters...that 404 URL > is > not something I typed from the browser) it goes to the > Application.getHomePage(), which returns the home page (not the login > page). > > We have a common block in all our pages that check if the user has > authenticated, and if not, forwards to the login page like so: > > throw new RestartResponseAtInterceptPageException(getLoginPageClass()); > > And then I can see the control enter my LoginPage class. So it found the > java. I walk through the LoginPage initialization. Nothing blows up, > everything looks kosher. Then after control returns to the wicket layer > above me, it evidently can't find something...I presume the HTML since it > already found the java, and I get the exception I mentioned. And not my > custom error page. > > I set my error page up like: > > IApplicationSettings settings = getApplicationSettings(); > settings.setInternalErrorPage(ESPApplicationErrorPage.class); > > > getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); > > and that block runs, but no code in the error page is ever reached. > > I don't understand how the java can be found and not the HTML for the > LoginPage when 1.4.7 found them fine, and the HTML is in the same package > as > the java, just like before. And unfortunately, the error really doesn't > give me alot to go on. > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Converting-1-4-7-to-6-12-Login-Error-tp4662916p4662954.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Converting 1.4.7 to 6.12 - Login Error
So, the app worked before I made my 1.4.7 -> 6.12 changes. The general flow is that when I hit the URL for the app (with no parameters...that 404 URL is not something I typed from the browser) it goes to the Application.getHomePage(), which returns the home page (not the login page). We have a common block in all our pages that check if the user has authenticated, and if not, forwards to the login page like so: throw new RestartResponseAtInterceptPageException(getLoginPageClass()); And then I can see the control enter my LoginPage class. So it found the java. I walk through the LoginPage initialization. Nothing blows up, everything looks kosher. Then after control returns to the wicket layer above me, it evidently can't find something...I presume the HTML since it already found the java, and I get the exception I mentioned. And not my custom error page. I set my error page up like: IApplicationSettings settings = getApplicationSettings(); settings.setInternalErrorPage(ESPApplicationErrorPage.class); getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); and that block runs, but no code in the error page is ever reached. I don't understand how the java can be found and not the HTML for the LoginPage when 1.4.7 found them fine, and the HTML is in the same package as the java, just like before. And unfortunately, the error really doesn't give me alot to go on. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Converting-1-4-7-to-6-12-Login-Error-tp4662916p4662954.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Converting 1.4.7 to 6.12 - Login Error
Hi, "/gov.usdoj.afms.esp.modules.login.LoginPage" doesn't look like a Wicket url. Are you mounting your pages with the full package path? It seems your container is redirecting to a login, which it can't find. Is your webapp running under a context path? Sven On 12/11/2013 08:58 PM, Entropy wrote: So I am past my compile errors and am now running my shiny new 6.12 application. But it breaks down before I can get it off the dealer's lot. :( The problem is that the error is kind of ambiguous. The console says: [12/11/13 14:47:30:437 EST] 0026 servlet I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [EquitableSharingEAR] [/EquitableSharing] [FilterProxyServlet]: Initialization successful. [12/11/13 14:47:30:440 EST] 0026 webappE com.ibm.ws.webcontainer.webapp.WebApp reportRecursiveError Error Page Exception The server cannot use the error page specified for your application because of the exception printed below. [12/11/13 14:47:30:442 EST] 0026 webappE com.ibm.ws.webcontainer.webapp.WebApp reportRecursiveError Error Page Exception: So instead of using the error page, or printing the stack trace in the console, the following shows up in the browser. I stepped through in debug and the error happens after our code. So contrary to the claim, it DID find the java. The html is right next to it as usual. No method in our error page is invoked, though I can see that we do set it with the following: IApplicationSettings settings = getApplicationSettings(); settings.setInternalErrorPage(ESPApplicationErrorPage.class); getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); The error: Original Exception: Error Message: SRVE0190E: File not found: /gov.usdoj.afms.esp.modules.login.LoginPage Error Code: 404 Target Servlet: DefaultExtensionProcessor Error Stack: java.io.FileNotFoundException: /gov.usdoj.afms.esp.modules.login.LoginPage at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:572) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3933) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604) Error Page Exception: Error Message: SRVE0190E: File not found: /404 Error Code: 404 Target Servlet: DefaultExtensionProcessor Error Stack: java.io.FileNotFoundException: /404 at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:572) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:353) at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java:3368) at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java:634) at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:1187) at com.ibm.ws.webcontainer.servlet.FilterProxyServlet.dispatch(FilterProxyServlet.java:139) at com.ibm.ws.webcontainer.servlet.FilterProxyServlet.service(FilterProxyServlet.java:62) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131) at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:263) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) at org.apache.wicket.proto
Converting 1.4.7 to 6.12 - Login Error
So I am past my compile errors and am now running my shiny new 6.12 application. But it breaks down before I can get it off the dealer's lot. :( The problem is that the error is kind of ambiguous. The console says: [12/11/13 14:47:30:437 EST] 0026 servlet I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [EquitableSharingEAR] [/EquitableSharing] [FilterProxyServlet]: Initialization successful. [12/11/13 14:47:30:440 EST] 0026 webappE com.ibm.ws.webcontainer.webapp.WebApp reportRecursiveError Error Page Exception The server cannot use the error page specified for your application because of the exception printed below. [12/11/13 14:47:30:442 EST] 0026 webappE com.ibm.ws.webcontainer.webapp.WebApp reportRecursiveError Error Page Exception: So instead of using the error page, or printing the stack trace in the console, the following shows up in the browser. I stepped through in debug and the error happens after our code. So contrary to the claim, it DID find the java. The html is right next to it as usual. No method in our error page is invoked, though I can see that we do set it with the following: IApplicationSettings settings = getApplicationSettings(); settings.setInternalErrorPage(ESPApplicationErrorPage.class); getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); The error: Original Exception: Error Message: SRVE0190E: File not found: /gov.usdoj.afms.esp.modules.login.LoginPage Error Code: 404 Target Servlet: DefaultExtensionProcessor Error Stack: java.io.FileNotFoundException: /gov.usdoj.afms.esp.modules.login.LoginPage at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:572) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3933) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604) Error Page Exception: Error Message: SRVE0190E: File not found: /404 Error Code: 404 Target Servlet: DefaultExtensionProcessor Error Stack: java.io.FileNotFoundException: /404 at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:572) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:353) at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java:3368) at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java:634) at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:1187) at com.ibm.ws.webcontainer.servlet.FilterProxyServlet.dispatch(FilterProxyServlet.java:139) at com.ibm.ws.webcontainer.servlet.FilterProxyServlet.service(FilterProxyServlet.java:62) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131) at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:263) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) at com.ibm.ws.webcont
Re: Converting 1.4.7 to 6.12
Hello, I think you can use getSession().getPageFactory().newPage(); Depending on your context you could use Session.get() or getSession() Hope that helps -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Converting-1-4-7-to-6-12-tp4662892p4662893.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Converting 1.4.7 to 6.12
Hi, it's me again. I'm still converting to 6.12 from 1.4.7. Thanks for your help on previous questions. Here's the next item I didn't see in the conversion docs. In one of our pages, someone did this: setResponsePage(getApplication().getSessionSettings().getPageFactory().newPage(loginService.getHomePage(uInfo),(PageParameters) null)); The part the compiler complains about is getApplication().getSessionSettings(). Sure enough, looking at the v6 javadoc, it isn't there. But in this javadoc page: http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/Application.html under the Settings bullet, it specifically mentions the method as if it exists. So if this method no longer exists. What is it's v6 equivalent? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Converting-1-4-7-to-6-12-tp4662892.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org