user373201
user373201

Reputation: 11445

How can I see stack traces for my Wicket app?

I am new to Wicket and working on an existing project. How do I see the stack trace from Wicket on the UI? Currently I see the following:

Internal error
Return to home page

I have set the following in log4j.xml, but don't see any stack traces in the logs either:

<logger name="org.apache.wicket">
    <level value="DEBUG"/>
</logger>

Upvotes: 0

Views: 1494

Answers (3)

fmucar
fmucar

Reputation: 14558

<context-param>
 <param-name>configuration</param-name>
 <param-value>development</param-value>
 </context-param>

update web.xml to development instead of deployment

Upvotes: 2

Dolph
Dolph

Reputation: 50660

public class MyApplication extends WebApplication {
    @Override
    protected void init() {
        /* ... */

        // Tells wicket to use a helpful 'debug' exception page with a snapshot of the 
        // component model, and the exception stack trace.
        // Other settings are available to show pages that say there has been an internal error 
        // (a production-friendly page)
        // In addition, more advanced usage allows you to override this behavior completely.

        getSettings().setUnexpectedExceptionDisplay(ApplicationSettings.SHOW_EXCEPTION_PAGE);
    }
}

Upvotes: 4

mtraut
mtraut

Reputation: 4740

In addition, the detail of debugging output is determined by the "configuration" runtime of wicket, see short explanation at http://clipmarks.com/clipmark/B00CE497-A646-4CB6-B85D-F68332903C5A/

Upvotes: 0

Related Questions