問題

Wicketでは、htmlページが見つからないと、

試みられたすべてのファイル名のリストを取得するためにorg.apache.wicket.util.resourceのデバッグメッセージを有効にします

。 Wicketリソースのデバッグメッセージを有効にする方法を知りましたか?

Root cause:
org.apache.wicket.markup.MarkupNotFoundException:
Markup of type 'html' for component 'com.mkyong.hello.Hello' not found.

Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried.: [Page class = com.mkyong.hello.Hello, id = 0, version = 0]at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:227)
...

Solution

I have no idea how to enable debug on


org.apache.wicket.util.resource

” as well, Wicket error message should
be more clear!

Alternatively, you can enable the logging in debug mode, and trace how
Wicket find resources via log file. For example,

integrate log4j with
Wicket

.


Sample of log4j output…​

DEBUG MarkupCache:300  - ロードマークアップ:cacheKey = com.mkyong.hello.Helloen__US.html DEBUG ResourceStreamLocator:216  -  'com/mkyong/hello/Hello__en__US.html'リソースをパス[folders =[]、webapppaths:[/ページ/]]

DEBUG ResourceStreamLocator:186  - クラスローダーWebappClassLoaderを使用して 'com/mkyong/hello/Hello__en__US.html'リソースを探しようとしていますdelegate:false repositories:

/WEB-INF/classes/...
DEBUG ResourceStreamLocator:216  - リソースの検索を試みています
'com/mkyong/hello/Hello.html'のパス[folders =[]、webapppaths:[/pages/]]DEBUG ResourceStreamLocator:186  - リソースの検索を試みています
'com/mkyong/hello/Hello.html' classloaderを使用してWebappClassLoader
  デリゲート:false
  リポジトリ:
   /WEB-INF/classes/...