-->
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: JDBCExceptionReporter annoying warnings
PostPosted: Thu Feb 12, 2004 5:48 am 
Newbie

Joined: Wed Dec 10, 2003 3:44 pm
Posts: 12
At every application start I find the following in my logs:

Code:
10:43:38,015  WARN JDBCExceptionReporter:20 - SQL Warning: 0, SQLState:
10:43:38,015  WARN JDBCExceptionReporter:28 - [Microsoft][SQLServer 2000 Driver for JDBC]Database changed to MyDatabase
10:43:38,015  WARN JDBCExceptionReporter:20 - SQL Warning: 0, SQLState:
10:43:38,031  WARN JDBCExceptionReporter:28 - [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Changed database context to 'MyDatabase'.
10:43:38,031  WARN JDBCExceptionReporter:20 - SQL Warning: 0, SQLState:
10:43:38,031  WARN JDBCExceptionReporter:28 - [Microsoft][SQLServer 2000 Driver for JDBC]Language changed to us_english
10:43:38,031  WARN JDBCExceptionReporter:20 - SQL Warning: 0, SQLState:
10:43:38,031  WARN JDBCExceptionReporter:28 - [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Changed language setting to us_english.


Does anybody know why these exceptions are thrown and how to prevent ?
Maybe some kind of parameter in the connection string?

Raising the logging threshold is not a solution for me, because I need to see other kind of warnings thrown by the JDBCExceptionReporter class.

Thanks for help!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 5:56 am 
Senior
Senior

Joined: Sun Jan 04, 2004 2:46 pm
Posts: 147
If you're using the built in connection pool then try out one of the connection pool libraries that hibernate supports. I had the same problem and switching to DBCP made those errors disappear.

[url]http://jakarta.apache.org/commons/dbcp/[url]

Cheers.

Myk.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 5:56 am 
Senior
Senior

Joined: Sun Jan 04, 2004 2:46 pm
Posts: 147
Forum needs an edit button

http://jakarta.apache.org/commons/dbcp/


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 7:25 am 
Newbie

Joined: Wed Dec 10, 2003 3:44 pm
Posts: 12
Thanks Myk!

Since I am in a hurry, could you please paste your hibernate settings related to DBCP? Or the default ones are fine?

Thanks for your attention!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 8:57 am 
Senior
Senior

Joined: Sun Jan 04, 2004 2:46 pm
Posts: 147
Code:
###################################
### Apache DBCP Connection Pool ###
###################################

## connection pool

hibernate.dbcp.maxActive 100
hibernate.dbcp.whenExhaustedAction 1
hibernate.dbcp.maxWait 120000
hibernate.dbcp.maxIdle 10

## prepared statement cache

hibernate.dbcp.ps.maxActive 100
hibernate.dbcp.ps.whenExhaustedAction 1
hibernate.dbcp.ps.maxWait 120000
hibernate.dbcp.ps.maxIdle 10

## optional query to validate pooled connections:

#hibernate.dbcp.validationQuery select 1 from dual
#hibernate.dbcp.testOnBorrow true
#hibernate.dbcp.testOnReturn false


Think these are just the defaults. The important thing is to have the first two sections present. The third section I believe is for testing connections are still alive before giving them to applications, probably handy if you're system has an uptime measured in days.

Cheers.

Myk.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 12, 2004 9:09 am 
Newbie

Joined: Wed Dec 10, 2003 3:44 pm
Posts: 12
Just tested and it works like a charm!

Thanks again Myk!


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.