开发者

Hibernate - Connection hangs

开发者 https://www.devze.com 2023-01-10 16:58 出处:网络
I\'m getting these warnings in my application, and it takes a long time get the response from database calls like 10-15 minutes. But is works fairly with slow response time, the problem is this same a

I'm getting these warnings in my application, and it takes a long time get the response from database calls like 10-15 minutes. But is works fairly with slow response time, the problem is this same application works in my friends machine with fast database calls and no hangs under same configurations, even it worked in my machine before it get crashed. I couldn't figure out the reason behind this issue

Here's the logs with warnings

Aug 6, 2010 10:04:14 AM net.sf.hibernate.util.JDBCExceptionReporter logWarnings
WARNING: [Microsoft][SQLServer 2000 Driver for JDBC]Database changed to TEST_DATABASE
Aug 6, 2010 10:04:14 AM net.sf.hibernate.util.JDBCExceptionReporter logWarnings
WARNING: SQL Warning: 0, SQLState: 
Aug 6, 2010 10:04:14 AM net.sf.hibernate.util.JDBCExceptionReporter logWarnings
WARNING: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Changed database context to 'TEST_DATABASE'.
Aug 6, 2010 10:04:14 AM net.sf.hibernate.util.JDBCExceptionReporter logWarnings
WARNING: SQL Warning: 0, SQLState: 
Aug 6, 2010 10:04:14 AM net.sf.hibernate.util.JDBCExceptionReporter logWarnings
WARNING: [Microsoft][SQLServer 2000 Driver for JDBC]Language changed to us_english
Aug 6, 2010 10:04:14 AM net.sf.hibernate.util.JDBCExceptionReporter logWarnings
WARNING: SQL Warning: 0, SQLSt开发者_JS百科ate: 
Aug 6, 2010 10:04:14 AM net.sf.hibernate.util.JDBCExceptionReporter logWarnings
WARNING: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Changed language setting to us_english.
Aug 6, 2010 10:10:04 AM org.logicalcobwebs.proxool.admin.StatisticsLogger statistics
INFO: 10:05:00 - 10:10:00, s:3:0.01/s, r:0:0.00/s, a:23.33ms/0.00

My system is

  • Ubuntu 9.04
  • Apache tomcat 5.5.27
  • Hibernate 3
  • Ant 1.7.0
  • JDK 1.5.0_12
  • MyEclipse 7.5 as the development tool.


According to various sources, these SQL Warning: 5701 (Changed database context) and 5703 (Changed language setting) are informational and should just be ignored(!).

From the Thread: SQLstate(01000) vendor code(5701):

The 'changed database context' message is just one of the chatty informational messages that SQLServer has historically returned to the client, which are universally ignored. The JDBC driver must make any non-exception DBMS message available via a SQLWarning. Ignore it unless you're surprised that your default database context is Madimak. The cause of the message is that the initial context of a new connection is actually master, until the DBMS changes it to the user's default context.

This is confirmed in ODBC and SQL Server (SQL Server 2000) - Connecting to a Data Source.

But I'm not sure the slowness is related to these "warnings". My understanding of the above is that it is not.

Could you actually show your connection string? Just in case, the reference is Building the Connection URL.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号