Tips for Logging & Debugging & Stack errors - lukes8/wiki-notes GitHub Wiki
Logback, line nbr, pattern layout, padding, conversion words
Example of pattern in logback.xml
%d{dd-MM-yyyy HH:mm:ss.SSS} %highlight(%-5level) %magenta([%thread]) %yellow(%logger{40}.%M\(%class{0}.java:%line\)) - %msg%throwable%n
Example
%logger{40}%method:%line : %m%n
Good resource:
https://logback.qos.ch/manual/layouts.html
NoClassDefFound error
You should get full log from your server - not truncated version - and just search for some occurences of ExceptionInInitializerError. Those errors usually are not directly that no class is found but it can redirect you to particular problem. As described below:
NoClassDefFound error is a nebulous error and is often hiding a more serious issue. It is not the same as ClassNotFoundException (which is thrown when the class is just plain not there).
NoClassDefFound may indicate the class is not there, as the javadocs indicate, but it is typically thrown when, after the classloader has loaded the bytes for the class and calls "defineClass" on them. Also carefully check your full stack trace for other clues or possible "cause" Exceptions (though your particular backtrace shows none).
The first place to look when you get a NoClassDefFoundError is in the static bits of your class i.e. any initialization that takes place during the defining of the class. If this fails it will throw a NoClassDefFoundError - it's supposed to throw an ExceptionInInitializerError and indicate the details of the problem but in my experience, these are rare. It will only do the ExceptionInInitializerError the first time it tries to define the class, after that it will just throw NoClassDefFound. So look at earlier logs.
Logging levels, log4j
ALL
is used to turn on all levels of logging. Once this is configured, other levels are not considered at all, including custom levels. | Integer.MAX_VALUE
TRACE
was introduced in version 1.2 and adds even more information to debug level logs. At this level, the amount of logs generated can be overwhelming so be careful. | 600