View RSS Feed

My Java Tips

  1. java.lang.NoClassDefFound Error: org/apache/log4j/Layout

    by , 05-21-2011 at 10:22 PM (My Java Tips)
    You might have seen the following exception:

    Java Code:
    java.lang.NoClassDefFoundError: org/apache/log4j/*
    It may mean that log4j is not in your class path or you are using some outdated version of log4j.

    Get latest copy of log4j and put it in your class path. If JSP caused this, then put the log4j jar into WEB-INF/lib directory. Restart your application server (say Tomcat) and it should work now.

    Get latest version of log4j from:
    Apache log4j 1.2 - Download Apache log4j 1.2 ...
    Categories
    Frameworks