Army skrev:
If I run ij with the latest trunk and try to use the "describe"
command on a database that was created in the 10.3 trunk prior to svn
#496645, I get an error (NoSuchMethodError). Revision 496645 was part
of DERBY-2226.
My questions are:
1) Does anyone else see this peculiar behavior?
Hello Army,
I just saw this today, but in a totally different scenario. I was
running a J2EE application, and saw the same error message as you. After
a little investigation, I also landed on DERBY-2226 as the culprit.
In my case, the failing statement was a trigger. My guess is that the
trigger was compiled against the old code (happened to be 10.2, but
could be anything before r496645 I think), and when it is "retrieved"
and executed the constructor it is calling no longer exist (signature
has changed).
2) Does this matter? If I create the database with 10.2 and then
connect from the latest 10.3 the describe command works as expected.
So maybe this is just a side-effect from working on the development
branch and there's nothing more to worry about...?
This I don't know. I can't see this being added as part of the patch. Is
there a general mechanism for updating triggers when upgrading Derby?
And, does the "describe" command also use a trigger/SPS/something such
that my error scenario can be said to be the same as Army's problem?
--
Kristian
Just curious,
Army
----
Steps to reproduce:
> svn update -r 496644
> ant all
> java -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij
ij version 10.3
ij> connect 'hmm;create=true';
ij> create table tc (c char);
0 rows inserted/updated/deleted
ij> describe tc;
COLUMN_NAME
|TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
------------------------------------------------------------------------------
C |CHAR |NULL|NULL|1 |NULL |2 |YES
1 row selected
ij> exit;
> svn update -r 496645
> ant clobber
> ant all
> java -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij
ij> connect 'hmm';
ij> describe tc;
ERROR XJ001: Java exception:
'org.apache.derby.iapi.sql.execute.ResultSetFactory: method
getIndexRowToBaseRowResultSet(JILorg/apache/derby/iapi/sql/execute/NoPutResultSet;Lorg/apache/derby/iapi/services/loader/GeneratedMethod;ILjava/lang/String;IIILorg/apache/derby/iapi/services/loade:
java.lang.NoSuchMethodError'.