FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


how to configure libraries for Hibernate?





windowlicker
Hi there, I've got a problem with setting Hibernate for my application. I managed to configure setting using hibernate.cfg.xml but when I try to add mapping (file.hbm.xml) I receive an exception:

Code:
Exception in thread "main" java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.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.ManyToOne.getType(ManyToOne.java:49)
        at org.hibernate.mapping.ManyToOne.createForeignKey(ManyToOne.java:62)
        at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:2213)
        at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2170)
        at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2060)
        at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:381)
        at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:295)
        at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:166)
        at org.hibernate.cfg.Configuration.add(Configuration.java:702)
        at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:537)
        at org.hibernate.cfg.Configuration.addResource(Configuration.java:599)
        at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1621)
        at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1589)
        at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1568)
        at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1542)
        at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)

I did some research and it looks like there is something wrong with the libraries I use. If any of you successfully used Hibernate for MySQL, please list the libraries you used.

windowlicker

[mod edit] - Vrythramax - Please use the CODE tags when pasting sections of source code [/mod edit]
windowlicker
I managed to fix my application and it works now. The libraries needed are:

antlr-2.7.6.jar
cayenne-1.2.1.jar
cglib-2.0.1.jar
commons-collections-3.1.jar
dom4j-1.6.1.jar
ehcache-1.1.jar
ejb3-persistence.jar
hibernate-3.1.jar
hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-search-3.1.1.GA.jar
hibernate-validator.jar
javassist-3.9.0.GA.jar
jta-1.1.jar
lucene-core-2.4.1.jar
mysql-connector-java-5.1.7-bin.jar (or other driver)
slf4j-api-1.5.8.jar
slf4j-log4j12-1.4.0.jar

You can find most of these libreries with the Hibernate distribution, but if you'll get the same exception as I, replace the original JARs with these from the list above. You can find them using web JAR finders.
Don't forget about configure hibernate.cfg.xml, log4j.properties and mapping XMLs. Cheers!
aningbo
i dont think this is a correct forum but i'm glad you sorted it out yourself.

what kinda program is it anyways?

wow... this is my first post in like 2 months time!! happy to start posting again
Related topics
PHP without mySQL
Windows Vista Official Thread
PHP Tutorials
Free Online Books for EJB Hibernate J2EE etc
Hibernate Tutorial
The Perfect Audio Rips
Which Linux distribution is the best?
How to Configure the Built in Firewall in WinXP
What is your computer related obsession?
build Universal Binary version of mysql administrator
How to configure my webmail home page....
pro emitter libraries for particle illusion
Python beginners help!
Configure Display Resolution In Linux.
Reply to topic    Frihost Forum Index -> Computers -> Software

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.