Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7660005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:24:28+00:00 2026-05-31T13:24:28+00:00

I am using hibernate 3.2.5.ga and having sever difficult setting up log4j logging. I

  • 0

I am using hibernate 3.2.5.ga and having sever difficult setting up log4j logging. I have tried everything in this thread: Configuring Hibernate logging using Log4j XML config file?

In summary: here is my log4j.xml

in my hibernate.properties I have

<appender name="HibernateAppender" class="org.apache.log4j.FileAppender">
    <param name="File" value="hibernate.log" />
    <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%d %-5p [%t] [Acc=%X{MDCKey.Account}] [Oppo=%X{MDCKey.Opportunity}] [URL=%X{MDCKey.Url}] [Dest=%X{MDCKey.Dest}] (%F:%L) - %m%n"/>
    </layout>       
</appender>
<logger name="org.hibernate">
<level value="debug" />
<appender-ref ref="HibernateAppender"/>
</logger>

<root>
    <priority value="info" />
    <appender-ref ref="Log"/>
    <appender-ref ref="DailyRollover"/>
    <appender-ref ref="ErrorCaptureAppender"/>
</root>

In my hibernate.properties I also set:

hibernate.show_sql true

When I debug the code, I see hibernate delegate its logging to slf4j classes. When I debug these classes I see empty implementation of methods. For example: org.slf4j.impl.NOPLogger has empty implementation for its log methods. I think this the problem.

In my maven I have :

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.5.2</version>
      <optional>false</optional>
    </dependency>

So this is the version of slf4j I am using. Note, I have tried various configurations for the log4j.xml for example explictly adding the appender to the root. Just really stuck.

Any tips?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T13:24:28+00:00Added an answer on May 31, 2026 at 1:24 pm

    I think you miss the correct “SLF4J bindings” jar that matches your logging frameworks (i.e log4j in your case) in order to delegate all the logging calls of the SLF4J API to log4j.

    Try to add the following in order to download the binding for log4j (i.e slf4j-log4j12-1.5.2.jar)

    <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.5.2</version>
    </dependency>
    

    Of course , please also make sure that you have already included log4j in the Maven dependencies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Hibernate's JPA impl to model some tables. I'm having trouble mapping a
I'm having a problem implementing a bi-directional parent/child relationship using hibernate 3. The parent,
I'm doing a directory listing using Hibernate and, to avoid having tons of data
I'm having problems using Hibernate and SQL Server 2008. When I try to save
I'm using Spring 3.0.2, Hibernate 3.5.0 and c3p0 0.9.1.2 and I'm having a ton
I'm having a weird problem using Spring and Hibernate. I started using Hibernate using
I'm having a bit of a weird issue here, basically, im using hibernate together
I am having a java project with a ant build file, using this ant
I'm having a little trouble using Hibernate with a char(6) column in Oracle. Here's
I am currently trying to solve a problem, that I have using Hibernate 4

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.