MyThinkPond

On Java, Python, Groovy, Grails, Spring, Node.js, Linux, Arduino, ARM, Embedded Devices & Web

Archive for the ‘Spring Framework’ Category

Tomcat 6+: Infamous “SEVERE: Error listenerStart” message – How-To debug this error?

Posted by Venkatt Guhesan on July 1, 2011

I’m sure if you have been developing with Java and Tomcat for sometime, you are likely to run into the infamous debug error.

SEVERE: Error listenerStart

You will most likely start Googling it trying to find out what the heck is going on. And in trying to see the extended logging on what that “listenerStart” error means. After some lucky searches, you will see links asking you to drop a “log4j.properties” file under ‘/WEB-INF/classes’ directory inside your WAR to help debug which one of the listeners is throwing this crazy error.

Well, this advise will most likely work for you if you are developing under an earlier version of Tomcat. If you are using versions 6.0 or above then continue to read on…

In Tomcat 6 or above, the default logger is the”java.util.logging” logger and not Log4J. So if you are trying to add a “log4j.properties” file – this will NOT work. The Java utils logger looks for a file called “logging.properties” as stated here:
http://tomcat.apache.org/tomcat-6.0-doc/logging.html

So to get to the debugging details create a “logging.properties” file under your”/WEB-INF/classes” folder of your WAR and you’re all set.

And now when you restart your Tomcat, you will see all of your debugging in it’s full glory!!!

Sample logging.properties file:

org.apache.catalina.core.ContainerBase.[Catalina].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler

and you will most likely see a “class-not-found” exception. ;-)

Look at the bright side, you’re now one step closer to the solution.

Happy coding!

Posted in Grails, Groovy, GWT, Java, Spring, Spring Framework, Tomcat, web development | Tagged: , , , , , | 22 Comments »

Spring Framework Samples and Reference Implementations online in svn

Posted by Venkatt Guhesan on April 19, 2010

Sometimes it’s good to look at the svn repository for the reference sample that Spring Framework provides.

Here’s a quick link for that URL:

https://src.springframework.org/svn/spring-samples/

You can traverse through it via a HTTP(s) browser or you can download the latest samples via tools like TortiseSVN.

Here is a list of some of the projects samples that are available today:

spring-samples – Revision 431: /

* configuration-basic/
* jpetstore/
* mvc-ajax/
* mvc-basic/
* petcare/
* petclinic/
* petclinic-groovy/
* spring-travel/
* task-basic/
* templates/
* tutorials/

Hopefully this article will be beneficial for someone who is trying to get familiar with Spring Framework.

Cheers.

Posted in Java, Programming, Spring, Spring Framework | Tagged: , , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 124 other followers