Tricky: java.lang.StackOverflowError due to recursive call in warning messages construction
From: Alexandre Delarge (alexandre.delarge_at_laposte.net.nospam)
Date: 09/01/04
- Next message: Joe Weinstein: "Re: Tricky: java.lang.StackOverflowError due to recursive call in warning messages construction"
- Previous message: kaicall: "RE: connection pool problem using in Tomcat"
- Next in thread: Joe Weinstein: "Re: Tricky: java.lang.StackOverflowError due to recursive call in warning messages construction"
- Reply: Joe Weinstein: "Re: Tricky: java.lang.StackOverflowError due to recursive call in warning messages construction"
- Reply: Alexandre Delarge: "Re: Tricky: java.lang.StackOverflowError due to recursive call in warning messages construction"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 1 Sep 2004 17:14:15 +0200
Greetings to readers,
I got this problem with both SP2 and SP3 of the JDBC driver for SQL Server
2000:
The recursive call made in method
"com.microsoft.jdbc.base.BaseWarnings.createSQLWarning()" causes a
java.lang.StackOverFlowError when number of warning messages (or PRINT sql
statements is too important).
To reproduce this problem, create a sql script which contains approximately
5 megabytes of PRINT statements within one unique transaction, e.g:
-----
SET NOCOUNT ON
PRINT 'Begin'
BEGIN TRANSACTION
PRINT 'Hello !' -- repeat this statement the required number times to
reach a file size of 5mb
COMMIT TRANSACTION
-----
As PRINT statements are returned as warning messages, this will have the
same consequence as producing real warnings.
Run that script on your database using classic Java code, eg:
statement.execute(loadedSqlScriptContent); // Send content of the sql
script to the server
resultSet = statement.getResultSet(); // This will get a null object as
you update nothing
SQLWarning warning = statement.getWarnings(); // Get print/warning
messages
The third line should cause a java.lang.StackOverFlowError as the number of
warning messages to construct is huge.
So I would have 2 questions:
- does anyone has any idea of how to solve this issue without simply
increasing the JVM stack size ? (you can keep suggestions like "don't
retrieve the warnings", etc. :).
- does anyone who I should contact to have this issue possibly fixed into
next JDBC driver's release ?
Any answer to any of these 2 questions would be just great.
Thanks a lot by advance.
Alexandre Delarge.
- Next message: Joe Weinstein: "Re: Tricky: java.lang.StackOverflowError due to recursive call in warning messages construction"
- Previous message: kaicall: "RE: connection pool problem using in Tomcat"
- Next in thread: Joe Weinstein: "Re: Tricky: java.lang.StackOverflowError due to recursive call in warning messages construction"
- Reply: Joe Weinstein: "Re: Tricky: java.lang.StackOverflowError due to recursive call in warning messages construction"
- Reply: Alexandre Delarge: "Re: Tricky: java.lang.StackOverflowError due to recursive call in warning messages construction"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|