S
systems_newbie
I'm trying to get Log4J up and working. My tomcat log says:
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at com.blah.db.xlsschemaparser.XlsSchemaParser.<clinit>(XlsSchemaParser.java:21)
The line of code that it's crapping out on (java:21) is as follows:
static Logger log =
Logger.getLogger(XlsSchemaParser.class.getName());
I understand that for some reason, it's not finding the Logger class
(I initially tried with Category class, but I found in the
documentation that this class is being deprecated in favor of the
Logger class), but I don't understand why. I have the log4j-1.2.8.jar
file in my classpath and I'm importing org.apache.log4j.*, but it's
still not recognizing the class. My IDE (eclipse) has no problem
recognizing the methods that are written for the Logger or the
Category class.
From reading the documentation, I believe that I have to include some
kind of PropertyConfigurator bit of code somewhere, but I'm unsure
where. I think it might have to go in the web.xml file under an
<init> param, but again, I'm unclear. Is that correct, or is it
something else? If this is correct, where in the file is it supposed
to go? What's the syntax supposed to look like?
If anybody could offer any suggestions, I would really appreciate it.
I've spent most this afternoon and part of last night trying different
ideas and reading documentation to no avail. Thanks in advance to all
who help!
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at com.blah.db.xlsschemaparser.XlsSchemaParser.<clinit>(XlsSchemaParser.java:21)
The line of code that it's crapping out on (java:21) is as follows:
static Logger log =
Logger.getLogger(XlsSchemaParser.class.getName());
I understand that for some reason, it's not finding the Logger class
(I initially tried with Category class, but I found in the
documentation that this class is being deprecated in favor of the
Logger class), but I don't understand why. I have the log4j-1.2.8.jar
file in my classpath and I'm importing org.apache.log4j.*, but it's
still not recognizing the class. My IDE (eclipse) has no problem
recognizing the methods that are written for the Logger or the
Category class.
From reading the documentation, I believe that I have to include some
kind of PropertyConfigurator bit of code somewhere, but I'm unsure
where. I think it might have to go in the web.xml file under an
<init> param, but again, I'm unclear. Is that correct, or is it
something else? If this is correct, where in the file is it supposed
to go? What's the syntax supposed to look like?
If anybody could offer any suggestions, I would really appreciate it.
I've spent most this afternoon and part of last night trying different
ideas and reading documentation to no avail. Thanks in advance to all
who help!