You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Michael Friedmann <mf...@helmpoint.com> on 2014/02/14 18:22:21 UTC

log4j2 and Hibernate

We are using log4j2 and Hibernate (3.6.0.Final) wired through Spring (HibernateJpaVendorAdapter).  Whenever 'showSql' is set to true, this seems to cause the application to hang (deadlock?) - needless to say without displaying any native SQL logging.  Anyone else run into this issue?  We need to be able to display Hibernate's native SQL logging at times, so permanently turning this off is not really an option.

Appreciate any help resolving this issue.

Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: log4j2 and Hibernate

Posted by Matt Sicker <bo...@gmail.com>.
Speaking of ancient versions of Hibernate, we're using version 3.2 or 3.3
(I forget which) at Peapod. I'm already working at upgrading to 3.6.10 and
fixing up code using deprecated things so we can move to 4.x eventually.
Actually, I want to replace it with JPA proper so we can use something else
like DataNucleus since it's so much faster.


On 14 February 2014 13:25, Michael Friedmann <mf...@helmpoint.com>wrote:

> Nick,
>
> Thanks for your suggestions.  I admit we are using an 'ancient' version of
> Hibernate.  Believe it or not, we were actually using an even older version
> before log4j2 forced us to a later version.  I'll see if we can upgrade for
> starters and go from there.
>
> Michael
>
> ________________________________________
> From: Nick Williams [nicholas@nicholaswilliams.net]
> Sent: Friday, February 14, 2014 2:02 PM
> To: Log4J Users List
> Subject: Re: log4j2 and Hibernate
>
> Oh. Gotchya. It's been so long since I've used ANCIENT Hibernate I had
> forgotten. ;-) ...
>
> So you have the log4j-slf4-impl artifact on your classpath then? Which
> version of Log4j 2 are you using? What does your Log4j config file look
> like? Can you take a thread dump when it "hangs" and pinpoint the source of
> the deadlock? Have you also posted in the Hibernate forums (I would
> recommend this) and, if so, did you learn anything there?
>
> The first thing I know to tell you off the top of my head (without more
> information) is to AT LEAST upgrade to Hibernate 3.6.10.Final, which is two
> years old. The version you're using is four years old and MANY bugs have
> been fixed since then. To be clear, the Hibernate 3.x line isn't supported
> anymore, so you really should upgrade to 4.x.
>
> Nick
>
> On Feb 14, 2014, at 12:45 PM, Michael Friedmann wrote:
>
> > Nick,
> >
> > To my knowledge, Hibernate does not use JBoss logging until version 4.x
> and we're using Hibernate 3.x, so JBoss logging is not on our classpath.
>  Am I mistaken?
> >
> > Michael
> > ________________________________________
> > From: Nick Williams [nicholas@nicholaswilliams.net]
> > Sent: Friday, February 14, 2014 1:10 PM
> > To: Log4J Users List
> > Subject: Re: log4j2 and Hibernate
> >
> > Michael, what version of JBoss Logging is on your classpath?
> >
> > N
> >
> > On Feb 14, 2014, at 11:22 AM, Michael Friedmann wrote:
> >
> >> We are using log4j2 and Hibernate (3.6.0.Final) wired through Spring
> (HibernateJpaVendorAdapter).  Whenever 'showSql' is set to true, this seems
> to cause the application to hang (deadlock?) - needless to say without
> displaying any native SQL logging.  Anyone else run into this issue?  We
> need to be able to display Hibernate's native SQL logging at times, so
> permanently turning this off is not really an option.
> >>
> >> Appreciate any help resolving this issue.
> >>
> >> Michael
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >> For additional commands, e-mail: log4j-user-help@logging.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
Matt Sicker <bo...@gmail.com>

RE: log4j2 and Hibernate

Posted by Michael Friedmann <mf...@helmpoint.com>.
Nick,

Thanks for your suggestions.  I admit we are using an 'ancient' version of Hibernate.  Believe it or not, we were actually using an even older version before log4j2 forced us to a later version.  I'll see if we can upgrade for starters and go from there.

Michael

________________________________________
From: Nick Williams [nicholas@nicholaswilliams.net]
Sent: Friday, February 14, 2014 2:02 PM
To: Log4J Users List
Subject: Re: log4j2 and Hibernate

Oh. Gotchya. It's been so long since I've used ANCIENT Hibernate I had forgotten. ;-) ...

So you have the log4j-slf4-impl artifact on your classpath then? Which version of Log4j 2 are you using? What does your Log4j config file look like? Can you take a thread dump when it "hangs" and pinpoint the source of the deadlock? Have you also posted in the Hibernate forums (I would recommend this) and, if so, did you learn anything there?

The first thing I know to tell you off the top of my head (without more information) is to AT LEAST upgrade to Hibernate 3.6.10.Final, which is two years old. The version you're using is four years old and MANY bugs have been fixed since then. To be clear, the Hibernate 3.x line isn't supported anymore, so you really should upgrade to 4.x.

Nick

On Feb 14, 2014, at 12:45 PM, Michael Friedmann wrote:

> Nick,
>
> To my knowledge, Hibernate does not use JBoss logging until version 4.x and we're using Hibernate 3.x, so JBoss logging is not on our classpath.  Am I mistaken?
>
> Michael
> ________________________________________
> From: Nick Williams [nicholas@nicholaswilliams.net]
> Sent: Friday, February 14, 2014 1:10 PM
> To: Log4J Users List
> Subject: Re: log4j2 and Hibernate
>
> Michael, what version of JBoss Logging is on your classpath?
>
> N
>
> On Feb 14, 2014, at 11:22 AM, Michael Friedmann wrote:
>
>> We are using log4j2 and Hibernate (3.6.0.Final) wired through Spring (HibernateJpaVendorAdapter).  Whenever 'showSql' is set to true, this seems to cause the application to hang (deadlock?) - needless to say without displaying any native SQL logging.  Anyone else run into this issue?  We need to be able to display Hibernate's native SQL logging at times, so permanently turning this off is not really an option.
>>
>> Appreciate any help resolving this issue.
>>
>> Michael
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: log4j2 and Hibernate

Posted by Nick Williams <ni...@nicholaswilliams.net>.
Oh. Gotchya. It's been so long since I've used ANCIENT Hibernate I had forgotten. ;-) ...

So you have the log4j-slf4-impl artifact on your classpath then? Which version of Log4j 2 are you using? What does your Log4j config file look like? Can you take a thread dump when it "hangs" and pinpoint the source of the deadlock? Have you also posted in the Hibernate forums (I would recommend this) and, if so, did you learn anything there?

The first thing I know to tell you off the top of my head (without more information) is to AT LEAST upgrade to Hibernate 3.6.10.Final, which is two years old. The version you're using is four years old and MANY bugs have been fixed since then. To be clear, the Hibernate 3.x line isn't supported anymore, so you really should upgrade to 4.x.

Nick

On Feb 14, 2014, at 12:45 PM, Michael Friedmann wrote:

> Nick,
> 
> To my knowledge, Hibernate does not use JBoss logging until version 4.x and we're using Hibernate 3.x, so JBoss logging is not on our classpath.  Am I mistaken?
> 
> Michael
> ________________________________________
> From: Nick Williams [nicholas@nicholaswilliams.net]
> Sent: Friday, February 14, 2014 1:10 PM
> To: Log4J Users List
> Subject: Re: log4j2 and Hibernate
> 
> Michael, what version of JBoss Logging is on your classpath?
> 
> N
> 
> On Feb 14, 2014, at 11:22 AM, Michael Friedmann wrote:
> 
>> We are using log4j2 and Hibernate (3.6.0.Final) wired through Spring (HibernateJpaVendorAdapter).  Whenever 'showSql' is set to true, this seems to cause the application to hang (deadlock?) - needless to say without displaying any native SQL logging.  Anyone else run into this issue?  We need to be able to display Hibernate's native SQL logging at times, so permanently turning this off is not really an option.
>> 
>> Appreciate any help resolving this issue.
>> 
>> Michael
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 


RE: log4j2 and Hibernate

Posted by Michael Friedmann <mf...@helmpoint.com>.
Nick,

To my knowledge, Hibernate does not use JBoss logging until version 4.x and we're using Hibernate 3.x, so JBoss logging is not on our classpath.  Am I mistaken?

Michael
________________________________________
From: Nick Williams [nicholas@nicholaswilliams.net]
Sent: Friday, February 14, 2014 1:10 PM
To: Log4J Users List
Subject: Re: log4j2 and Hibernate

Michael, what version of JBoss Logging is on your classpath?

N

On Feb 14, 2014, at 11:22 AM, Michael Friedmann wrote:

> We are using log4j2 and Hibernate (3.6.0.Final) wired through Spring (HibernateJpaVendorAdapter).  Whenever 'showSql' is set to true, this seems to cause the application to hang (deadlock?) - needless to say without displaying any native SQL logging.  Anyone else run into this issue?  We need to be able to display Hibernate's native SQL logging at times, so permanently turning this off is not really an option.
>
> Appreciate any help resolving this issue.
>
> Michael
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: log4j2 and Hibernate

Posted by Nick Williams <ni...@nicholaswilliams.net>.
Michael, what version of JBoss Logging is on your classpath?

N

On Feb 14, 2014, at 11:22 AM, Michael Friedmann wrote:

> We are using log4j2 and Hibernate (3.6.0.Final) wired through Spring (HibernateJpaVendorAdapter).  Whenever 'showSql' is set to true, this seems to cause the application to hang (deadlock?) - needless to say without displaying any native SQL logging.  Anyone else run into this issue?  We need to be able to display Hibernate's native SQL logging at times, so permanently turning this off is not really an option.
> 
> Appreciate any help resolving this issue.
> 
> Michael
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>