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.  [ 6 posts ] 
Author Message
 Post subject: it is possible to disable info in persistence.xml ?
PostPosted: Fri Aug 21, 2009 11:23 am 
Newbie

Joined: Fri Aug 21, 2009 11:12 am
Posts: 4
Is there any way to disable info within the file persistence.xml

21/08/2009 11:52:13 org.hibernate.cfg.annotations.Version <clinit>
INFO: Hibernate Annotations 3.3.1.GA
21/08/2009 11:52:13 org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.2.5
21/08/2009 11:52:13 org.hibernate.cfg.Environment <clinit>

I would like to disable the info


Top
 Profile  
 
 Post subject: Re: it is possible to disable info in persistence.xml ?
PostPosted: Fri Aug 21, 2009 11:44 am 
Beginner
Beginner

Joined: Wed Sep 06, 2006 12:08 pm
Posts: 48
Location: Warsaw - Poland - Europe - Milky Way
I used to set (or disable) log4j logging levels in log4j property file.

Piece of my log4j.properties:
Code:
log4j.logger.org.hibernate=WARN


Are you sure you want / must to do in persistence.xml file?

Take care,
Adam Wozniak


Top
 Profile  
 
 Post subject: Re: it is possible to disable info in persistence.xml ?
PostPosted: Fri Aug 21, 2009 12:00 pm 
Newbie

Joined: Fri Aug 21, 2009 11:12 am
Posts: 4
in hibernate with jpa , the log4j is used by default ?
because i don“t have the log4j.properties file


Top
 Profile  
 
 Post subject: Re: it is possible to disable info in persistence.xml ?
PostPosted: Fri Aug 21, 2009 12:03 pm 
Beginner
Beginner

Joined: Wed Sep 06, 2006 12:08 pm
Posts: 48
Location: Warsaw - Poland - Europe - Milky Way
The same like me - I've got two JPA project using Hibernate. Both are just standalone Java SE application.

Here you have a piece of my VM command line argument:
Code:
-Dlog4j.configuration=bonobo.server.log4j.properties


And
Code:
bonobo.server.log4j.properties
is my log4j configuration file.


Top
 Profile  
 
 Post subject: Re: it is possible to disable info in persistence.xml ?
PostPosted: Fri Aug 21, 2009 12:23 pm 
Newbie

Joined: Fri Aug 21, 2009 11:12 am
Posts: 4
now displays the following message:

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.annotations.Version).
log4j:WARN Please initialize the log4j system properly.

need to put something else in the file persistence.xml ?


Top
 Profile  
 
 Post subject: Re: it is possible to disable info in persistence.xml ?
PostPosted: Fri Aug 21, 2009 12:28 pm 
Beginner
Beginner

Joined: Wed Sep 06, 2006 12:08 pm
Posts: 48
Location: Warsaw - Poland - Europe - Milky Way
Yep, it's typical problem - I mean this your WARN message.
Ensure that your log4j property file (I don't know how did you name it) is on your classpath.

Adam Wozniak


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