mchenini (32) [Avatar] Offline
#1
Hello,

I am working on the Cheesr application of chapter 3, but the source code does not seem to compliant with the chapters or it is sometimes not complete.

Anyway I need your help, in resolving the error I am getting (shown below):


Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.766 sec <<< FAILURE!

testRenderMyPage(com.wicket.chapter03.section_3_1.TestHomePage) Time elapsed: 0.718 sec <<< ERROR!

org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'com.wicket.chapter03.section_3_1.Index' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried:

[Page class = com.wicket.chapter03.section_3_1.Index, id = 0, version = 0]

at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:369)

at org.apache.wicket.Page.onRender(Page.java:1515)

Caused by: org.apache.wicket.WicketRuntimeException: Expected to find <wicket:child/> in base markup: file:/C:/wicketdev/wicketinaction/Cheesr31/target/classes/com/wicket/chapter03/section_3_1/CheesrPage.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" >

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head></head>

<body>

</body>

</html>


If I add <wicket:child/> to CheesrPage.html like this

<html xmlns="http://www.w3.org/1999/xhtml">

<body>

<wicket:child/>

</body>

</html >

Then the error above is gone but I got a different error shown below:

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.828 sec <<< FAILURE!

testRenderMyPage(com.wicket.chapter03.section_3_1.TestHomePage) Time elapsed: 0.781 sec <<< ERROR!

org.apache.wicket.WicketRuntimeException: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered).

[MarkupContainer [Component id = cheeses]]


Any hint is welomed.

Thanks.
geezenslaw (5) [Avatar] Offline
#2
Re: WicketRuntimeException: The component(s) below failed to render.
Hello, I am having a similar RunTime exception. Did you ever realize a solution to your problem? Thanks and regards, David.