In my solution, I am using Log4J inside an EJB. I created a log4j.properties file and put it on the classpath of my EJB. I created a file appender for some exception cases. When I ran my solution, I found that my file wasn’t being created. Upon further inspection, my log4j.properties file was not being […]
Log4J “NoSuchMethodError” for org/apache/log4j/Logger.trace(Ljava/lang/Object;)V
My application uses log4J and when I deployed to our development server, I was getting the following exception: CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method “onMessage” on bean “BeanId(LoggingEAR#LoggingEJB.jar#LoggingExceptionMDB, null)”. Exception data: java.lang.NoSuchMethodError: org/apache/log4j/Logger.trace(Ljava/lang/Object;)V At first, I believed that this was caused by Log4J not being on the classpath in ear. […]