-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate help needed
PostPosted: Fri Feb 19, 2010 2:43 pm 
Newbie

Joined: Fri Feb 19, 2010 11:42 am
Posts: 1
I m a beginner with hibernate.Was developing an application and came across the following error.
Could someone plz help me out with the jars.

Thisis the error:

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.Logger.isTraceEnabled()Z
at org.hibernate.type.NullableType.<clinit>(NullableType.java:59)
at org.hibernate.Hibernate.<clinit>(Hibernate.java:108)
at org.hibernate.type.TypeFactory.<clinit>(TypeFactory.java:69)
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:281)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:274)
at org.hibernate.mapping.Property.isValid(Property.java:207)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:464)
at org.hibernate.mapping.RootClass.validate(RootClass.java:236)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1175)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1360)
at com.psl.hibernate.SessionFactoryProvider.getSessionFactory(SessionFactoryProvider.java:17)
at com.psl.dao.hibernate.UserInfoDaoImpl.saveUser(UserInfoDaoImpl.java:39)
at com.psl.dao.hibernate.UserDaoImplTest.main(UserDaoImplTest.java:18)


these are the jars dat i have included till now

hibernate3.jar
hibernate-testing.jar
asm.jar
cglib-2.1.3.jar
commons-collections-2.1.1.jar
commons-logging-1.0.4.jar
dom4j-1.6.1.jar
hibernate3.jar
jta.jar
junit.jar
sqljdbc4.jar
mysql-connector-java-5.1.11-bin.jar
mysql-connector-java-3.1.12.jar
log4j-1.2.15.jar
slf4j-api-1.5.8.jar
slf4j-log4j12-1.0.jar

Also can u tell me on which all factors does the selection of these jars depend ?


Top
 Profile  
 
 Post subject: Re: Hibernate help needed
PostPosted: Sat Feb 20, 2010 7:02 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
slf4j-api-1.5.8.jar
slf4j-log4j12-1.0.jar

You're having a problem with logging here: the api and the impl should use the exact same version

Quote:
mysql-connector-java-5.1.11-bin.jar
mysql-connector-java-3.1.12.jar

that's also going to give you more trouble later, choose one not both

Is hibernate3.jar really a duplicate on classpath?

As I see you're having much trouble in identifying and selecting the jar, I'd suggest you to study how to use maven2 which is a powerful tool to handle this for you and correctly identify what to put on classpath, and also shows the dependency tree to answer your last question; all hibernate libs are maven friendly.

Also this is not the right forum for such questions, this is about hibernate Search, Validator and Shards

_________________
Sanne
http://in.relation.to/


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

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.