-->
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.  [ 3 posts ] 
Author Message
 Post subject: Hibernate Maven Dependencies
PostPosted: Fri Feb 26, 2010 7:45 pm 
Newbie

Joined: Fri Feb 26, 2010 7:35 pm
Posts: 2
I have a sort of meta-Hibernate question, if you will. I suspect its just me not understanding one of the several new tools I'm learning at once here, but given the number of other people I can see having the same problem, at least I'm not alone.

So I'm learning Hibernate, and with it Maven, because it seems a useful thing for keeping track of dependencies. And I wrote a little basic tutorial Hibernate app, which failed to run due to dependency problems with SLF4J. And googled around and found several of the numberless threads on these forums explaining what I was doing wrong - thank you all - and seem to have it sorted out now.

So here's my question: isn't this exactly what Maven is supposed to be doing for me? If Hibernate won't work without SLF4J installed, and exactly matching versions of slf4j-api, slf4j-log4jx, and log4j, shouldn't these all be dependencies listed in the Maven repository for Hibernate? And therefore all automagically kept up to date and stopping (some of) all of us newbs from filling up your forums complaining about the same error over and over? Am I missing how this works? Are there ways of setting up Hibernate so that SLF4J isn't required?

Sorry if this is a stupid question - please enlighten.


Top
 Profile  
 
 Post subject: Re: Hibernate Maven Dependencies
PostPosted: Mon Mar 01, 2010 4:02 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Hibernate requires SLF4J and slf4j-api as well as slf4j-log4jx are normally included in all Hibernate distributions as far I remember.
Indeed log4j itself is not included in the distributions because you not mandatory must use log4j.
SLF4J can also bridge to other log-implementations like commons logging for example.
That's I guess the reasonable motivation why log4j itself is not included in the distribution.


Top
 Profile  
 
 Post subject: Re: Hibernate Maven Dependencies
PostPosted: Wed Mar 03, 2010 1:33 pm 
Newbie

Joined: Fri Feb 26, 2010 7:35 pm
Posts: 2
Which makes a sort of sense - if the SLF4J libraries are always distributed with Hibernate, then noone should have to get them via Maven anyways. Except that it obviously doesn't always actually work, as evidenced by the dozens of folks like me who are getting cryptic error messages, not understanding why, and spending a considerable amount of time tracking down the problem. If I get hibernate from Maven, it doesn't come with SLF4J, because Maven doesn't recognise SLF4J as a dependency, so it just installs the hibernate libraries on my system _without_ SLF4J. Which would be my point; if SLF4J were configured as a Maven dependency, then they would be included in the distribution by Maven as well.


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