In Eclipse, the classpath for each plugin is a separate entity by design. The problem is that I cannot seem to get log4j.properties to a place where hibernate can find it. Whenever I do:
Code:
Configuration cfg = new Configuration();
I get this:
Quote:
log4j:WARN No appenders could be found for logger (net.sf.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
I tried to get around this by locating the log4j.properties file in my classpath, loading it into the System properties and then instantiating the configuration, but this didn't work. In other words I found and loaded the properties file, and I can see the properties, but apparently hibernate is not looking for the properties this way. How can I put the log4j.properties file where hibernate can see it in an Eclipse plugin? This is all in one plugin, by the way. I suppose I could instantiate the configuration and load the properties file and then call cfg.addProperties(logProps), but hibernate is calling for this data at startup, so I doubt this will help.
Any thoughts/experience?