• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate 2

 
lionel brizuela
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 166
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you post what is in the hibernate properties file...
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic