Great, thanks for your very great analysis, Deepa!  I'll fix these bugs.

David

Deepa Remesh wrote:
On 11/15/05, David Van Couvering <[EMAIL PROTECTED]> wrote:


In the meantime, let's focus on the issue you encountered.  It's funny,
the error isn't that the message id was not found.  Instead, we weren't
able to find org.apache.derby.loc.client-messages.properties.


I think this is because the bundle name in ClientMessageUtil has
".properties" at the end. ResourceBundle.getBundle expects a class
name or resource file name without the ".properties".

private static final String CLIENT_BUNDLE_NAME = "org.apache.derby.loc.client-messages.properties";

I changed this to "org.apache.derby.loc.client-messages" and it did
not complain about missing resource file. However it did not find the
message in any of the resource files and it gave me the following
message:
07000.new : [0] 1

So the code was actually looking for new message (07000.new). I was
thinking the code was looking for the old message(07000) and should
have found it in common-messages_en.properties file. The following
code which checks if feature is available is not returning the
expected value when jar versions are mixed:

            if (!parameterSet_[i] && !parameterRegistered_[i]) {
                       CommonInfo cInfo = new CommonInfo();
                       if(cInfo.hasFeature(CommonFeatures.SQLSTATE_07000_NEW))
                               throw new SqlException2(agent_.logWriter_,
SQLState.LANG_MISSING_PARMS2, new Integer (i));
                       else
                               throw new SqlException2(agent_.logWriter_,
SQLState.LANG_MISSING_PARMS);
               }


In the mixed jar environment (where I have old derby.jar and new
derbyclient.jar), "hasFeature(CommonFeatures.SQLSTATE_07000_NEW)"
returns true.
I looked in derby.jar and it does not have CommonInfo class. So this
class gets picked from (new) derbyclient.jar, which has this feature
implemented and hence this method returns true.

Thanks,
Deepa
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

Reply via email to