-->
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: Tutorial Dependancy problems
PostPosted: Tue Jun 01, 2010 6:54 am 
Newbie

Joined: Tue Jun 01, 2010 6:33 am
Posts: 2
I am new at Hibernate and was starting the tutorial. I worked my way through it but when I ran it I got the following problem:

Code:
0 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.2.GA
0 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
15 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
15 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
46 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
46 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
109 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : org/hibernate/tutorial/domain/Event.hbm.xml
140 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: org.hibernate.tutorial.domain.Event -> EVENTS
156 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
Initial SessionFactory creation failed.java.lang.AbstractMethodError: org.slf4j.impl.SimpleLogger.isTraceEnabled()Z
Exception in thread "main" java.lang.ExceptionInInitializerError
   at org.hibernate.tutorial.util.HibernateUtil.buildSessionFactory(HibernateUtil.java:18)
   at org.hibernate.tutorial.util.HibernateUtil.<clinit>(HibernateUtil.java:8)
   at org.hibernate.tutorial.EventManager.createAndStoreEvent(EventManager.java:23)
   at org.hibernate.tutorial.EventManager.main(EventManager.java:16)
Caused by: java.lang.AbstractMethodError: org.slf4j.impl.SimpleLogger.isTraceEnabled()Z
   at org.hibernate.type.NullableType.<clinit>(NullableType.java:59)
   at org.hibernate.Hibernate.<clinit>(Hibernate.java:103)
   at org.hibernate.type.TypeFactory.<clinit>(TypeFactory.java:69)
   at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:283)
   at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:276)
   at org.hibernate.mapping.Property.isValid(Property.java:207)
   at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:458)
   at org.hibernate.mapping.RootClass.validate(RootClass.java:215)
   at org.hibernate.cfg.Configuration.validate(Configuration.java:1149)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1334)
   at org.hibernate.tutorial.util.HibernateUtil.buildSessionFactory(HibernateUtil.java:13)
   ... 3 more



I am pretty new at using maven. I saw somewhere on this forum about something similar being caused by incompatible versions of the slf4j components. Here is my POM dependancies :
Code:
  <dependencies>
     <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>3.3.2.GA</version>
     </dependency>
     <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
     </dependency>
     <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.3.1</version>
     </dependency>
     <dependency>
        <groupId>javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.8.0.GA</version>
     </dependency>
     <dependency>
       <groupId>hsqldb</groupId>
       <artifactId>hsqldb</artifactId>
       <version>1.8.0.1</version>
</dependency>
     
  </dependencies>


slf4j-simple version 1.3.1 causes slf4j-api-1.5.8 to be downloaded by maven. I tried to manually add a dependency for slf4j-log4j12-1.5.8 but 1.5.6 was the latest I could get. It didn't solve the problem.

Thanks in advance


EDIT: Sorry I pasted the wrong stack trace

Here is the dependency graph which might help:

Image


Top
 Profile  
 
 Post subject: Re: Tutorial Dependancy problems
PostPosted: Tue Jun 01, 2010 8:49 am 
Newbie

Joined: Tue Jun 01, 2010 6:33 am
Posts: 2
I think I found out where I was wrong. I changed the version of slf4j-simple to 1.5.8 and added slf4j-log4j12 to 1.5.6 and I think it is working.


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.