You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "David Van Couvering (JIRA)" <de...@db.apache.org> on 2006/01/20 18:27:42 UTC

[jira] Created: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
---------------------------------------------------------------------------------------

         Key: DERBY-842
         URL: http://issues.apache.org/jira/browse/DERBY-842
     Project: Derby
        Type: Sub-task
    Reporter: David Van Couvering




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "David W. Van Couvering" <Da...@Sun.COM>.
Good idea, Knut, thanks for the tip.

David

Knut Anders Hatlen wrote:
> "David Van Couvering (JIRA)" <de...@db.apache.org> writes:
> 
> 
>>    [ http://issues.apache.org/jira/browse/DERBY-842?page=comments#action_12374799 ] 
>>
>>David Van Couvering commented on DERBY-842:
>>-------------------------------------------
>>
>>Knut comments:
>><quote>
>> jdbc4/TestResultSetMethods.java fails too since on the client
>>ResultSet.checkForClosedResultSet() uses SQL state XJ012
>>(ALREADY_CLOSED) whereas EmbedResultSet.checkIfClosed() uses XCL16
>>(LANG_RESULT_SET_NOT_OPEN).
>></quote>  
>>
>>and Kathey mentions on email that we should strive for the SQL States to be the same on embedded and network client drivers, to which I wholeheartedly agree.
>>
>>The problem is, fixing this is turning out to be a bit tricky, because the message for XCL16 is
>>
>>XCL16.S=ResultSet not open. Operation ''{0}'' not permitted. Verify that autocommit is OFF.
>>
>>
>>The reason this is a problem is becuase ResultSet.checkForClosedResultSet()  is a generic method called by many (about 30) methods of ResultSet, and the particular operation being attempted is not specified.
>>
>>So, I could fix this by 
>>
>>(a) changing the message for XCL16 to not specify the operation
>>(b) use the string "<unspecified>" in the client code (I'd internationalize the string so it can be translated)
>>
>>Any opinions?  Otherwise I'll go with option (b)
> 
> 
> Isn't this case similar to those where you have added .0 and .1 as a
> suffix? For instance,
> 
>   XCL16.S.0="ResultSet not open."
>   XCL16.S.1="ResultSet not open. Operation {0} not permitted."
> 
> On the other hand, Rick's suggestion (Throwable.getStackTrace) sounded
> very fancy! :)
> 

Re: [jira] Commented: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by Knut Anders Hatlen <kn...@sun.com>.
"David Van Couvering (JIRA)" <de...@db.apache.org> writes:

>     [ http://issues.apache.org/jira/browse/DERBY-842?page=comments#action_12374799 ] 
>
> David Van Couvering commented on DERBY-842:
> -------------------------------------------
>
> Knut comments:
> <quote>
>  jdbc4/TestResultSetMethods.java fails too since on the client
> ResultSet.checkForClosedResultSet() uses SQL state XJ012
> (ALREADY_CLOSED) whereas EmbedResultSet.checkIfClosed() uses XCL16
> (LANG_RESULT_SET_NOT_OPEN).
> </quote>  
>
> and Kathey mentions on email that we should strive for the SQL States to be the same on embedded and network client drivers, to which I wholeheartedly agree.
>
> The problem is, fixing this is turning out to be a bit tricky, because the message for XCL16 is
>
> XCL16.S=ResultSet not open. Operation ''{0}'' not permitted. Verify that autocommit is OFF.
>
>
> The reason this is a problem is becuase ResultSet.checkForClosedResultSet()  is a generic method called by many (about 30) methods of ResultSet, and the particular operation being attempted is not specified.
>
> So, I could fix this by 
>
> (a) changing the message for XCL16 to not specify the operation
> (b) use the string "<unspecified>" in the client code (I'd internationalize the string so it can be translated)
>
> Any opinions?  Otherwise I'll go with option (b)

Isn't this case similar to those where you have added .0 and .1 as a
suffix? For instance,

  XCL16.S.0="ResultSet not open."
  XCL16.S.1="ResultSet not open. Operation {0} not permitted."

On the other hand, Rick's suggestion (Throwable.getStackTrace) sounded
very fancy! :)

-- 
Knut Anders


[jira] Commented: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-842?page=comments#action_12377776 ] 

Knut Anders Hatlen commented on DERBY-842:
------------------------------------------

One message in am/ResultSet.java has not been internationalized yet:

    private SQLException jdbc3MethodNotSupported()
    {
        // This will get internationalized in another patch
        return new SqlException(agent_.logWriter_, 
            "JDBC 3 method called - not yet supported").getSQLException();
    }

Is this one logged in another issue?

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-842?page=all ]
     
David Van Couvering reopened DERBY-842:
---------------------------------------


Resolved the wrong issue, it should have been DERBY-839

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-842?page=comments#action_12374777 ] 

David Van Couvering commented on DERBY-842:
-------------------------------------------

Hi, all.  I ran derbyall on JDK 14, and didn't run the jdbc4 tests.  I am making a note to start running those.  I am assuming it is not yet time to use JDK16 as the base JDK to run derbyall on.  Someone let me know if you have other opinions.  But I'll start running the jdbc4 suite.

I'll run jdbc4 on this patch and fix the discrepancies.  I have noted Kathey's comments that the SQL States should match and I agree.  It's very hard to do this manually so I am looking to all of you when you find a discrepancy like this to log a bug and I'll fix it.

Although the patch was large, the changes made are fairly basic and I assumed non-controversial.   I can start making these patches available for review, if there is a desire for this.

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "Dyre Tjeldvoll (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-842?page=comments#action_12374607 ] 

Dyre Tjeldvoll commented on DERBY-842:
--------------------------------------

It looks like revision 393967 breaks a number of tests in the jdbc4 suite.

Anurag Shekar writes:

All wrapper tests are failing because of a change in SQLState for 
failing to unwrap. (from XJ120 to XJ128). 
org.apache.derbyTesting.functionTests.util.SQLStateConstants.java still 
have the XJ120 for this state.
anurag
Dyre.Tjeldvoll@sun.com wrote:
> When I try to run TestDbMetaData.java on a clean trunk (compile and
> run with b80) I get:
>
> java.sql.SQLException: Unable to unwrap for 'interface java.sql.PreparedStatement'
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:44)
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:136)
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71)
>         at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:87)
>         at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:93)
>         at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:172)        at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(EmbedConnection.java:1939)
>         at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(ConnectionChild.java:150)
>         at org.apache.derby.impl.jdbc.EmbedDatabaseMetaData40.unwrap(EmbedDatabaseMetaData40.java:113)
>         at org.apache.derbyTesting.functionTests.tests.jdbc4.TestDbMetaData.t_wrapper(TestDbMetaData.java:377)
>         at org.apache.derbyTesting.functionTests.tests.jdbc4.TestDbMetaData.testDatabaseMetaDataMethods(TestDbMetaData.java:173)
>
> Can anyone shed some light on this? 

This is a bit of a problem since the primary test suite for the jdbc4 work is now broken.

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-842?page=all ]
     
David Van Couvering closed DERBY-842:
-------------------------------------


> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-842?page=all ]
     
David Van Couvering resolved DERBY-842:
---------------------------------------

    Resolution: Fixed

Fixed missed hardcoded string, revision 410695.  Passes derbynetclientmats and jdbc40 suites.

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-842?page=comments#action_12374801 ] 

Rick Hillegas commented on DERBY-842:
-------------------------------------

If you wanted to be fancy: checkForClosedResultSet() could use Throwable.getStackTrace() to look at the stack above it and find the first method name which appears in the public api for ResultSet. That name could then be included in the error message.

As a practical matter, I don't see much value to the "Operation {0} not permitted" clause. The application code knows which ResultSet method it just called.

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "Mike Matrigali (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-842?page=all ]

Mike Matrigali updated DERBY-842:
---------------------------------

      Component: Network Client
    Description: 
    Environment: 

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task
>   Components: Network Client
>     Reporter: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-842?page=comments#action_12377838 ] 

David Van Couvering commented on DERBY-842:
-------------------------------------------

I will fix this, I am not aware of a bugid that covers this.  I'll reopen the bug

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-842?page=all ]
     
David Van Couvering reopened DERBY-842:
---------------------------------------


Missed an internationalization change.  This may have been added later, but I'll fix it.

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


SQLState for result set already closed (was Re: [jira] Commented: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am)

Posted by Kathey Marsden <km...@sbcglobal.net>.
Knut Anders Hatlen (JIRA) wrote:

>jdbc4/TestResultSetMethods.java fails too since on the client
>ResultSet.checkForClosedResultSet() uses SQL state XJ012
>(ALREADY_CLOSED) whereas EmbedResultSet.checkIfClosed() uses XCL16
>(LANG_RESULT_SET_NOT_OPEN).
>
>  
>
It seems to me that the client message here should match embedded and
the SQLState selection should go like this:
1) Match the standard
2) Match embedded if there is no exception for the error defined in the
standard but it exists in embedded.
3) Make a new SQLState if neither 1 nor 2 apply.

Whatever we can do to create a seamless transition  between client and
embedded is good.  Ideally I think  we just want users to be able to
change their URL or DataSource and that's it.

Question:  Looking at the SQLState documentation at
http://db.apache.org/derby/docs/dev/ref/rrefexcept71493.html, I see
Table 23. Class Code XCL: Non-SQLSTATE.  What does "Non-SQLSTATE" mean
exactly?  Is it just a catch all for SQLStates that don't fall into one
of the other categories?

Kathey





[jira] Commented: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-842?page=comments#action_12374684 ] 

Knut Anders Hatlen commented on DERBY-842:
------------------------------------------

jdbc4/TestResultSetMethods.java fails too since on the client
ResultSet.checkForClosedResultSet() uses SQL state XJ012
(ALREADY_CLOSED) whereas EmbedResultSet.checkIfClosed() uses XCL16
(LANG_RESULT_SET_NOT_OPEN).

By the way, would it be a good idea that patches of this size were
uploaded on JIRA for review before they were committed?

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-842?page=all ]
     
David Van Couvering resolved DERBY-842:
---------------------------------------

    Resolution: Fixed

Resolved with this last commit, revision 391667.

Will close once I verify that regression tests pass

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-842?page=comments#action_12363851 ] 

David Van Couvering commented on DERBY-842:
-------------------------------------------

XN200 - XN250

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task
>   Components: Network Client
>     Reporter: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-842?page=all ]
     
David Van Couvering resolved DERBY-842:
---------------------------------------

    Resolution: Fixed

Committed revision 393967

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-842?page=comments#action_12374986 ] 

David Van Couvering commented on DERBY-842:
-------------------------------------------

I committed a fix that should resolve the jdbc40 failures (at least it does on my machine).  Let me know if you're still seeing issues.

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "Knut Anders Hatlen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-842?page=comments#action_12377971 ] 

Knut Anders Hatlen commented on DERBY-842:
------------------------------------------

If you insist... :) Thanks! The SQL state should be 0A000 so that SQLFeatureNotSupportedException is raised in JDBC 4.

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-842?page=comments#action_12374799 ] 

David Van Couvering commented on DERBY-842:
-------------------------------------------

Knut comments:
<quote>
 jdbc4/TestResultSetMethods.java fails too since on the client
ResultSet.checkForClosedResultSet() uses SQL state XJ012
(ALREADY_CLOSED) whereas EmbedResultSet.checkIfClosed() uses XCL16
(LANG_RESULT_SET_NOT_OPEN).
</quote>  

and Kathey mentions on email that we should strive for the SQL States to be the same on embedded and network client drivers, to which I wholeheartedly agree.

The problem is, fixing this is turning out to be a bit tricky, because the message for XCL16 is

XCL16.S=ResultSet not open. Operation ''{0}'' not permitted. Verify that autocommit is OFF.


The reason this is a problem is becuase ResultSet.checkForClosedResultSet()  is a generic method called by many (about 30) methods of ResultSet, and the particular operation being attempted is not specified.

So, I could fix this by 

(a) changing the message for XCL16 to not specify the operation
(b) use the string "<unspecified>" in the client code (I'd internationalize the string so it can be translated)

Any opinions?  Otherwise I'll go with option (b)


> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task

>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (DERBY-842) Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am

Posted by "David Van Couvering (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-842?page=all ]

David Van Couvering reassigned DERBY-842:
-----------------------------------------

    Assign To: David Van Couvering

> Internationalize messages in PreparedStatement to Section in org.apache.derby.client.am
> ---------------------------------------------------------------------------------------
>
>          Key: DERBY-842
>          URL: http://issues.apache.org/jira/browse/DERBY-842
>      Project: Derby
>         Type: Sub-task
>   Components: Network Client
>     Reporter: David Van Couvering
>     Assignee: David Van Couvering

>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira