History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SQL-30
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Bob Swift
Reporter: Luigi Ida'
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Confluence SQL Plugin

sql: java.sql.SQLException: Could not find prepared statement with handle xx

Created: 14/Feb/08 03:58 AM   Updated: 28/Feb/08 11:13 AM
Component/s: None
Affects Version/s: 3.3.0
Fix Version/s: None

Time Tracking:
Not Specified

Labels:


 Description  « Hide
Randomly, executing queries in Confluence through sql plugin I get following exception:
sql: java.sql.SQLException: Could not find prepared statement with handle 20. (handle may vary, depending on the query that causes the exception).
Any idea about why this happens?
Every time a Restart of the application server is needed for making queries to work again properly.
Thanks

 All   Comments   Work Log   Change History   FishEye   Crucible   Related Builds      Sort Order: Ascending order - Click to sort in descending order
Bob Swift - 14/Feb/08 09:13 AM
Haven't seen this before. Does your server have performance limits? JVM memory or processor? Does it slow down after running for a period of time? I could be that your database drops the prepared statement if it does not get executed quickly enough.

What database? Can you include the log information for this error? Can you include the sql statement - so i can tell whether you are using substitution variables? Thanks.


Luigi Ida' - 14/Feb/08 12:22 PM
Unfortunately I didn't find anything useful in the confluence log file (I have now added log4j.logger.org.swift.confluence.sql=DEBUG).
DBMS is MS Sql Server 2000

Please find below one of the sql statements that cause the crash.

Thanks

{sql:dataSource=TrackerDS|output=wiki}

SELECT
'['+components.name+']' AS Component,
components.description AS Description,
CASE
WHEN .................
THEN .................
WHEN .................
THEN .................
FROM .................
LEFT JOIN
.................
ON .................
WHERE ....
AND ....
ORDER BY .....
{sql}

Result:
sql: java.sql.SQLException: Could not find prepared statement with handle 1.


Luigi Ida' - 21/Feb/08 08:41 AM
It happened again:

sql: java.sql.SQLException: Could not find prepared statement with handle 1.
select ''name'' as Name, desc as desc,mm,bd from cop where da=? and st<>'o'

No other info logged.