在我有记录器的ejb jar中,我遇到异常@runtime。
java.lang.NoClassDefFoundError: org.apache.log4j.Logger
at java.lang.Class.getDeclaredFieldsImpl(Native Method)
at java.lang.Class.getDeclaredFields(Class.java:817)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
at java.net.URLClassLoader.findClass(URLClassLoader.java:600)
Following is the ear structure :
Using WAS8.5 and maven . When the same ear is generated through RAD tool it works fine .
ear
|---lib --- log4j.jar
|---ejb
|---Meta-INF