• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<!DOCTYPE log4.configuration SYSTEM "log4j.dtd"> generates peculiar error

 
Austin Shelton
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have the following line in the beginning of my log4j. XML file:

<!DOCTYPE log4.configuration SYSTEM "log4j.dtd">

I am using Eclipse Helios and it complains:

"System identifier must begin with a single or double quote"

This is generated as an error so I am unable to continue.

All suggestions are welcome.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like an Eclipse issue to me (Eclipse is the one complaining). Moving.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, I believe it should be "log4j:configuration" (colon, not period).

Try this:

<!DOCTYPE log4j:configuration PUBLIC "-//log4j/log4j Configuration//EN" "log4j.dtd">
 
Austin Shelton
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the snippet where the error occurs:


public class HelloWorldServlet extends HttpServlet implements Serializable {

// The following line is, according to eclipse, in error
DOMConfigurator.configureAndWatch("/WEB-INF/log4j.xml");


Logger logger = Logger.getLogger(HelloWorldServlet.class.getName());
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic