Joined: Wed Apr 27, 2005 9:29 pm Posts: 1
|
Hi:
I am just begin to use Hibernate-3.0.2, below is the code segment which cause problem:
[code]
try
{
Configuration cfg = new Configuration();
}
catch(Exception e)
{
System.err.println(e.getMessage());
e.printStackTrace();
}
[/code]
the stacktrace:
[code]
Exception in thread "main" java.lang.ExceptionInInitializerError
at MainTest.main(MainTest.java:13)
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException
at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:558)
at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:355)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:390)
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:111)
... 1 more
Caused by: java.lang.NullPointerException
at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:543)
... 4 more
[/code]
My question is why there is a exception comes from LogFactory? Is it because I do not provide a log4j.properties?
Any help will be highly appreciated.
Jack
|
|