MarcGiffing / wicket-spring-boot-examples

Apache License 2.0
14 stars 10 forks source link

Examples not working: MarkupNotFoundException #1

Closed tgoetz closed 8 years ago

tgoetz commented 8 years ago

Hi there,

tried to run the 'simple' example by starting the 'main' method in com.giffing.examples.wicket.spring.boot.simple.WicketApplication and this is what I get. Am I missing something?

2016-02-17 09:00:08.092 ERROR 32184 --- [nio-8080-exec-2] o.apache.wicket.DefaultExceptionMapper : Unexpected error occurred

org.apache.wicket.markup.MarkupNotFoundException: Can not determine Markup. Component is not yet connected to a parent. [Page class = com.giffing.examples.wicket.spring.boot.simple.HomePage, id = 0, render count = 1] at org.apache.wicket.Component.getMarkup(Component.java:749) ~[wicket-core-7.2.0.jar:7.2.0] at org.apache.wicket.Component.internalRender(Component.java:2345) ~[wicket-core-7.2.0.jar:7.2.0] at org.apache.wicket.Component.render(Component.java:2308) ~[wicket-core-7.2.0.jar:7.2.0] at org.apache.wicket.Page.renderPage(Page.java:1018) ~[wicket-core-7.2.0.jar:7.2.0] at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:124) ~[wicket-core-7.2.0.jar:7.2.0] at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:236) ~[wicket-core-7.2.0.jar:7.2.0] at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175) ~[wicket-core-7.2.0.jar:7.2.0] at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895) ~[wicket-core-7.2.0.jar:7.2.0] at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) ~[wicket-request-7.2.0.jar:7.2.0] at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265) [wicket-core-7.2.0.jar:7.2.0] at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222) [wicket-core-7.2.0.jar:7.2.0] at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293) [wicket-core-7.2.0.jar:7.2.0] at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261) [wicket-core-7.2.0.jar:7.2.0] at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203) [wicket-core-7.2.0.jar:7.2.0] at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284) [wicket-core-7.2.0.jar:7.2.0] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.30.jar:8.0.30] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.30.jar:8.0.30] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [tomcat-embed-core-8.0.30.jar:8.0.30] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.30.jar:8.0.30] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.30.jar:8.0.30] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-embed-core-8.0.30.jar:8.0.30] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.30.jar:8.0.30] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.30.jar:8.0.30] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521) [tomcat-embed-core-8.0.30.jar:8.0.30] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096) [tomcat-embed-core-8.0.30.jar:8.0.30] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674) [tomcat-embed-core-8.0.30.jar:8.0.30] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) [tomcat-embed-core-8.0.30.jar:8.0.30] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) [tomcat-embed-core-8.0.30.jar:8.0.30] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.30.jar:8.0.30] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]

tgoetz commented 8 years ago

The html files are not copied correctly into the target classes folder due to a missing maven resources configuration I guess. Alternatively, the html files should reside in the main/resources folder.

MarcGiffing commented 8 years ago

Your right, I'll update the examples and make a note in the documentation

https://github.com/MarcGiffing/wicket-spring-boot/pull/12