File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Hibernate 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate 2" Watch "Hibernate 2" New topic

Hibernate 2

lionel brizuela

Joined: Sep 13, 2004
Posts: 1
Hello everybody !

I'm new in using Hibernate and when i try to launch my test class, i get the following error :

log4j:WARN No appenders could be found for logger (net.sf.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
java.lang.UnsupportedOperationException: The user must supply a JDBC connection
at net.sf.hibernate.connection.UserSuppliedConnectionProvider.getConnection(
at net.sf.hibernate.impl.BatcherImpl.openConnection(
at net.sf.hibernate.impl.SessionImpl.connect(
at net.sf.hibernate.impl.SessionImpl.connection(
at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(
at net.sf.hibernate.loader.Loader.prepareQueryStatement(
at net.sf.hibernate.loader.Loader.doQuery(
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(
at net.sf.hibernate.loader.Loader.doList(
at net.sf.hibernate.loader.Loader.list(
at net.sf.hibernate.hql.QueryTranslator.list(
at net.sf.hibernate.impl.SessionImpl.find(
at net.sf.hibernate.impl.SessionImpl.find(
at net.sf.hibernate.impl.SessionImpl.find(

I have placed my file in a root directory of the classpath. Does anybody can help me ??
Jeremy Wilson
Ranch Hand

Joined: Feb 18, 2003
Posts: 166
can you post what is in the hibernate properties file...

Jeremy Wilson
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
In order: you are missing a log4j configuration from your classpath, you probably didn't create correctly the SessionFactory. But as Jeremy said, we need more info.


blog -
I agree. Here's the link:
subject: Hibernate 2
jQuery in Action, 3rd edition