-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Help! - Can NOT new org.hibernate.cfg.Configuration()
PostPosted: Wed May 04, 2005 11:38 pm 
Newbie

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.