This trace indicates a problem in the static initialization block of org.apache. Log4j.LogManager.
NoClassDefFoundError: Could not initialize class org.apache. Log4j. LogManager This trace indicates a problem in the static initialization block of org.apache.
Log4j.LogManager. I don't have the full explanation but I would start by doing some clean up in your dependencies, they are a bit messy: Why do you have several versions of 5.0-Final and 3.5.1-Final). You should make them converge.
Why don't you have any binding for log4j? Spring uses commons-logging, I would configure it to use SLF4J also to avoid any conflicts and potential classloading problems. See Logging Dependencies in Spring for full explanations.
The last point is IMO the most important.
Thank you for answer CustombernateListener saves audit trails and check user permissions to action performed. It declared in my applicationContext. Xml, inside sessionFactory bean: – Igor Grinfeld Sep 16 '10 at 7:11 class="com.sintecmedia.listener.
CustombernateListener" / --> As you can see, I've already commented it after the issue is appeared, but now I have the same exception from other classes. Maven2 should bring to project the dependencies for Spring, if I define Spring as dependency in pom.xml. However I know that it happens, only if all dependencies are defined in pom.
Xml of spring jars and mistake can occur there. So, I already tried to add org. Slf4j:slf4j-api:1.6.1 and org:slf4j-log4j12:1.6.1, since I've use it in other project that works fine.It didn't help.
– Igor Grinfeld Sep 16 '10 at 7:21 You are right, hibernate jars versions is not convergent. However, I've just fixed it and it didn't help. – Igor Grinfeld Sep 16 '10 at 7:40 I read 'Logging Dependencies in Spring'.
Now I understand why slf4j is not included - its optional. But I see that recommended way is to exclude commons-logging, if you use slf4j and log4j. I just done it and it solves my issue – Igor Grinfeld Sep 16 '10 at 8:37 I still don't undersand why the issue was with manual deploy only and doesn't happened if the webapp is run from Eclipse?
– Igor Grinfeld Sep 16 '10 at 8:43.
LogManager might use it as a static resource and doesn't initalize if it is missing.
I don't think this is the cause, not providing a log4j. Properties doesn't break an application. – Pascal Thivent Sep 15 '10 at 16:47 Yes it exists in WEB-INF/classes/ of my application.
Morever, the exception reported is NoClassDefFoundError – Igor Grinfeld Sep 16 '10 at 7:05.
Pascal's answer contains a link to useful 'Logging Dependencies in Spring' article. It describes how to override old commons-logging jar and to use slf4j or log4j. The problem was that log4j conflicted with commons-logging.
Excluding it from maven dependencies of spring-context, solved the issue. However, I still don't understand why the issue was with manual deploy only and doesn't happened if the webapp is run from Eclipse?
Sorry about wrong report the problem does not disappear, the exception message just move from console to log file. – Igor Grinfeld Sep 16 '10 at 10:54.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.