Hi Andrus,
this kind of problem happen on all the stored procedure. (i haven't tried with query).
Those stored procedure, doesn't have a "Update" query, ma only a simple "Select" query.
So i don't understand which is the "update" query that appears in log.
Anyhow i will open a bug report in Jira.
Thank's for your support.
Davide
-----Original Message-----
From: Andrus Adamchik [mailto:andru..bjectstyle.org]
Sent: giovedì 20 gennaio 2005 19.40
To: cayenne-use..bjectstyle.org
Subject: Re: Problem with Oracle Driver
Here is stripped down code that handles stored procedure execution:
boolean hasResultSet = statement.execute();
while (true) {
if (hasResultSet) {
ResultSet rs = statement.getResultSet();
// ...
} else {
int updateCount = statement.getUpdateCount();
if (updateCount == -1) {
break;
}
// ...
}
hasResultSet = statement.getMoreResults();
}
So there is a chance of an infinite loop if a driver misbehaves (i.e.
never resets the update count no matter how many times you read it). Could
you open a bug report in Jira indicating:
- Exact Oracle driver version
- Oracle DB version
- Full source of the stored procedure (doesn't matter what tables it
accesses, what's important is control flow)
- Cayenne/Java code sample calling the procedure.
I'll take a look.
Andrus
> Hi,
> i have found a strange error when i use JDBC 3.0 Oracle drivers.
> When i execute a Stored Procedure whit this drivers, Cayenne go in loop,
> and print this kind of log :
>
> ------------------------------------------------------------------------------------------------------------------------
> Password: *******
> INFO QueryLogger: +++ Connecting: SUCCESS.
> INFO QueryLogger: {call LOGIN(?, ?, ?, ?)} [bind: 'smith', '[OUT]',
> '[OUT]', '[OUT]']
>
> INFO QueryLogger: === returned 1 row. - took 16 ms.
> INFO QueryLogger: === returned 1 row. - took 16 ms.
> INFO QueryLogger: === updated 1 row.
> INFO QueryLogger: === updated 1 row.
> INFO QueryLogger: === updated 1 row.
> INFO QueryLogger: === updated 1 row.
> ...
> ...
> ...
> ------------------------------------------------------------------------------------------------------------------------
> .. infinite loop whit "INFO QueryLogger: === updated 1 row" as a log.
>
> If i use "classes12.zip" instead, it works.
>
> Anyone have suggest?
>
> Thank's
> Davide
This archive was generated by hypermail 2.0.0 : Fri Jan 21 2005 - 04:24:40 EST