Seeing Tomcat context startup exceptions in IDEA
I'm trying out IntelliJ IDEA because I'm frustrated with Eclipse's somewhat buggy support for Maven web projects. I've got my web application set up and starting, but I'm finding that IDEA's console does not report exceptions thrown during context startups. When I launch via Eclipse or via bin/startup.sh I see this:
Jan 26, 2011 2:38:04 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class ...
com.google.inject.CreationException:
Guice creation errors:
1) No implementation for ... was bound. while locating ... for parameter 0 at ...
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:354)
...
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
However in IDEA there is no way to see this incredibly valuable trace. The only indication at all is:
Jan 26, 2011 2:26:38 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/...] startup failed due to previous errors
which is not nearly as helpful! How can I route this essential error output to the console? (It seems that IDEA somehow su开发者_运维技巧ppresses the normal creation of tomcat log files as well, so I can't even check the log file for the exception.)
Can you see anything in the logs directory? (~/Library/Logs/IntelliJIdea10 on MacOS X, ~/.IntelliJIdea10/system/log on Linux, %USERHOME%/.IntelliJIdea10/system/log on Windows - taken from IntelliJ IDEA Scala plugin problem )
You may want to have a look at http://www.jetbrains.com/idea/webhelp/setting-log-options.html :
"Use Logs tab in the Run/Debug Configuration dialog to configure the way log files, generated by an application or server, are displayed in the console."
精彩评论