db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Bradbury <Stan.Bradb...@gmail.com>
Subject Re: ERROR 25502: An SQL data change is not permitted for a read-only connection, user or database.
Date Fri, 21 Apr 2006 14:48:55 GMT
Thomas J. Taylor wrote:

>Hi There,
>
>I have a Derby database that is giving me a read-only error (25502), and I
>don't know why. The database was working fine, up until about a month ago.
>Now, I cannot INSERT, UPDATE, or DELETE from the database - I always get
>ERROR 25502. I checked Windows Security permissions (user has Full Control:
>READ/MODIFY/WRITE/etc.), File attributes (all files in the database
>directory are writable); finally, I deleted the 'db.lck' file that is in the
>database directory.
>
>There are multiple users accessing this database (different Windows
>accounts) - each account gets the same error. It may be that the database
>was shutdown improperly the last time it was running, I don't know.
>  
>
---- SNIP  ---

>Thomas
>
>P.S. I receive this error when I run IJ and when I use a connection through
>Java.
>
>
>  Driver: org.apache.derby.jdbc.EmbeddedDriver
> Version: 10.1.1.0
>JDBC URL: jdbc:derby:../db/MyDB
>     O/S: Windows XP TPC Edition, SP2
>
>ERROR 25502: An SQL data change is not permitted for a read-only connection,
>user or database.
>	at
>org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
>	at
>org.apache.derby.impl.sql.conn.GenericAuthorizer.authorize(Unknown Source)
>	at
>org.apache.derby.impl.sql.execute.GenericResultSetFactory.getDeleteResultSet
>(Unknown Source)
>	at
>org.apache.derby.exe.ac80220011x010axae9bx8591x0000000e94181.fillResultSet(U
>nknown Source)
>	at
>org.apache.derby.exe.ac80220011x010axae9bx8591x0000000e94181.execute(Unknown
>Source)
>	at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown
>Source)
>	at
>org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>	at
>org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
>	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
>	at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown
>Source)
>	...
>
>ERROR 25502: An SQL data change is not permitted for a read-only connection,
>user or database.
>	at
>org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
>  
>
--- SNIP ---

Hi Thomas -

As Øystein stated this problem happens when there is a problem during 
the startup / booting of the database.  In other cases where the problem 
did not just 'go away' the cause has been traced to file related issues 
like permissions, invalid database files (non-Derby files or directories 
with a Derby system filename), file descriptor limitations, use of 
non-hard-disk storage (flash drives, etc), other processes (e.g. 
backups) locking the files and issues like these.

In addition to using a recent build to see if the additional logging 
provides a clue you can rebuild the database from scratch in a fresh 
environment without any resource restrictions set and  using the local 
hard disk.  Do this from an administrator account and see if the problem 
occurs in this copy.  If it does not happen then re-examine the existing 
system to see how it differs and try eliminating the differences.  It 
might help to reset the existing system including rebooting the machine 
then remove the db.lck and derby.log files (if they exist) and try 
accessing the database using IJ from an administrator account.

Hope this helps - as you can see this symptom can occur from any number 
of reasons and I sure we have not identified them all yet.


Mime
View raw message