db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew McIntyre" <mcintyr...@gmail.com>
Subject Re: Re: Trouble accessing read only DB with 10.1 (created and accessed fine with 10.0)
Date Thu, 06 Jul 2006 07:00:20 GMT
On 7/5/06, Andrew McIntyre <mcintyre.a@gmail.com> wrote:
> On 7/5/06, Leslie Software <lesliesoftware@yahoo.com> wrote:
> > I was using 10.0.2.1 and just this evening upgraded to 10.1.3.0 but I cannot open
my read-only database any more.
> >
> > My connection code does this
> >         //  Initialize the derby driver
> >         Class.forName ("org.apache.derby.jdbc.EmbeddedDriver"); //$NON-NLS-1$
> >         .... // code that setups up connectionString eliminated
> >         myConnection = DriverManager.getConnection (connectionString);
> >
> > Where connectionString is:
> > jdbc:derby:jar:(P:\WizardsFamiliar2\com.lesliesoftware.wizardsfamiliar.database\Cards.jar)MtGCards
> > And there is a Cards.jar with a MtGCards database inside at the specified location.
> >
> > The call to getConnection throws the following execption:
> > XJ040.C
> > SQL Exception: Failed to start database 'jar:(P:\WizardsFamiliar2\com.lesliesoftware.wizardsfamiliar.database\Cards.jar)MtGCards',
see the next exception for details.
> >
> > The next exception is:
> > 40XD1
> > SQL Exception: Container was opened in read-only mode.
> >
> > I reviewed the 10.1 documentation and it looks just the same as in 10.0 <http://db.apache.org/derby/docs/10.1/devguide/cdevdeploy11201.html>.
 What am I doing wrong?  What changes do I need to make?

Ok, so I think I overreacted. The Derby documentation states this, in
http://db.apache.org/derby/docs/10.1/devguide/cdevdeploy11201.html:

"Databases in a jar or zip file are always opened read-only and there
is currently no support to allow updates of any type."

This would include upgrade from a previous version of Derby.

Someone else may correct me, but on reflection, I think this is in
fact expected behavior. The JIRA issue I opened for this, DERBY-1479,
I will leave open in order to improve the documentation  to include
the error you reported.

andrew

Mime
View raw message