Hibernate doesn't log anything anymore, since I relocated the log4j.xml and hibernate.properties files


Magic Carpet
HOME ยป Programming Languages

I had the following working organization


src/main/resources/log4j.xml
src/main/resources/hibernate.properties

I wanted to reorganize my webapp as follow:


src/main/resources/log/log4j.xml
src/main/resources/orm/hibernate.properties

The Logger.info("foobar") still logs well (after having set the log4jConfigLocation context parameter), and the app still has a working database connection.


The problem is that Hibernate doesn't log anything anymore, even if hibernate.show_sql is s


Related to : Hibernate doesn't log anything anymore, since I relocated the log4j.xml and hibernate.properties files
Hibernate doesn't log anything anymore, since I relocated the log4j.xml and hibernate.properties files
Programming Languages

I had the following working organization


src/main/resources/log4j.xml
src/main/resources/hibernate.properties

I wanted to reorganize my webapp as follow:


src/main/resources/log/log4j.xml
src/main/resources/orm/hibernate.properties

The Logger.info("foobar") still logs well (after having set the log4jConfigLocation context parameter), and the app still has a working database connection.


The problem is that Hibernate doesn't log anything anymore, even if hibernate.show_sql is s

Can't stop Hibernate from writing log to console (log4j.properties is ok)
Programming Languages

I've already set


<property name="show_sql">false</property>

& disable all messages in log4j.properties


But Hibernate shit to console with all queries & statements.


Log4j - org.hibernate.type doesn't work!
Programming Languages

This is my logger configuration:


log4j.logger.org.hibernate.SQL=TRACE, stdout
log4j.logger.org.hibernate.type=TRACE, stdout

but I don't see type bingings


So I tried this


log4j.logger.org.hibernate=TRACE, stdout

to see if I missed something (this shows all hibernate loggers)
and I found out that the org.hibernate.engine.QueryParameters logger also shows parameter bindings (still no sign of org.hibernate.type logger binding messages)


So then I tried


log4j.logger.org.hibernate.SQL=TRACE, stdout

Hibernate doesn't work anymore… why?
Programming Languages

I was doing simple things with hibernate, as I have to learn it for a project. I created this simple example:


package hibtests;
import hibtests.beans.newBean;
import org.hibernate.Session;
/**
*
* @author dario
*/
public class Main {
public void test(){
Session session = NewHibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
newBean nb = new newBean();
nb.setNome("FooFoo");
session.save(nb);
session.getTransaction().commit();
}



HD Wallpapers
3D
3D Abstract
City
Celebrities
Indian Celebrities
Cars
Travel
Girls
Animals Birds
Movies
Sports
Black White
Nature
Planes
Anime
Food Drink
Dreamy Fantasy
Architecture
Games
Space
Holidays
Flowers
Love
Artistic
Baby
Beach
Bikes Motorcycles
Macro
Computers
Vector
Funny
Army
Textures
Brands
Misc
Music
Other
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .