-->
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.  [ 5 posts ] 
Author Message
 Post subject: hibernate Logger problem in jboss
PostPosted: Mon Dec 24, 2007 6:32 am 
Newbie

Joined: Mon Dec 24, 2007 6:21 am
Posts: 8
hi,

I am doing the project with hibernate based java web applcation under the jboss AS.




In the jboss server,

When i deploy the application as ear file,

the server should stopped the logger as given below::

I just show the logger after deploy the application



Start server.
.
.
.
14:17:55,360 INFO [EARDeployer] Init J2EE application: file:/E:/jboss4.0.2/server/default/deploy/LICMAN-REL-1-0-0.ear

14:17:57,844 INFO [Environment] Hibernate 3.0.2
14:17:57,844 INFO [Environment] hibernate.properties not found
14:17:57,844 INFO [Environment] using CGLIB reflection optimizer
14:17:57,844 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
14:17:57,938 INFO [Hibernate] Using JDBC batch size : null
14:17:57,969 INFO [Configuration] Searching for mapping documents in jar: LICMA
N-REL-1-0-0.har
14:17:57,969 INFO [Configuration] Found mapping documents in jar: com/meru/licm
an/hbmxml/Products.hbm.xml
14:17:58,110 INFO [HbmBinder] Mapping class: com.meru.licman.bo.products.Produc
tsBean -> product_master
14:17:58,172 INFO [HbmBinder] Mapping class: com.meru.licman.bo.products.Produc
tsRelBean -> product_release
14:17:58,282 INFO [Configuration] Found mapping documents in jar: com/meru/licm
an/hbmxml/Users.hbm.xml
14:17:58,297 INFO [HbmBinder] Mapping class: com.meru.licman.bo.users.UsersBean
-> users
14:17:58,297 INFO [Configuration] Found mapping documents in jar: com/meru/licm
an/hbmxml/customers.hbm.xml
14:17:58,313 INFO [HbmBinder] Mapping class: com.meru.licman.bo.customers.Custo
mersBean -> customers
14:17:58,313 INFO [Configuration] Found mapping documents in jar: com/meru/licm
an/hbmxml/license.hbm.xml
14:17:58,328 INFO [HbmBinder] Mapping class: com.meru.licman.bo.serialkey.Seria
lKeyBean -> product_license
14:17:58,328 INFO [Configuration] processing extends queue
14:17:58,328 INFO [Configuration] processing collection mappings
14:17:58,328 INFO [Configuration] processing association property references
14:17:58,328 INFO [Configuration] processing foreign key constraints





what is the problem for the logger could not be completed?

Plz let me know the details asap?

if you need more info, i will tell.


Regards,
vikneswaran.T


Top
 Profile  
 
 Post subject: Re: hibernate Logger problem in jboss
PostPosted: Mon Dec 24, 2007 11:53 am 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
If I understand correctly, you want to disable hibernate logs, right? How do you do it?


Top
 Profile  
 
 Post subject: RE:hibernate Logger problem in jboss
PostPosted: Wed Dec 26, 2007 12:32 am 
Newbie

Joined: Mon Dec 24, 2007 6:21 am
Posts: 8
hi,

my collegue is working with hibernate .
his jboss server is working properly and write a entire log of hibernate in jboss server.he also dont know why my jboss server did not write the log properly


Regards,

viknes


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 26, 2007 12:34 am 
Newbie

Joined: Mon Dec 24, 2007 6:21 am
Posts: 8
hi,

can we forcing hibernate log inot the seperate log file using log4j instead of writing jboss server?

plz let me know..


Regards,

viknes


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 26, 2007 10:15 am 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
vikneswar_me5 wrote:
hi,

can we forcing hibernate log inot the seperate log file using log4j instead of writing jboss server?

plz let me know..


Regards,

viknes


Yes you can. Define a new file appender in log4j config file:

Code:
   <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
     <param name="File" value="${jboss.server.log.dir}/hibernate.log"/>
     <param name="Append" value="true"/>
     <param name="MaxFileSize" value="500KB"/>
     <param name="MaxBackupIndex" value="1"/>

     <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
     </layout>      
   </appender>


and then configure hibernate logger to write to this file:

Code:
<category name="org.hibernate" additivity="false">
    <priority value="debug"/>
    <appender-ref ref="FILE"/>
  </category>



I hope this helps.

Farzad-


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