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 1073463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:59:45+00:00 2026-05-16T20:59:45+00:00

My story is as follows. I have a java app with hibernate connected to

  • 0

My story is as follows.
I have a java app with hibernate connected to a embedded db(derby).
The funny thing was, that my hibernate app printed the uname at start, because i was using slf4j-simple, and so i set my App to use log4j.

Hibernate db uname&pass are set in code, using property object.
I tried using the same trick on log4j property configurator, but the log4j.properties file overide my property object.
But the log4j.properties file is easily changed, and the main quiestion is.
Can log4j be set to print my db uname&pass, or any of the sensitive data used in my Hibernate config in the App???

  • 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-16T20:59:45+00:00Added an answer on May 16, 2026 at 8:59 pm

    If I understand you correctly… that your hibernate app is making calls (either directly or indirectly) to one of the logger functions (debug, warn, error, info, etc) and passing the username/password as the parameters…

    Then, YES, absolutely log4j can be configured to print uname & pass. And, YES, you can “set the logger in log4j.”

    Moreover, doing either would be rather easy. You can modify the root logger to display all logging calls throughout the entire application (including the libraries).


    The bottom line, if the uname/pass are set in code, in plain text, getting it out is trivially simple (log4j isn’t the only way), even without access to the source *.java files.

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

Sidebar

Related Questions

Story: One of the app that i have works on python 2.4 and other
Long story short, I have a substantial Python application that, among other things, does
Need some guidance. I have java webstart app and I want it to connect
I have a byte[] that I am persisting to a Lob as follows: @Basic(fetch
I am creating a java app. I have one class q2a2 which is a
I have JSON object as follows: member = {interests : [{interestKey:Dogs}, {interestKey:Cats}]}; In Java
I have an ASP.NET MVC app that shows news articles and for the main
I have a table with sales per store as follows: SQL> select * from
Story: The user uploads an image that will be added to a photo gallery.
Story: I have a link which has some text. A part of the link

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.