db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3902) some messages are referenced but never used - MessageBundleTest output
Date Fri, 10 Oct 2008 03:16:46 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638465#action_12638465
] 

Myrna van Lunteren commented on DERBY-3902:
-------------------------------------------

Some further research:
J106, J107, J108 and J109 were added with revision 395484. 
They were thrown in only one class (J106, J107 in client.am.SqlExcpetion; J108 & J109
in client.am.Version), and maybe that's why they weren't moved into MessageId.java?
Since then, the throwing of J106 has been removed, as I mentioned in an earlier comment, but
the reference in SqlException still exist. That reference and the entries in messages.xml
should get removed.

What to do about J107, J108 and J109? Is there any reason why it's better to have these defined
in individual classes rather than grouped in MessageId?

---

08000.S.1 ("Cannot close a connection with an active transaction.  The transaction remains
open and the connection was not closed") was added to messages_en.properties with revision
388309.
I think this might originally have been intended to replace this in client.am.Connection:
@@ -713,8 +711,7 @@
        // The following precondition matches CLI semantics, see SQLDisconnect()
        if (!autoCommit_ && inUnitOfWork_ && !allowCloseInUOW_()) {
            throw new SqlException(agent_.logWriter_,
-                    "java.sql.Connection.close() requested while a transaction is in progress
on the connection." +
-                    "The transaction remains active, and the connection cannot be closed.");
+                    new MessageId (SQLState.CANNOT_CLOSE_ACTIVE_XA_CONNECTION));
        }
    }
But as per the svn diff, instead of a an entry in SQLState for 08000 it was mapped to CANNOT_CLOSE_ACTIVE_XA_CONNECTION
(XJ059), later (revision 390176) and after discussion re DERBY-1149, this was changed to 
CANNOT_CLOSE_ACTIVE_CONNECTION, which was added as SQLState 25001.S.1: Invalid transaction
state: active SQL transaction

So, what's best here - add a code for 08000 and see if that section still exists &  map
it? Or is it ok as is an we can just remove 08000 from the messages.xml?

---

XCL17 is a left over of expired Cloudscape-source and should be removed.

---

XJ102 - "Can not perform an insert at the current position" in messages_en.properties since
revision 393967.
Probably it was meant to replace the following in insertRowXXX in client.am.ResultSet:
         // if not on a valid row, then do not accept updateXXX calls
         if (!isValidCursorPosition_) {
-            throw new SqlException(agent_.logWriter_, "Invalid operation to " +
-                    "insert at current cursor position");
+            throw new SqlException(agent_.logWriter_, 
+                new MessageId(SQLState.CURSOR_INVALID_OPERATION_AT_CURRENT_POSITION));
         }
(Note: the comment is probably the result of cut-and-paste-without-edit, should be insertXXX
calls)
But as per the svn diff it was set to XJ121: "Invalid operation at current cursor position".

Again, what is best, leave it as is & remove XJ102 references from messages_en.properties
or add an appropriate reference to SQLState?

I'll remove the orphaned references to XCL17 and J106 now, but I'll wait a bit to see if anyone
chimes in on the other issues.




> some messages are referenced but never used - MessageBundleTest output
> ----------------------------------------------------------------------
>
>                 Key: DERBY-3902
>                 URL: https://issues.apache.org/jira/browse/DERBY-3902
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.5.0.0
>            Reporter: Myrna van Lunteren
>
> MessageBundleTest was taken out of derbyall because it only ran with classes, not with
jars, and it was decided that it would be better to make this into a build check rather than
a test...
> However, the build check - DERBY-1458 - was never implemented, and so, the test has not
been run.
> When I ran, I got the following output:
> testSQLStateOrphanedIds ERROR: Message id 22003.S.4 in SQLState.java was not found in
messages_en.properties
> ERROR: Message id XCL32.S in SQLState.java was not found in messages_en.properties
> ERROR: Message id X0RQ3.C in SQLState.java was not found in messages_en.properties
> ERROR: Message id XSAX1 in SQLState.java was not found in messages_en.properties
> used 188 ms .
> testMessageIdOrphanedIds used 0 ms .
> testMessageBundleOrphanedMessages WARNING: Message id 22004.S.4 in messages_en.properties
is not referenced in either SQLState.java or MessageId.java
> WARNING: Message id J106 in messages_en.properties is not referenced in either SQLState.java
or MessageId.java
> WARNING: Message id J107 in messages_en.properties is not referenced in either SQLState.java
or MessageId.java
> WARNING: Message id J108 in messages_en.properties is not referenced in either SQLState.java
or MessageId.java
> WARNING: Message id J109 in messages_en.properties is not referenced in either SQLState.java
or MessageId.java
> WARNING: Message id 08000.S.1 in messages_en.properties is not referenced in either SQLState.java
or MessageId.java
> WARNING: Message id XCL17.S in messages_en.properties is not referenced in either SQLState.java
or MessageId.java
> WARNING: Message id XJ102.S in messages_en.properties is not referenced in either SQLState.java
or MessageId.java
> used 0 ms 
> Some of these are known issues, e.g. XCL32 - it's been in MessageBundleTest.out for a
long time...
> XSAX1 looks like a assumption mismatch in MessageBundleTest, see DERBY-1413....
> But others need some minor code changes/cleanup, for instance, looks like the need for
J106 was removed during DERBY-2692, see http://svn.apache.org/viewvc?view=rev&revision=543428,
and should probably get removed from messages_en.properties/messages.xml.
> Needs further checking.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message