db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5289) Unable to boot 10.5.1.1 database
Date Tue, 21 Jun 2011 22:37:47 GMT

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

Mamta A. Satoor commented on DERBY-5289:
----------------------------------------

I tried dblook on the attached db and got following
$ java org.apache.derby.tools.dblook -d 'jdbc:derby:InternalDB'
-- Timestamp: 2011-06-21 13:26:02.351
-- Source database is: InternalDB
-- Connection URL is: jdbc:derby:InternalDB
-- appendLogs: false

-- ----------------------------------------------
-- DDL Statements for schemas
-- ----------------------------------------------

CREATE SCHEMA "SYNC";

-- ----------------------------------------------
-- DDL Statements for functions
-- ----------------------------------------------

CREATE FUNCTION "SYNC"."XML_ENCODE" ("ELEM_NAME" VARCHAR(100),"STR" VARCHAR(32672)) RETURNS
VARCHAR(32672) LANGUAGE JAVA PARAMETER STYLE JAVA NO SQL CALLED ON NULL INPUT EXTERNAL NAME
'com.ADInstruments.LTS.InternalDB.dbSync.record.UtilityProcedures.xmlEncode' ;

CREATE FUNCTION "SYNC"."XML_ENCODE_CHAR" ("ELEM_NAME" VARCHAR(100),"VAL" CHAR(1)) RETURNS
VARCHAR(32672) LANGUAGE JAVA PARAMETER STYLE JAVA NO SQL CALLED ON NULL INPUT EXTERNAL NAME
'com.ADInstruments.LTS.InternalDB.dbSync.record.UtilityProcedures.xmlEncode' ;

CREATE FUNCTION "SYNC"."XML_ENCODE_INT" ("ELEM_NAME" VARCHAR(100),"VAL" INTEGER) RETURNS VARCHAR(32672)
LANGUAGE JAVA PARAMETER STYLE JAVA NO SQL CALLED ON NULL INPUT EXTERNAL NAME 'com.ADInstruments.LTS.InternalDB.dbSync.record.UtilityProcedures.xmlEncode'
;

CREATE FUNCTION "SYNC"."XML_ENCODE_BIGINT" ("ELEM_NAME" VARCHAR(100),"VAL" BIGINT) RETURNS
VARCHAR(32672) LANGUAGE JAVA PARAMETER STYLE JAVA NO SQL CALLED ON NULL INPUT EXTERNAL NAME
'com.ADInstruments.LTS.InternalDB.dbSync.record.UtilityProcedures.xmlEncode' ;

CREATE FUNCTION "SYNC"."XML_ENCODE_DOUBLE" ("ELEM_NAME" VARCHAR(100),"VAL" DOUBLE) RETURNS
VARCHAR(32672) LANGUAGE JAVA PARAMETER STYLE JAVA NO SQL CALLED ON NULL INPUT EXTERNAL NAME
'com.ADInstruments.LTS.InternalDB.dbSync.record.UtilityProcedures.xmlEncode' ;

CREATE FUNCTION "SYNC"."XML_ENCODE_TIMESTAMP" ("ELEM_NAME" VARCHAR(100),"VAL" TIMESTAMP) RETURNS
VARCHAR(32672) LANGUAGE JAVA PARAMETER STYLE JAVA NO SQL CALLED ON NULL INPUT EXTERNAL NAME
'com.ADInstruments.LTS.InternalDB.dbSync.record.UtilityProcedures.xmlEncode' ;

CREATE FUNCTION "SYNC"."RANDOM_UUID" () RETURNS VARCHAR(100) LANGUAGE JAVA PARAMETER STYLE
JAVA NO SQL RETURNS NULL ON NULL INPUT EXTERNAL NAME 'com.ADInstruments.LTS.InternalDB.dbSync.record.UtilityProcedures.randomUUID'
;

-- ----------------------------------------------
-- DDL Statements for tables
-- ----------------------------------------------

CREATE TABLE "APP"."ADMIN_LIST" ("ADMIN_ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY
(START WITH 1, INCREMENT BY 1), "USER_CODE" VARCHAR(255) NOT NULL);

CREATE TABLE "APP"."EXP_RUNS" ("RUN_ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY
(START WITH 1, INCREMENT BY 1), "MARKER_USERCODE" VARCHAR(255));

-- ----------------------------------------------
-- DDL Statements for keys
-- ----------------------------------------------

-- primary/unique
ALTER TABLE "APP"."EXP_RUNS" ADD CONSTRAINT "RUN_PK" PRIMARY KEY ("RUN_ID");

ALTER TABLE "APP"."ADMIN_LIST" ADD CONSTRAINT "ADMIN_LIST_USER_CODE_UC" UNIQUE ("USER_CODE");

ALTER TABLE "APP"."ADMIN_LIST" ADD CONSTRAINT "ADMIN_PK" PRIMARY KEY ("ADMIN_ID");

-- ----------------------------------------------
-- DDL Statements for triggers
-- ----------------------------------------------

CREATE TRIGGER "APP"."ADMIN_LIST_UPDATE_MARKERS" AFTER UPDATE ON "APP"."ADMIN_LIST" REFERENCING
OLD AS OLD NEW AS NEW FOR EACH ROW UPDATE EXP_RUNS SET MARKER_USERCODE = LOWER(NEW.USER_CODE)
WHERE MARKER_USERCODE = LOWER(OLD.USER_CODE);


> Unable to boot 10.5.1.1 database
> --------------------------------
>
>                 Key: DERBY-5289
>                 URL: https://issues.apache.org/jira/browse/DERBY-5289
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1, 10.8.1.2
>         Environment: >sysinfo
> ------------------ Java Information ------------------
> Java Version:    1.6.0_26
> Java Vendor:     Sun Microsystems Inc.
> Java home:       C:\Program Files (x86)\Java\jre6
> Java classpath:  .;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip;C:\Users\BMASON\Sandbox\libs\db-derby-10.8.1.2-bin\bin\../lib/derby.jar;C:\Users\BMASON\Sandbox\libs\db-derby-10.8.1.2-bin\bin\../lib/derbynet.jar;C:\Users\BMASON\Sandbox\libs\db-derby-10.8.1.2-bin\bin\../lib/derbyclient.jar;C:\Users\BMASON\Sandbox\libs\db-derby-10.8.1.2-bin\bin\../lib/derbytools.jar
> OS name:         Windows 7
> OS architecture: x86
> OS version:      6.1
> Java user name:  bmason
> Java user home:  C:\Users\BMASON
> Java user dir:   C:\Users\BMASON\Sandbox\libs\db-derby-10.8.1.2-bin\bin
> java.specification.name: Java Platform API Specification
> java.specification.version: 1.6
> java.runtime.version: 1.6.0_26-b03
> --------- Derby Information --------
> JRE - JDBC: Java SE 6 - JDBC 4.0
> [C:\Users\BMASON\Sandbox\libs\db-derby-10.8.1.2-bin\lib\derby.jar] 10.8.1.2 - (1095077)
> [C:\Users\BMASON\Sandbox\libs\db-derby-10.8.1.2-bin\lib\derbytools.jar] 10.8.1.2 - (1095077)
> [C:\Users\BMASON\Sandbox\libs\db-derby-10.8.1.2-bin\lib\derbynet.jar] 10.8.1.2 - (1095077)
> [C:\Users\BMASON\Sandbox\libs\db-derby-10.8.1.2-bin\lib\derbyclient.jar] 10.8.1.2 - (1095077)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> Current Locale :  [English/New Zealand [en_NZ]]
> Found support for locale: [cs]
>          version: 10.8.1.2 - (1095077)
> Found support for locale: [de_DE]
>          version: 10.8.1.2 - (1095077)
> Found support for locale: [es]
>          version: 10.8.1.2 - (1095077)
> Found support for locale: [fr]
>          version: 10.8.1.2 - (1095077)
> Found support for locale: [hu]
>          version: 10.8.1.2 - (1095077)
> Found support for locale: [it]
>          version: 10.8.1.2 - (1095077)
> Found support for locale: [ja_JP]
>          version: 10.8.1.2 - (1095077)
> Found support for locale: [ko_KR]
>          version: 10.8.1.2 - (1095077)
> Found support for locale: [pl]
>          version: 10.8.1.2 - (1095077)
> Found support for locale: [pt_BR]
>          version: 10.8.1.2 - (1095077)
> Found support for locale: [ru]
>          version: 10.8.1.2 - (1095077)
> Found support for locale: [zh_CN]
>          version: 10.8.1.2 - (1095077)
> Found support for locale: [zh_TW]
>          version: 10.8.1.2 - (1095077)
> ------------------------------------------------------
>            Reporter: Brett Mason
>         Attachments: InternalDB - broken for 10.8.zip
>
>
> I have been unable to get Derby 10.7.1.1 and 10.8.1.2 to boot the attached 10.5.1.1 database.
Derby 10.6.1.0 is however able to use the DB.
> I'm not sure if this is a backwards compatibility bug or the result of corruption to
the database. Running SYSCS_CHECK_TABLE and SYSCS_COMPRESS_TABLE under 10.6.1.0 found no problems
with the database.
> NOTE: I have had to remove all data and non-essential tables/columns/triggers/etc prior
to attaching this database.
> Output when connecting to the DB using ij:
> ERROR XJ040: Failed to start database 'C:\Users\BMASON\Sandbox\InternalDB' with class
loader sun.misc.Launcher$AppClassLoader@11b86e7, see the next exception for details.
> ERROR XSDA7: Restore of a serializable or SQLData object of class , attempted to read
more data than was originally stored
> Full exception from our application:
> java.sql.SQLException: Failed to start database 'C:\Users\BMASON\Sandbox\InternalDB'
with class loader sun.misc.Launcher$AppClassLoader@93dee9, see the next exception for details.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)
> 	at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
> 	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
> 	at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source)
> 	at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source)
> 	at com.ADInstruments.LTS.util.DerbyUtils.exists(DerbyUtils.java:86)
> 	at com.ADInstruments.LTS.InternalDB.InternalDbUtilities.cacheInternalDbVersion(InternalDbUtilities.java:117)
> 	at com.ADInstruments.LTCS.InternalDB.InternalDbStartup.initialiseDatabase(InternalDbStartup.java:23)
> 	at com.ADInstruments.LTCS.StartupTasks$StartupRunnable.initDatabases(StartupTasks.java:35)
> 	at com.ADInstruments.LTCS.StartupTasks$StartupRunnable.run(StartupTasks.java:52)
> 	at java.lang.Thread.run(Thread.java:662)
> Caused by: java.sql.SQLException: Failed to start database 'C:\Users\BMASON\Sandbox\InternalDB'
with class loader sun.misc.Launcher$AppClassLoader@93dee9, see the next exception for details.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
> 	... 17 more
> Caused by: java.sql.SQLException: Restore of a serializable or SQLData object of class
, attempted to read more data than was originally stored
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> 	... 14 more
> Caused by: ERROR XSDA7: Restore of a serializable or SQLData object of class , attempted
to read more data than was originally stored
> 	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.readRecordFromArray(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.StoredPage.restoreRecordFromSlot(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.BasePage.fetchFromSlot(Unknown Source)
> 	at org.apache.derby.impl.store.access.conglomerate.GenericScanController.fetchRows(Unknown
Source)
> 	at org.apache.derby.impl.store.access.heap.HeapScan.fetchNext(Unknown Source)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getDescriptorViaHeap(Unknown
Source)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getAllSPSDescriptors(Unknown
Source)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.dropJDBCMetadataSPSes(Unknown
Source)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.updateMetadataSPSes(Unknown
Source)
> 	at org.apache.derby.impl.sql.catalog.DD_Version.handleMinorRevisionChange(Unknown Source)
> 	at org.apache.derby.impl.sql.catalog.DD_Version.upgradeIfNeeded(Unknown Source)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.loadDictionaryTables(Unknown
Source)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
> 	at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown
Source)
> 	at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown
Source)
> 	at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
> 	... 14 more
> Caused by: java.io.EOFException
> 	at java.io.DataInputStream.readInt(DataInputStream.java:375)
> 	at org.apache.derby.iapi.sql.dictionary.TriggerDescriptor.readExternal(Unknown Source)
> 	at org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(Unknown Source)
> 	at org.apache.derby.iapi.services.io.ArrayUtil.readArrayItems(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.TriggerInfo.readExternal(Unknown Source)
> 	at org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.WriteCursorConstantAction.readExternal(Unknown
Source)
> 	at org.apache.derby.impl.sql.execute.UpdateConstantAction.readExternal(Unknown Source)
> 	at org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericStorablePreparedStatement.readExternal(Unknown Source)
> 	at org.apache.derby.iapi.services.io.FormatIdInputStream.readObject(Unknown Source)
> 	at org.apache.derby.iapi.types.UserType.readExternal(Unknown Source)
> 	... 39 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message