I have attached a patch to Derby-416 Parameter in one of the error messages is not replaced by the desired value
If the patch looks good, can a commiter please commit this?
thanks,
Mamta
On 6/29/05, Mamta A. Satoor (JIRA) <derby-dev@db.apache.org> wrote:
[ http://issues.apache.org/jira/browse/DERBY-416?page=comments#action_12314738 ]
Mamta A. Satoor commented on DERBY-416:
---------------------------------------
The problem was with using ' in the error text message ie the text for XJ084 in messages_en.properties currently looks like following
Column does not correspond to a column in the base table. Can't issue {0} on this column
Had to remove the ' in Can't in order to for the error message to print correctly. I changed the text for XJ084 to following
Column does not correspond to a column in the base table. Cannot issue ''{0}'' on this column.
This change required master updates for updatableResultSet.java test. I have attached a patch to this JIRA entry to take care of it.
$ svn stat
M java\engine\org\apache\derby\loc\messages_en.properties
M java\testing\org\apache\derbyTesting\functionTests\master\updatableResultSet.out
M java\testing\org\apache\derbyTesting\functionTests\master\jdk14\updatableResultSet.out
> Parameter in one of the error messages is not replaced by the desired value.
> ----------------------------------------------------------------------------
>
> Key: DERBY-416
> URL: http://issues.apache.org/jira/browse/DERBY-416
> Project: Derby
> Type: Bug
> Components: JDBC
> Versions: 10.1.1.0
> Reporter: Rajesh Kartha
> Assignee: Mamta A. Satoor
>
> In one of the error messages the parameter does not get replaced with the actual value to make the message meaningful.
> Here is a sample message:
> ===> XJ084=Column does not correspond to a column in the base table. Cant issue {0} on this column.
> More info:
> Table:
> ij version 10.1
> ij> connect 'jdbc:derby:tvtm';
> ij> select * from t1;
> C1 |C2
> --------------------------------
> 1 |aa
> 2 |bb
> 3 |cc
> 3 rows selected
> To get the above message use the following Java snippet:
> private static void runTestXJ084(Connection conn){
> try{
> Statement stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
> ResultSet rs = stmt.executeQuery("SELECT 1, 2 FROM t1 FOR UPDATE");
> rs.next();
> rs.updateInt(1,22);
> }catch (SQLException sqe){
> System.out.println(" ===> "+ sqe.getSQLState()+"="+ sqe.getMessage());
> }
> }
> The message obtained is:
> ===> XJ084=Column does not correspond to a column in the base table. Cant issue {0} on this column.
> The {0} above should have been replaced by the appropriate operation perfomed - update in the above case.
--
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