Issue Details (XML | Word | Printable)

Key: DERBY-2613
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mike Matrigali
Reporter: Mike Matrigali
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

upgrade test problem when attempting to test 10.0.2.1 -

Created: 05/May/07 01:50 AM   Updated: 29/Jun/09 10:42 PM
Return to search
Component/s: SQL
Affects Version/s: 10.3.1.4
Fix Version/s: 10.2.2.1, 10.3.1.4

Time Tracking:
Not Specified

Environment:
m2_ibm15:435>sysinfo
------------------ Java Information ------------------
Java Version: 1.5.0
Java Vendor: IBM Corporation
Java home: c:\p4\m2\ibm15\jre
Java classpath: .;.;c:/p4/m2/classes;c:/p4/m2/tools/java/jdbctests.zip;c:/p4/m2
/tools/java/jakarta-oro-2.0.8.jar;c:/p4/m2/tools/java/jgl3.1.0.jar;c:/p4/m2/tool
s/java/jndi/providerutil.jar;c:/p4/m2/tools/java/jndi/ldap.jar;c:/p4/m2/tools/ja
va/jndi/jndi.jar;c:/p4/m2/tools/java/jnl1.0F.zip;c:/p4/m2/tools/java/junit.jar;c
:/p4/m2/tools/java/servlet-2_2b.jar;c:/p4/m2/tools/java/xslt4j-2_5_0/xercesImpl.
jar;c:/p4/m2/tools/java/xslt4j-2_5_0/xml-apis.jar;c:/p4/m2/tools/java/xslt4j-2_5
_0/xalan.jar
OS name: Windows XP
OS architecture: x86
OS version: 5.1 build 2600 Service Pack 2
Java user name: mikem
Java user home: C:\Documents and Settings\Administrator
Java user dir: C:\mikem\_tools
java.specification.name: Java Platform API Specification
java.specification.version: 1.5
--------- Derby Information --------
JRE - JDBC: J2SE 5.0 - JDBC 3.0
[C:\p4\m2\classes] 10.3.0.0 alpha - (1)

Bug behavior facts: Regression Test Failure
Resolution Date: 25/May/07 06:16 PM


 Description  « Hide
I am not sure what is broken here. it looks like a test problem, but that is only a guess. When I got this problem I was trying to run
a full set of upgrade tests against the trunk and I had jars for all of the releases available from :
https://svn.apache.org/repos/asf/db/derby/jars
(ie. :
m1_ibm15:64>ls */lib
10.0.2.1/lib:
derby.jar derbyLocale_it.jar derbyLocale_zh_CN.jar
derbyLocale_de_DE.jar derbyLocale_ja_JP.jar derbyLocale_zh_TW.jar
derbyLocale_es.jar derbyLocale_ko_KR.jar derbynet.jar
derbyLocale_fr.jar derbyLocale_pt_BR.jar derbytools.jar

10.1.1.0/lib:
derby.jar derbyLocale_ja_JP.jar derbyTesting.jar
derbyLocale_de_DE.jar derbyLocale_ko_KR.jar derbyclient.jar
derbyLocale_es.jar derbyLocale_pt_BR.jar derbynet.jar
derbyLocale_fr.jar derbyLocale_zh_CN.jar derbytools.jar
derbyLocale_it.jar derbyLocale_zh_TW.jar

10.1.2.1/lib:
derby.jar derbyLocale_ja_JP.jar derbyTesting.jar
derbyLocale_de_DE.jar derbyLocale_ko_KR.jar derbyclient.jar
derbyLocale_es.jar derbyLocale_pt_BR.jar derbynet.jar
derbyLocale_fr.jar derbyLocale_zh_CN.jar derbytools.jar
derbyLocale_it.jar derbyLocale_zh_TW.jar

10.1.3.1/lib:
derby.jar derbyLocale_ja_JP.jar derbyTesting.jar
derbyLocale_de_DE.jar derbyLocale_ko_KR.jar derbyclient.jar
derbyLocale_es.jar derbyLocale_pt_BR.jar derbynet.jar
derbyLocale_fr.jar derbyLocale_zh_CN.jar derbytools.jar
derbyLocale_it.jar derbyLocale_zh_TW.jar

10.2.1.6/lib:
derby.jar derbyLocale_ja_JP.jar derbyclient.jar
derbyLocale_de_DE.jar derbyLocale_ko_KR.jar derbynet.jar
derbyLocale_es.jar derbyLocale_pt_BR.jar derbyrun.jar
derbyLocale_fr.jar derbyLocale_zh_CN.jar derbytools.jar
derbyLocale_it.jar derbyLocale_zh_TW.jar

10.2.2.0/lib:
derby.jar derbyLocale_ja_JP.jar derbyTesting.jar
derbyLocale_cs.jar derbyLocale_ko_KR.jar derbyclient.jar
derbyLocale_de_DE.jar derbyLocale_pl.jar derbynet.jar
derbyLocale_es.jar derbyLocale_pt_BR.jar derbyrun.jar
derbyLocale_fr.jar derbyLocale_ru.jar derbytools.jar
derbyLocale_hu.jar derbyLocale_zh_CN.jar
derbyLocale_it.jar derbyLocale_zh_TW.jar


The phase that it broke in was when it was trying to test was the following hierarchy as reported by junit.swingui.TestRunner:
Upgrade Suite
    Upgrade Tests from 10.0.2.1
         Upgrade Phase: UPGRADE

It looks like this phase does not even get started as it can't find the db. Note in the same run there is one soft upgrade error that happens in a
previous phase. I have reported that as a separate issue in DERBY-2612 .

Here is the error reported:
2) Upgrade Phase: UPGRADEjava.sql.SQLException: Failed to start database 'single
Use/oneuse0', see the next exception for details.
    at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExcepti
onFactory.java:45)
    at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
    at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:94)
    at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:173)
    at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(EmbedConnectio
n.java:2119)
    at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.j
ava:1783)
    at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:24
9)
    at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java:74)
    at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:209)
    at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource
.java:479)
    at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource
.java:423)
    at org.apache.derbyTesting.functionTests.tests.upgradeTests.PhaseChanger.set
Up(PhaseChanger.java:94)
    at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
    at junit.extensions.TestSetup.run(TestSetup.java:23)
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
    at junit.extensions.TestSetup.run(TestSetup.java:23)
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
    at junit.extensions.TestSetup.run(TestSetup.java:23)
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
    at junit.extensions.TestSetup.run(TestSetup.java:23)
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
    at junit.extensions.TestSetup.run(TestSetup.java:23)
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
    at junit.extensions.TestSetup.run(TestSetup.java:23)
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
    at junit.extensions.TestSetup.run(TestSetup.java:23)
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
    at junit.extensions.TestSetup.run(TestSetup.java:23)
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
    at junit.extensions.TestSetup.run(TestSetup.java:23)


     

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mike Matrigali added a comment - 05/May/07 01:54 AM
problem also reproduces if only 10.0.2.1/lib exists in the directory path of jars to test.

Mike Matrigali added a comment - 05/May/07 02:21 AM
when I reproduced with only 10.0 jars, derby.log had the following nested exception - it was not there when I ran the full
upgrade set of tests:

============= begin nested exception, level (1) ===========^M
java.sql.SQLException: The conglomerate (-1) requested does not exist.^M
    at org.apache.derby.iapi.error.StandardException.newException(StandardExcept
ion.java:305)^M
    at org.apache.derby.impl.store.access.RAMTransaction.findExistingConglomerat
e(RAMTransaction.java:402)^M
    at org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(RAMTra
nsaction.java:1327)^M
    at org.apache.derby.impl.sql.catalog.TabInfoImpl.insertRowListImpl(TabInfoIm
pl.java:481)^M
    at org.apache.derby.impl.sql.catalog.TabInfoImpl.insertRow(TabInfoImpl.java:
428)^M
    at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(DataDi
ctionaryImpl.java:1645)^M
    at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(DataDi
ctionaryImpl.java:1629)^M
    at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.createRoutinePermPub
licDescriptor(DataDictionaryImpl.java:9906)^M
    at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.createRoutinePermPub
licDescriptor(DataDictionaryImpl.java:9882)^M
    at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.create_10_1_system_p
rocedures(DataDictionaryImpl.java:9970)^M
    at org.apache.derby.impl.sql.catalog.DD_Version.doFullUpgrade(DD_Version.jav
a:369)^M
    at org.apache.derby.impl.sql.catalog.DD_Version.upgradeIfNeeded(DD_Version.j
ava:210)^M
    at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.loadDictionaryTables
(DataDictionaryImpl.java:6279)^M
    at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.boot(DataDictionaryI
mpl.java:748)^M
    at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:
1994)^M
    at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.j
ava:291)^M
    at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonito
r.java:546)^M
    at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.
java:419)^M
    at org.apache.derby.impl.db.BasicDatabase.boot(BasicDatabase.java:214)^M
    at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:
1994)^M
    at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.j
ava:291)^M
    at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonito
r.java:1829)^M
    at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(B
aseMonitor.java:1695)^M
    at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartSe
rvice(BaseMonitor.java:1575)^M
    at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService
(BaseMonitor.java:994)^M
    at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Mon
itor.java:542)^M
    at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.j
ava:1796)^M
    at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:32
6)^M
    at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java:80)^M
    at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:209)^M
    at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource
.java:479)^M
    at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(EmbeddedDataSource
.java:423)^M
    at org.apache.derbyTesting.functionTests.tests.upgradeTests.PhaseChanger.set
Up(PhaseChanger.java:94)^M
    at junit.extensions.TestSetup$1.protect(TestSetup.java:18)^M
    at junit.framework.TestResult.runProtected(TestResult.java:124)^M
    at junit.extensions.TestSetup.run(TestSetup.java:23)^M
    at junit.framework.TestSuite.runTest(TestSuite.java:208)^M
    at junit.framework.TestSuite.run(TestSuite.java:203)^M
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)^M
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)^M
    at junit.framework.TestResult.runProtected(TestResult.java:124)^M
    at junit.extensions.TestSetup.run(TestSetup.java:23)^M
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)^M
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)^M
    at junit.framework.TestResult.runProtected(TestResult.java:124)^M
    at junit.extensions.TestSetup.run(TestSetup.java:23)^M
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)^M
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)^M
    at junit.framework.TestResult.runProtected(TestResult.java:124)^M
    at junit.extensions.TestSetup.run(TestSetup.java:23)^M
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)^M
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)^M
    at junit.framework.TestResult.runProtected(TestResult.java:124)^M
    at junit.extensions.TestSetup.run(TestSetup.java:23)^M
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)^M
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)^M
    at junit.framework.TestResult.runProtected(TestResult.java:124)^M
    at junit.extensions.TestSetup.run(TestSetup.java:23)^M
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)^M
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)^M
    at junit.framework.TestResult.runProtected(TestResult.java:124)^M
    at junit.extensions.TestSetup.run(TestSetup.java:23)^M
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)^M
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)^M
    at junit.framework.TestResult.runProtected(TestResult.java:124)^M
    at junit.extensions.TestSetup.run(TestSetup.java:23)^M
    at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)^M
    at junit.extensions.TestSetup$1.protect(TestSetup.java:19)^M
    at junit.framework.TestResult.runProtected(TestResult.java:124)^M
    at junit.extensions.TestSetup.run(TestSetup.java:23)^M
    at junit.framework.TestSuite.runTest(TestSuite.java:208)^M
    at junit.framework.TestSuite.run(TestSuite.java:203)^M
    at junit.swingui.TestRunner$16.run(TestRunner.java:623)^M
============= end nested exception, level (1) ===========^M
Cleanup action completed^M
----------------------------------------------------------------^M


Mike Matrigali added a comment - 05/May/07 03:10 AM
I only took a quick look at this, but it looks like the code to upgrade a 10.0 database first does a:
create_10_1_system_procedures()
which after adding the system procedures does a call to:
createRoutinePermPublicDescriptor(routine_uuid, tc);
which try's to update a catalog I believe was added in 10.2, but that catalog is added later in the upgrade process.

What is puzzling me is why this call is made in the create_10_1_system_procedures() and not in the
create_10_2_system_procedures?

Mike Matrigali added a comment - 05/May/07 07:02 AM
checkin 535466 fixes this issue of upgrade 10.0 database to 10.3.

DERBY-2613

Upgrade of 10.0 to 10.3 was failing because system procedures were being
created, and as part of the creation some updates were attempted to catalogs
that were not created yet. Fixed in full upgrade by first creating the
new system catalogs and then creating the procedures.