db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepa Remesh <drem...@gmail.com>
Subject Re: [jira] Updated: (DERBY-289) Enable code sharing between Derby client and engine
Date Wed, 16 Nov 2005 04:39:17 GMT
On 11/15/05, David Van Couvering <David.Vancouvering@sun.com> 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 =  

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
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();
                               throw new SqlException2(agent_.logWriter_,
SQLState.LANG_MISSING_PARMS2, new Integer (i));
                               throw new SqlException2(agent_.logWriter_,

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.


View raw message