org.apache.wicket.util.resourceのデバッグメッセージを有効にします
問題
Wicketでは、htmlページが見つからない場合、「Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried」が発生します。 Wicketリソースのデバッグメッセージを有効にする方法がありますか?
Root cause: org.apache.wicket.markup.MarkupNotFoundException: Markup of type 'html' for component 'com.example.hello.Hello' not found. Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried.: [Page class = com.example.hello.Hello, id = 0, version = 0] at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:227) ...
溶液
「org.apache.wicket.util.resource
」でもデバッグを有効にする方法がわかりません。Wicketエラーメッセージがより明確になるはずです。
または、デバッグモードでログを有効にし、ログファイルを介してWicketがリソースを見つける方法をトレースできます。 たとえば、integrate log4j with Wicketです。
log4j出力のサンプル…
DEBUG MarkupCache:300 - Load markup: cacheKey=com.example.hello.Helloen_US.html DEBUG ResourceStreamLocator:216 - Attempting to locate resource 'com/example/hello/Hello_en_US.html' on path [folders = [], webapppaths: [/pages/]] DEBUG ResourceStreamLocator:186 - Attempting to locate resource 'com/example/hello/Hello_en_US.html' using classloader WebappClassLoader delegate: false repositories: /WEB-INF/classes/ ... DEBUG ResourceStreamLocator:216 - Attempting to locate resource 'com/example/hello/Hello.html' on path [folders = [], webapppaths: [/pages/]] DEBUG ResourceStreamLocator:186 - Attempting to locate resource 'com/example/hello/Hello.html' using classloader WebappClassLoader delegate: false repositories: /WEB-INF/classes/ ...