You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by David Sitsky <da...@gmail.com> on 2015/09/24 13:02:16 UTC

Unknown page format at page Page(7,Container(0, 161)) [SYSCOLUMNS_INDEX1] on bootup

Hi all,

I have a database from another user which unfortunately can't boot up with
this error:

ERROR XJ040: Failed to start database 'E:\XXXXXXXX\Database' with class
loader sun.misc.Launcher$AppClassLoader@1540e19d, see the next exception
for details.
ERROR XSDBB: Unknown page format at page Page(7,Container(0, 161)), page
dump follows:

I understand 161 refers to the conglomerate SYSCOLUMNS_INDEX1 and the file
ca1.dat.

Is there any magic I can do to somehow drop this "index" and regenerate it?

Thanks in advance for any pointers.  I checked
https://wiki.apache.org/db-derby/DatabaseCorruption but given this is a
system index and I can't boot the database I don't have any ideas.

Cheers,
David

Re: Unknown page format at page Page(7,Container(0, 161)) [SYSCOLUMNS_INDEX1] on bootup

Posted by Bryan Pendleton <bp...@gmail.com>.
> I understand 161 refers to the conglomerate SYSCOLUMNS_INDEX1 and the file ca1.dat.
>
> Is there any magic I can do to somehow drop this "index" and regenerate it?

Do you have any slightly older backups of this particular database that you
can copy ca1.dat from?

Alternatively, did you try (desperation, but ...) creating a new database with
identical DDL statements, and then copy its SYSCOLUMNS_INDEX1 conglomerate
to this database's ca1.dat?

index conglomerates are pretty closely tied to their base conglomerate,
so yet a third desperate measure would be to copy both the index and the
base conglomerate from a different (but similar) db to this db.

Good luck!

bryan


Re: Unknown page format at page Page(7,Container(0, 161)) [SYSCOLUMNS_INDEX1] on bootup

Posted by David Sitsky <da...@gmail.com>.
Hi Bryan and Rick,

Thanks for your suggestions.  It turns out the customer did have another
database available with the same schema.  Copying ca1.dat helped a little,
but I was still getting NPEs executing various statements.  I tried copying
more and more SYS tables/indexes and in the end basically copied all of
them across and that seemed to get the database into a working state.

For the record, these were the files I copied across.  Thanks again for
your advice.

c31.dat c41.dat c51.dat c71.dat c81.dat ca1.dat cb1.dat cd1.dat
ce1.dat c20.dat c60.dat c90.dat cc0.dat c101.dat c111.dat c121.dat
cf0.dat c141.dat c130.dat c161.dat c171.dat c150.dat c191.dat c1a1.dat
c1b1.dat c180.dat c1d1.dat c1c0.dat c1f1.dat c1e0.dat c211.dat
c221.dat c200.dat c241.dat c251.dat c230.dat c271.dat c281.dat
c260.dat c2a1.dat c2b1.dat c2c1.dat c290.dat c2e1.dat c2d0.dat
c2f0.dat c311.dat c321.dat c331.dat c300.dat c351.dat c361.dat
c371.dat c340.dat c391.dat c3a1.dat c3b1.dat c380.dat c3d1.dat
c3e1.dat c3f1.dat c3c0.dat c411.dat c421.dat c400.dat c441.dat
c451.dat c461.dat c430.dat

Cheers,
David

On Fri, Sep 25, 2015 at 12:45 PM, Rick Hillegas <ri...@gmail.com>
wrote:

> Hi David,
>
> If all else fails, you can create an empty database with the same schema
> as the old one, and then siphon data out of the corrupt database into the
> new database using the custom tool attached to
> https://issues.apache.org/jira/browse/DERBY-6136. Something like this...
>
> call syscs_util.syscs_register_tool( 'customTool', true, 'RawDBReader',
> ...);
>
> ...and then a sequence of statements like this...
>
> insert into myschema.my_table select * from old_myschema.my_table;
>
> Hope this helps,
> -Rick
>
>
> On 9/24/15 4:02 AM, David Sitsky wrote:
>
>> Hi all,
>>
>> I have a database from another user which unfortunately can't boot up
>> with this error:
>>
>> ERROR XJ040: Failed to start database 'E:\XXXXXXXX\Database' with class
>> loader sun.misc.Launcher$AppClassLoader@1540e19d, see the next exception
>> for details.
>> ERROR XSDBB: Unknown page format at page Page(7,Container(0, 161)), page
>> dump follows:
>>
>> I understand 161 refers to the conglomerate SYSCOLUMNS_INDEX1 and the
>> file ca1.dat.
>>
>> Is there any magic I can do to somehow drop this "index" and regenerate
>> it?
>>
>> Thanks in advance for any pointers.  I checked
>> https://wiki.apache.org/db-derby/DatabaseCorruption but given this is a
>> system index and I can't boot the database I don't have any ideas.
>>
>> Cheers,
>> David
>>
>
>

Re: Unknown page format at page Page(7,Container(0, 161)) [SYSCOLUMNS_INDEX1] on bootup

Posted by Rick Hillegas <ri...@gmail.com>.
Hi David,

If all else fails, you can create an empty database with the same schema 
as the old one, and then siphon data out of the corrupt database into 
the new database using the custom tool attached to 
https://issues.apache.org/jira/browse/DERBY-6136. Something like this...

call syscs_util.syscs_register_tool( 'customTool', true, 'RawDBReader', 
...);

...and then a sequence of statements like this...

insert into myschema.my_table select * from old_myschema.my_table;

Hope this helps,
-Rick

On 9/24/15 4:02 AM, David Sitsky wrote:
> Hi all,
>
> I have a database from another user which unfortunately can't boot up 
> with this error:
>
> ERROR XJ040: Failed to start database 'E:\XXXXXXXX\Database' with 
> class loader sun.misc.Launcher$AppClassLoader@1540e19d, see the next 
> exception for details.
> ERROR XSDBB: Unknown page format at page Page(7,Container(0, 161)), 
> page dump follows:
>
> I understand 161 refers to the conglomerate SYSCOLUMNS_INDEX1 and the 
> file ca1.dat.
>
> Is there any magic I can do to somehow drop this "index" and 
> regenerate it?
>
> Thanks in advance for any pointers.  I checked 
> https://wiki.apache.org/db-derby/DatabaseCorruption but given this is 
> a system index and I can't boot the database I don't have any ideas.
>
> Cheers,
> David


Re: Unknown page format at page Page(7,Container(0, 161)) [SYSCOLUMNS_INDEX1] on bootup

Posted by David Sitsky <da...@gmail.com>.
> ERROR XJ040: Failed to start database 'E:\XXXXXXXX\Database' with class
loader sun.misc.Launcher$AppClassLoader@1540e19d, see the next exception
for details.
> ERROR XSDBB: Unknown page format at page Page(7,Container(0, 161)), page
dump follows:
>
> I understand 161 refers to the conglomerate SYSCOLUMNS_INDEX1 and the
file ca1.dat.

Actually I tried copying ca1.dat from another database they had and it
allowed me to boot up, although executing the queries from
https://wiki.apache.org/db-derby/DatabaseCorruption gave me errors like:

ERROR 38000: The exception 'java.lang.NullPointerException' was thrown
while evaluating an expression.
ERROR XJ001: Java exception: ': java.lang.NullPointerException'.

I can see the list of tables thought using "show tables".

Given the issue seems to be with a system table.. can I somehow drop it and
re-generate it?

Cheers,
David