Hi,
Has anyone seen this exception with Slide 2.1b1?
com.ibm.db2.jcc.b.SQLException: No authorized routine named "INSTR"
of type
"FUNCTION" having compatible arguments was found.
I'm using the DB2RDBMSAdapter with DB2 Universal DB v8. I believe that the
DB2 client is at the same level. The exception comes from executing an SQL
statement created by the following code in StandardRDBMSAdapter.java in the
retrieveRevisionDescriptors() method. eg.
statement = connection.prepareStatement(
"select vh.REVISION_NO, b.BRANCH_STRING
from VERSION_HISTORY vh, BRANCH b, URI u
where vh.BRANCH_ID=b.BRANCH_ID and vh.URI_ID=u.URI_ID and
u.URI_STRING=?
order by " +
convertRevisionNumberToComparable("vh.REVISION_NO"));
statement.setString(1, uri.toString());
res = statement.executeQuery();
Here is the SQL statement that it is actually trying to execute:
select vh.REVISION_NO, b.BRANCH_STRING
from VERSION_HISTORY vh, BRANCH b, URI u
where vh.BRANCH_ID=b.BRANCH_ID and vh.URI_ID=u.URI_ID and
u.URI_STRING=?
order by
to_number(substr(vh.REVISION_NO,1,instr(vh.REVISION_NO,'.')-1)),
to_number(substr(vh.REVISION_NO,instr(vh.REVISION_NO,'.')+1))
The "?" will be replaced by '/' which is the URI passed in. Is the "instr"
function not supposed to have two parameters? Any idea why it doesn't like
the vh.REVISION_NO and/or '.' parameters? Or could it be that one of the
"substr" functions are wrong. One takes 3 params and the other takes 2??
Thanks,
Warwick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]