You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Andrew McIntyre (JIRA)" <de...@db.apache.org> on 2006/07/06 08:14:29 UTC

[jira] Created: (DERBY-1479) A Derby 10.0 database in a jar cannot be accessed by Derby 10.1

A Derby 10.0 database in a jar cannot be accessed by Derby 10.1
---------------------------------------------------------------

         Key: DERBY-1479
         URL: http://issues.apache.org/jira/browse/DERBY-1479
     Project: Derby
        Type: Bug

  Components: Store  
    Versions: 10.1.3.1, 10.1.2.1, 10.1.1.0    
    Reporter: Andrew McIntyre
     Fix For: 10.2.0.0, 10.1.4.0, 10.1.3.2


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


[jira] Commented: (DERBY-1479) Documentation should note need to upgrade databases in jars

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1479?page=comments#action_12420467 ] 

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

Shuold we close this as duplicate of 541 then, and perhaps open a documentation improvement that clarifies that it is possible with 10.0/10.1 -> 10.2, but not 10.0 -> 10.1?

> 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.1.0, 10.1.2.1, 10.1.3.1
>     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


[jira] Resolved: (DERBY-1479) Release note for DERBY-541 on 10.1.3.1 release page

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1479?page=all ]

Andrew McIntyre resolved DERBY-1479.
------------------------------------

    Fix Version/s: 10.1.3.1
                       (was: 10.1.3.2)
                       (was: 10.1.4.0)
       Resolution: Fixed
       Derby Info: [Release Note Needed]

> Release note for DERBY-541 on 10.1.3.1 release page
> ---------------------------------------------------
>
>                 Key: DERBY-1479
>                 URL: http://issues.apache.org/jira/browse/DERBY-1479
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.1.1.0, 10.1.2.1, 10.1.3.1
>            Reporter: Andrew McIntyre
>             Fix For: 10.1.3.1
>
>         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

        

[jira] Commented: (DERBY-1479) Documentation should note need to upgrade databases in jars

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1479?page=comments#action_12420501 ] 

Daniel John Debrunner commented on DERBY-1479:
----------------------------------------------

I wouldn't document this in the 10.2 docs because it won't be an issue there.

I guess one could document it in the 10.1 docs, but seems somewhat strange to me,
have other bugs been documented in existing documentation, apart from the release notes?



> 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.1.0, 10.1.2.1, 10.1.3.1
>     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


[jira] Updated: (DERBY-1479) Release note for DERBY-541 on 10.1.3.1 release page

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1479?page=all ]

Andrew McIntyre updated DERBY-1479:
-----------------------------------

    Summary: Release note for DERBY-541 on 10.1.3.1 release page  (was: Documentation should note need to upgrade databases in jars)

Changing description to more accurately reflect what was done to resolve the issue. 

> Release note for DERBY-541 on 10.1.3.1 release page
> ---------------------------------------------------
>
>                 Key: DERBY-1479
>                 URL: http://issues.apache.org/jira/browse/DERBY-1479
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.1.1.0, 10.1.2.1, 10.1.3.1
>            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

        

[jira] Updated: (DERBY-1479) A Derby 10.0 database in a jar cannot be accessed by Derby 10.1

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1479?page=all ]

Andrew McIntyre updated DERBY-1479:
-----------------------------------

    Attachment: jartest3.jar

Attempting to connect to the database in this jar, which was created with Derby 10.0, illustrates the problem with soft upgrade. The problem can be reproduced with ij by trying to connect to the database in this jar as follows:

$ java org.apache.derby.tools.ij
ij version 10.1
ij> connect 'jdbc:derby:jar:({pathtothejarfile}/jartest3.jar)jartest';
ERROR XJ040: Failed to start database 'jar:(/Users/andrewm/derby10/testdir/jar/jartest3.jar)jartest', see the next exception for details.
ERROR 40XD1: Container was opened in read-only mode.  

ij is unable to establish a connection and it is not possible to perform any actions on the database in the jar. If the database in the jar is upgraded to the 10.1 format, it is possible to connect to the database and select data from the table in the database. Post-upgrade:

$ java org.apache.derby.tools.ij
ij version 10.1
ij> connect 'jdbc:derby:jar:({pathtothejarfile}/jartest4.jar)jartest';
ij> select * from t1;
C1         |C2         
-----------------------
1          |2          
3          |4          


> A Derby 10.0 database in a jar cannot be accessed by Derby 10.1
> ---------------------------------------------------------------
>
>          Key: DERBY-1479
>          URL: http://issues.apache.org/jira/browse/DERBY-1479
>      Project: Derby
>         Type: Bug

>   Components: Store
>     Versions: 10.1.3.1, 10.1.2.1, 10.1.1.0
>     Reporter: Andrew McIntyre
>      Fix For: 10.2.0.0, 10.1.4.0, 10.1.3.2
>  Attachments: jartest3.jar
>
> 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


[jira] Updated: (DERBY-1479) Documentation should note need to upgrade databases in jars

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1479?page=all ]

Daniel John Debrunner updated DERBY-1479:
-----------------------------------------

    Fix Version:     (was: 10.2.0.0)

BUg was fixed by DERBY-541 in 10.2 trunk

> 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.1.0, 10.1.2.1, 10.1.3.1
>     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


[jira] Commented: (DERBY-1479) Documentation should note need to upgrade databases in jars

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1479?page=comments#action_12420502 ] 

Daniel John Debrunner commented on DERBY-1479:
----------------------------------------------

Also the patch seems small, seems easier to merge the patch to 10.1 than have to explain in 10.1 docs that you can't use 10.1 in this situation. :-)

> 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.1.0, 10.1.2.1, 10.1.3.1
>     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


[jira] Updated: (DERBY-1479) A Derby 10.0 database in a jar cannot be accessed by Derby 10.1

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1479?page=all ]

Andrew McIntyre updated DERBY-1479:
-----------------------------------

    Component: Documentation

Maybe I'm up too late and still in release-mode. Marking this as a Documentation issue also in case the resolution for this issue is just proper documentation of the problem w/r/t databases in a jar.

> A Derby 10.0 database in a jar cannot be accessed by Derby 10.1
> ---------------------------------------------------------------
>
>          Key: DERBY-1479
>          URL: http://issues.apache.org/jira/browse/DERBY-1479
>      Project: Derby
>         Type: Bug

>   Components: Store, Documentation
>     Versions: 10.1.1.0, 10.1.2.1, 10.1.3.1
>     Reporter: Andrew McIntyre
>      Fix For: 10.2.0.0, 10.1.4.0, 10.1.3.2
>  Attachments: jartest3.jar
>
> 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


[jira] Commented: (DERBY-1479) Documentation should note need to upgrade databases in jars

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1479?page=comments#action_12420464 ] 

Daniel John Debrunner commented on DERBY-1479:
----------------------------------------------

This is a bug, not a documentation issue. Derby should be able to boot in soft-upgrade mode against databases in jars or databases on read-only media.
I thought there was an existing bug, but I can't find it yet.

> 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, 10.2.0.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


[jira] Commented: (DERBY-1479) Documentation should note need to upgrade databases in jars

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
    [ 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


[jira] Updated: (DERBY-1479) Documentation should note need to upgrade databases in jars

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1479?page=all ]

Andrew McIntyre updated DERBY-1479:
-----------------------------------

        Summary: Documentation should note need to upgrade databases in jars  (was: A Derby 10.0 database in a jar cannot be accessed by Derby 10.1)
      Component:     (was: Store)
    Description: 
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. 

  was:
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. 


I think a note in the documentation which addresses the need to upgrade databases in jars to newer versions of Derby is needed. There is no explicit mention of the problems which may be encountered when trying to access a database in a jar created with an earlier version of Derby which needs upgrade to the latest version, and the exception which is encountered on such access:

ERROR 40XD1: Container was opened in read-only mode. 

provides no useful information for determining the cause of the problem. Documenting the need to explicitly upgrade databases in jars created with earlier versions of Derby seems like a reasonable course of action for the problem.


> 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, 10.2.0.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


[jira] Closed: (DERBY-1479) Release note for DERBY-541 on 10.1.3.1 release page

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1479?page=all ]

Andrew McIntyre closed DERBY-1479.
----------------------------------

    Assignee: Andrew McIntyre

> Release note for DERBY-541 on 10.1.3.1 release page
> ---------------------------------------------------
>
>                 Key: DERBY-1479
>                 URL: http://issues.apache.org/jira/browse/DERBY-1479
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 10.1.1.0, 10.1.2.1, 10.1.3.1
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>             Fix For: 10.1.3.1
>
>         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