-->
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.  [ 5 posts ] 
Author Message
 Post subject: Issue - Run a sample program [hibernate.cfg.xml]
PostPosted: Thu Feb 03, 2011 8:13 am 
Newbie

Joined: Thu Feb 03, 2011 8:04 am
Posts: 3
Hi,
When trying to run a simple Hibernate program , getting the following error.
Seems the hibernate.cfg.xml is not able to read

Thanks for help

===============================================================
12:00:51,609 INFO Version:43 - Hibernate Annotations 3.5.6-Final
12:00:51,656 INFO Environment:570 - Hibernate 3.5.6-Final
12:00:51,656 INFO Environment:603 - hibernate.properties not found
12:00:51,656 INFO Environment:781 - Bytecode provider name : javassist
12:00:51,671 INFO Environment:662 - using JDK 1.4 java.sql.Timestamp handling
12:00:51,781 INFO Version:37 - Hibernate Commons Annotations 3.2.0.Final
12:00:51,781 INFO Configuration:1518 - configuring from resource: hibernate.cfg.xml
12:00:51,781 INFO Configuration:1495 - Configuration resource: hibernate.cfg.xml
Exception in thread "main" java.lang.AbstractMethodError: org/slf4j/Logger.trace(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
at org.hibernate.cfg.EJB3DTDEntityResolver.resolveEntity(EJB3DTDEntityResolver.java:55)
at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1576)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:1212)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:107)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1520)
at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:1194)
at com.akd.hibernate.chapter1.TestEmployee.main(TestEmployee.java:17)


Top
 Profile  
 
 Post subject: Re: Issue - Run a sample program [hibernate.cfg.xml]
PostPosted: Thu Feb 03, 2011 8:26 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
please use the correct forum.

You likely have incompatible versions of slf4j jars in your classpath; for Hibernate 3.5.x, you need SLF4J 1.5.8 (both for the API and implementation JARs)

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


Top
 Profile  
 
 Post subject: Re: Issue - Run a sample program [hibernate.cfg.xml]
PostPosted: Thu Feb 03, 2011 8:59 am 
Newbie

Joined: Thu Feb 03, 2011 8:04 am
Posts: 3
Thanks for the response.

Can confirm I do have slf4J-api-1.5.8.jar on my classpath.

But issue exists with same error message.


Top
 Profile  
 
 Post subject: Re: Issue - Run a sample program [hibernate.cfg.xml]
PostPosted: Thu Feb 03, 2011 9:31 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
Can confirm I do have slf4J-api-1.5.8.jar on my classpath.

I'm sure you have more slf4j jars on your classpath. Tattletale is a usufeul tool to scan large and complex directories for class and jar duplicates: http://www.jboss.org/tattletale

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


Top
 Profile  
 
 Post subject: Re: Issue - Run a sample program [hibernate.cfg.xml]
PostPosted: Thu Feb 03, 2011 12:30 pm 
Newbie

Joined: Thu Feb 03, 2011 8:04 am
Posts: 3
I had to include slf4J-log4j12-1.5.8.jar , and now it works.

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.