As far as I can tell 'XJ' represents JDBC exceptions/messages, as this
is where the majority of duplicate messages between network and embedded
clients appear to be located, in my investigations.
David
Dag H. Wanvik wrote:
Hi,
looking at the Javadoc for SQLState, I noticed that it describes some
state ranges, e.g. for Basic services, Connectivity, Language, but
these explanations are not comprehensive, e.g. states starting with
"XJ.." are not mentioned. What's the story here?
Shouldn't this be augmented?
Dag
"Rick" == Rick Hillegas <[EMAIL PROTECTED]> wrote:
Rick>
Rick> Hi Deepa,
Rick> Sql states are supposed to uniquely identify error conditions. To me
Rick> these look like different errors, each of which should have its own sql
Rick> state. Could you fix this while you're in there? It looks like there are
Rick> four sql states whose codes are duplicated:
Rick>
Rick> ij> select sql_state, count(sql_state)
Rick> from new org.apache.derby.diag.ErrorMessages() c
Rick> group by sql_state
Rick> having count(sql_state) > 1
Rick> ;
Rick> SQL_&|2
Rick> -----------------
Rick> 22007|2
Rick> 42601|2
Rick> 42815|2
Rick> XJ081|2
Rick>
Rick> The duplications of 42601 and XJ081 look like mistakes to me.
Rick>
Rick> The other two sql states (22007 and 42815) have 11 character codes. The
Rick> header comment in SQLState.java explains the meaning of 5, 7, and 9
Rick> character codes. But I don't see any explanation of these 11 character
Rick> codes. Can anyone shed some light on this?
Rick>
Rick> Thanks,
Rick> -Rick
Rick>
Rick> Deepa Remesh wrote:
Rick>
Rick> >For DERBY-682, I was adding SQLStates with severity >=
Rick> >session_severity to the test lang/errorCode.sql. While doing this, I
Rick> >found that the SQLState 'XJ081' appears two times in the message
Rick> >properties file with two different severity levels. Output from ij is:
Rick> >ij> select * from new org.apache.derby.diag.ErrorMessages() c where
Rick> >sql_state = 'XJ081';
Rick> >SQL_&|MESSAGE
Rick> >
Rick> >|SEVERITY
Rick>
>--------------------------------------------------------------------------------------------------------------------------------------------------
Rick> >XJ081|Invalid value '{0}' passed as parameter '{1}' to method '{2}'
Rick> > |20000
Rick> >XJ081|Conflicting create/restore/recovery attributes specified.
Rick> > |40000
Rick> >
Rick> >SQLState.java has this:
Rick> >String INVALID_API_PARAMETER = "XJ081.S";
Rick> >String CONFLICTING_RESTORE_ATTRIBUTES = "XJ081.C";
Rick> >I checked the code and both these are exceptions are thrown from the
code.
Rick> >
Rick> >The Javadoc for org.apache.derby.iapi.reference.SQLState says this:
Rick> >"If the state is seven characters long then only the first five will
Rick> >be seen by the error reporting code and exception." Can this
Rick> >duplication of first 5 characters in SQLState cause any problems?
Rick> >
Rick> >Thanks,
Rick> >Deepa
Rick> >
Rick> >
Rick>
begin:vcard
fn:David W Van Couvering
n:Van Couvering;David W
org:Sun Microsystems, Inc.;Database Technology Group
email;internet:[EMAIL PROTECTED]
title:Senior Staff Software Engineer
tel;work:510-550-6819
tel;cell:510-684-7281
x-mozilla-html:TRUE
version:2.1
end:vcard