File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate 2" Watch "Hibernate 2" New topic
Author

Hibernate 2

lionel brizuela
Greenhorn

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(UserSuppliedConnectionProvider.java:32)
at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:286)
at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3326)
at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3286)
at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:65)
at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:779)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:265)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:1033)
at net.sf.hibernate.loader.Loader.list(Loader.java:1024)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1544)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1521)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1513)


I have placed my hibernate.properties 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.

./pope


blog - InfoQ.com
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Hibernate 2
 
Similar Threads
Connection refused: connect
Hibernate Problem
Error JDBCExceptionReporter
Urgent plz help
Spring: partly commited Txn issue