Reload of a page failed cause of missing favicon.ico

22 views
Skip to first unread message

Mario Giammarco

unread,
Mar 15, 2018, 5:08:51 AM3/15/18
to invesdwin-platform
Hello,
I have added to a variable the @Eager and @Forced annotations.
When I change the widget value it reloads the page but I get:

org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public de.invesdwin.nowicket.page.error.defaultpage.DefaultPageNotFoundPage()'. An exception has been thrown during construction!
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:194)
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:67)


....
....
Caused by: javax.servlet.ServletException: RequestUri: /favicon.ico, ServletName: default, StatusCode: 404, Message: /favicon.ico

Why it needs favicon.ico? It never asked before.

Thanks,
Mario

sub es

unread,
Mar 15, 2018, 5:12:37 AM3/15/18
to Mario Giammarco, invesdwin-platform
I don't think the favicon is the real issue here. Can you provide the full stacktrace please?

--
You received this message because you are subscribed to the Google Groups "invesdwin-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to invesdwin-platf...@googlegroups.com.
To post to this group, send email to invesdwin...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/invesdwin-platform/dee75216-00f5-482c-9715-d6bf4df0d78a%40googlegroups.com.
For more options, visit

...

Mario Giammarco

unread,
Mar 15, 2018, 12:30:30 PM3/15/18
to invesdwin-platform
Here it is:

ARN  Component            - Markup id set on a component that renders its body only. Markup id: wicket__label143d, component id: wicket_label14.
WARN  Component            - Markup id set on a component that renders its body only. Markup id: wicket__label173e, component id: wicket_label17.
WARN  RequestCycleExtra    - ********************************
WARN  RequestCycleExtra    - Handling the following exception

org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public de.invesdwin.nowicket.page.error.defaultpage.DefaultPageNotFoundPage()'. An exception has been thrown during construction!
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:194)
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:67)
    at de.invesdwin.nowicket.application.filter.internal.ModelCacheUsingPageFactory.newPage(ModelCacheUsingPageFactory.java:46)
    at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:102)
    at org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:271)
    at org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:169)
    at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
    at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:102)
    at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:195)
    at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
    at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:865)
    at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
    at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
    at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
    at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
    at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
    at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
    at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:489)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
    at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:467)
    at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:338)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:175)
    ... 36 more
Caused by: java.lang.RuntimeException: javax.servlet.ServletException: RequestUri: /favicon.ico, ServletName: default, StatusCode: 404, Message: /favicon.ico
    at de.invesdwin.nowicket.page.error.AErrorPanel.showServletException(AErrorPanel.java:39)
    at de.invesdwin.nowicket.page.error.AErrorPanel.<init>(AErrorPanel.java:21)
    at de.invesdwin.nowicket.page.error.PageNotFoundPanel.<init>(PageNotFoundPanel.java:18)
    at de.invesdwin.nowicket.page.error.PageNotFoundPanel.<init>(PageNotFoundPanel.java:14)
    at de.invesdwin.nowicket.page.error.defaultpage.DefaultPageNotFoundPage.<init>(DefaultPageNotFoundPage.java:21)
    ... 41 more

Caused by: javax.servlet.ServletException: RequestUri: /favicon.ico, ServletName: default, StatusCode: 404, Message: /favicon.ico
    ... 46 more
WARN  RequestCycleExtra    - ********************************
ERROR faultExceptionMapper - Unexpected error occurred

org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public de.invesdwin.nowicket.page.error.defaultpage.DefaultPageNotFoundPage()'. An exception has been thrown during construction!
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:194)
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:67)
    at de.invesdwin.nowicket.application.filter.internal.ModelCacheUsingPageFactory.newPage(ModelCacheUsingPageFactory.java:46)
    at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:102)
    at org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:271)
    at org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:169)
    at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
    at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:102)
    at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:195)
    at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
    at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:865)
    at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
    at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
    at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
    at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
    at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
    at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
    at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:489)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
    at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:467)
    at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:338)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:175)
    ... 36 more
Caused by: java.lang.RuntimeException: javax.servlet.ServletException: RequestUri: /favicon.ico, ServletName: default, StatusCode: 404, Message: /favicon.ico
    at de.invesdwin.nowicket.page.error.AErrorPanel.showServletException(AErrorPanel.java:39)
    at de.invesdwin.nowicket.page.error.AErrorPanel.<init>(AErrorPanel.java:21)
    at de.invesdwin.nowicket.page.error.PageNotFoundPanel.<init>(PageNotFoundPanel.java:18)
    at de.invesdwin.nowicket.page.error.PageNotFoundPanel.<init>(PageNotFoundPanel.java:14)
    at de.invesdwin.nowicket.page.error.defaultpage.DefaultPageNotFoundPage.<init>(DefaultPageNotFoundPage.java:21)
    ... 41 more

Caused by: javax.servlet.ServletException: RequestUri: /favicon.ico, ServletName: default, StatusCode: 404, Message: /favicon.ico
    ... 46 more



Il giorno giovedì 15 marzo 2018 10:12:37 UTC+1, subes ha scritto:
I don't think the favicon is the real issue here. Can you provide the full stacktrace please?

Gesendet: 15. März 2018 10:08 vorm.
Betreff: Reload of a page failed cause of missing favicon.ico

Hello,
I have added to a variable the @Eager and @Forced annotations.
When I change the widget value it reloads the page but I get:

org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public de.invesdwin.nowicket.page.error.defaultpage.DefaultPageNotFoundPage()'. An exception has been thrown during construction!
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:194)
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:67)


....
....
Caused by: javax.servlet.ServletException: RequestUri: /favicon.ico, ServletName: default, StatusCode: 404, Message: /favicon.ico

Why it needs favicon.ico? It never asked before.

Thanks,
Mario

--
You received this message because you are subscribed to the Google Groups "invesdwin-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to invesdwin-platform+unsub...@googlegroups.com.

Edwin Stang

unread,
Mar 15, 2018, 6:14:53 PM3/15/18
to invesdwin-platform
Somehow the favicon.ico that is contained inside the nowicket.jar cannot be served as it seems. This results in a 404 error which then gets written as an error stacktrace response in wicket since this is running in development mode. In production mode this would properly instantiate the DefaultPageNotFoundPage. Though this is still not the behavior that is to be expected normally.

I still dunno if this is related to your @Eager/@Forced not working (maybe there is some other error in the logs as well?). I also cannot reproduce the favicon 404 error here (when playing around with @Eager/@Forced annotations and running inside tomcat 7). So if you can provide me a reproducing sample project, I am sure I can debug and solve this issue.

Best regards,
Edwin

Mario Giammarco

unread,
Mar 15, 2018, 6:36:38 PM3/15/18
to invesdwin-platform

Mario Giammarco

unread,
Mar 15, 2018, 6:38:47 PM3/15/18
to invesdwin-platform
I have sent you a private invitation to the project source code.
Consider that  it is private now but it will be opensourced the same day I finish working on it so it is not "secret".
In this project I will also implement comet support so you can see if you can extract an example for your site.
Mario


Il giorno giovedì 15 marzo 2018 23:14:53 UTC+1, Edwin Stang ha scritto:

Edwin Stang

unread,
Mar 15, 2018, 6:57:40 PM3/15/18
to invesdwin-platform
I have checked out the project, but I cannot see any usage of @Eager or @Forced. Do I have to checkout a different branch or is there a commit missing?

Also I cannot run the app because dependencies are missing: Failed to execute goal on project UMWebClient: Could not resolve dependencies for project it.giammar:UMWebClient:war:2.0.0: Could not find artifact it.giammar:pratomodel:jar:1.0.6-RELEASE

Mario Giammarco

unread,
Mar 15, 2018, 7:22:02 PM3/15/18
to Edwin Stang, invesdwin-platform
Sorry forget to push! Will do tomorrow morning

Inviato dal mio BlackBerry, il dispositivo mobile più sicuro
Inviato: 15 marzo 2018 11:57 PM
Oggetto: Re: Reload of a page failed cause of missing favicon.ico

I have checked out the project, but I cannot see any usage of @Eager or @Forced. Do I have to checkout a different branch or is there a commit missing?

Also I cannot run the app because dependencies are missing: Failed to execute goal on project UMWebClient: Could not resolve dependencies for project it.giammar:UMWebClient:war:2.0.0: Could not find artifact it.giammar:pratomodel:jar:1.0.6-RELEASE

Am Donnerstag, 15. März 2018 23:38:47 UTC+1 schrieb Mario Giammarco:
I have sent you a private invitation to the project source code.
Consider that  it is private now but it will be opensourced the same day I finish working on it so it is not "secret".
In this project I will also implement comet support so you can see if you can extract an example for your site.
Mario

Il giorno giovedì 15 marzo 2018 23:14:53 UTC+1, Edwin Stang ha scritto:
Somehow the favicon.ico that is contained inside the nowicket.jar cannot be served as it seems. This results in a 404 error which then gets written as an error stacktrace response in wicket since this is running in development mode. In production mode this would properly instantiate the DefaultPageNotFoundPage. Though this is still not the behavior that is to be expected normally.

I still dunno if this is related to your @Eager/@Forced not working (maybe there is some other error in the logs as well?). I also cannot reproduce the favicon 404 error here (when playing around with @Eager/@Forced annotations and running inside tomcat 7). So if you can provide me a reproducing sample project, I am sure I can debug and solve this issue.

...

Mario Giammarco

unread,
Mar 16, 2018, 6:29:22 AM3/16/18
to invesdwin-platform
Pusshed. Confirm me that you see an Home.java.


Il giorno venerdì 16 marzo 2018 00:22:02 UTC+1, Mario Giammarco ha scritto:
Sorry forget to push! Will do tomorrow morning

Inviato dal mio BlackBerry, il dispositivo mobile più sicuro
Inviato: 15 marzo 2018 11:57 PM

Edwin Stang

unread,
Mar 16, 2018, 8:08:10 AM3/16/18
to invesdwin-platform
Thanks for the sample. After fixing a few things about the code I was able to reproduce the favicon.ico 404 error and fix it in invesdwin-nowicket (see commit https://github.com/subes/invesdwin-nowicket/commit/852965cdccbce56f4aa639a4ff2d95339f7195fe). Though this did not hinder the page reload from working properly. The issues with the page that I had to fix were:

1. Compilation error regarding throwing Exception from the Home constructor which was not caught in the HomePage constructor.
2. Database inside Home was not serializable. This object should be a singleton in your application, since you don't want to instantiate a camel instance per page reload for performance and memory reasons. The reference to such singletons should be marked as transient in the model and get looked up again after deserialization either via a readObject method or a lazy getter.
3. Camel initialization did not work properly because of some IndexOutOfBoundsException. I just commented out that code.

A few more things I had to do to get everything working:
4. If you don't want to follow the invesdwin code quality rules, just don't add the invesdwin-maven-plugin to your project. It is not needed for invesdwin-nowicket usage and is only used to adhere to code quality during invesdwin development. I disabled checkstyle to look at the code since there were lots of violations in eclipse when the checkstyle-plugin is installed.
5. I removed the missing it.giammar:pratomodel:jar dependency and created my own versions of the enums that were unresolvable.

So, please update your snapshots and check that the favicon.ico now does not throw any 404 errors anymore. The page reload is a different issue in your code and might be fixed by one of the above bullet points.

Best regards,
Edwin

Mario Giammarco

unread,
Mar 16, 2018, 9:45:28 AM3/16/18
to Edwin Stang, invesdwin-platform
Dear Edwin,
I thank you so much for your code review.
Please note that the code I gave you was alpha quality I am developing it right now.
The camel code was just a copy and paste from previous application based on Vaadin that became unmaintenable.
I agree that I need a singleton but now my priority is to have something working to test comet.
One ot the next questions will be about spring integration infact.
I thank you again for the effort you put, please just note that it was internal code without any claim about quality.
Mario

--
You received this message because you are subscribed to a topic in the Google Groups "invesdwin-platform" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/invesdwin-platform/GpVmx2ufgVk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to invesdwin-platform+unsub...@googlegroups.com.
To post to this group, send email to invesdwin-platform@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/invesdwin-platform/50f62718-63cd-41e7-96d3-a9cd7453cb87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages