[ 
http://issues.apache.org/jira/browse/DERBY-1479?page=comments#action_12420510 ] 

Andrew McIntyre commented on DERBY-1479:
----------------------------------------

It's too bad we missed this for 10.1.3, it would have been a good candidate for 
that release. I agree though, a description of the issue seems more appropriate 
for release notes than the docs. I think documenting it somewhere besides JIRA 
might be good, though, since I wasn't able to find it quickly in JIRA when it 
came up on the user list and it appears I wasn't the only one. :-)

How about we 1) merge this to the 10.1 branch in case there's a 10.1.4 release, 
and 2) add the information about this issue to the 10.1.3 release notes page? 
Here's a proposed release note for the 10.1.3 page:

PROBLEM:

A Derby 10.0 database in a jar cannot be booted against a 10.1(.3) engine.

SYMPTOM: 

Attempting to connect to a database in a jar created with Derby 10.0 fails when 
trying to connect with Derby 10.1.3. The following error is thrown: 

ERROR XJ040: Failed to start database 'jar:(pathtojarfile)pathinjar', see the 
next exception for details. 
ERROR 40XD1: Container was opened in read-only mode. 

CAUSE:

The problem was discovered and fixed as a part of <a 
href="http://issues.apache.org/jira/browse/DERBY-541";>DERBY-514</a>. The newer 
Derby engine would attempt to apply safe soft upgrade changes applicable to a 
read/write database when the database was opened in read-only mode. The 
inability to write to the database files leads to the error 40XD1 mentioned 
above when the engine attempts to apply safe soft upgrade changes to a 
read-only database.

SOLUTION:

This has been fixed in {insert Derby revision where fix was applied}. The Derby 
engine should not attempt to apply soft upgrade changes to a read-only database.

WORKAROUND:

Users with 10.0 Derby databases-in-jars can upgrade their 10.0 database in 
their jar file to a 10.1 database-in-a-jar by unjarring it, then connecting to 
it with a 10.1 version of the Derby engine and the upgrade=true attribute. The 
resulting database can then be jarred up again and future connections to this 
database using the 10.1 Derby engine will succeed.
Users of Derby versions {insert Derby revision where fix was applied} should be 
able to connect to their 10.0 database with no extra effort.

This can probably be improved, but I'll be glad to update the 10.1.3 release 
page if it appears I've got the release note right.

> Documentation should note need to upgrade databases in jars
> -----------------------------------------------------------
>
>          Key: DERBY-1479
>          URL: http://issues.apache.org/jira/browse/DERBY-1479
>      Project: Derby
>         Type: Bug

>   Components: Documentation
>     Versions: 10.1.3.1, 10.1.2.1, 10.1.1.0
>     Reporter: Andrew McIntyre
>      Fix For: 10.1.3.2, 10.1.4.0
>  Attachments: jartest3.jar
>
> The documentation currently does not address the need to upgrade databases in 
> jars when connecting to a newer version of Derby.
> For example, attempting to connect to a database in a jar created with Derby 
> 10.0 fails when trying to connect with Derby 10.1. The following error is 
> thrown:
> ERROR XJ040: Failed to start database 'jar:(pathtojarfile)pathinjar', see the 
> next exception for details.
> ERROR 40XD1: Container was opened in read-only mode. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to