Eclipse, log4j, etc.

"Todd O'Bryan" <[email protected]> Sun, 8 Feb 2004 10:09:37 -0500
Newsgroups gmane.comp.web.maverick.general
Message-ID <[email protected]>
Hopefully someone uses Maverick in Eclipse and can help me with this  
conundrum...

I'm trying to create a new webapp with Maverick. The only things I have  
on my class path (I think) are
maverick.jar, the two Tomcat jars that Eclipse includes automatically  
when you create an Eclipse project, the JRE System Library, and my own  
project. I'm also using the Sysdeo Tomcat plugin.

I have successfully used Maverick to map requests to Velocity views  
(hmmm, I don't have any Velocity stuff on my classpath, maybe it's all  
in maverick.jar?), but I have a problem if I try run a command.

When I start Tomcat, I get these errors in the Eclipse console:

log4j:WARN No appenders could be found for logger  
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.

This in spite of the fact that I've tried putting a log4j.properties  
file in the root directory of my project, in the WEB-INF directory, and  
(by using the Navigator view instead of Package Explorer) in  
WEB-INF/classes. Is there something I can add to the web.xml file to  
tell it where to look, or some way I can fix that?

When I try to run a command that extends ThrowAwayBean2, I get this  
error:

java.lang.NoClassDefFoundError: org/apache/commons/beanutils/BeanUtils

So, I add commons-beanutils.jar both to the project build path and to  
the Tomcat classpath. Then when I try to start Tomcat, I get this  
error:

log4j:WARN No appenders could be found for logger  
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
Catalina.start: java.lang.NullPointerException
java.lang.NullPointerException
	at  
org.apache.commons.digester.Digester.createSAXException(Digester.java: 
2540)
	at  
org.apache.commons.digester.Digester.createSAXException(Digester.java: 
2566)
	at org.apache.commons.digester.Digester.endElement(Digester.java:1061)
	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown  
Source)
	at  
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown 
  Source)
	at  
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(U 
nknown Source)
	at  
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis 
patcher.dispatch(Unknown Source)
	at  
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno 
wn Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.commons.digester.Digester.parse(Digester.java:1548)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
	at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
	at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav 
a:39)
	at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor 
Impl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

Please someone tell me I'm missing something easy here...

Thanks,
Todd



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
[INVALID FOOTER]