db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Libor Jelinek <ljeli...@virtage.com>
Subject Re: transaction problem???
Date Mon, 09 Jul 2012 13:29:52 GMT
One reason that is crossing my mind is to ensure whether log file is not
opened by another Derby (or backup software or whatever).

On Linux, you will easily find who owns a lock with lsof command. Maybe
there's similar utility on Win also.

Libor

On Mon, Jul 9, 2012 at 9:40 AM, Bartosz, Jan (NSN - PL/Wroclaw) <
jan.bartosz@nsn.com> wrote:

> While writing to DB I’ve got following error(exception;) : ****
>
> ** **
>
> java.sql.SQLException: System will shutdown, got I/O Exception while
> accessing log file.****
>
>                 at
> org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
> Source)****
>
>                 at
> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)****
>
>                 at
> org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)****
>
>                 at
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
> Source)****
>
>                 at
> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
> Source)****
>
>                 at
> org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
> ****
>
>                 at
> org.apache.derby.impl.jdbc.EmbedConnection.commitIfNeeded(Unknown Source)*
> ***
>
>                 at
> org.apache.derby.impl.jdbc.ConnectionChild.commitIfNeeded(Unknown Source)*
> ***
>
>                 at
> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> ****
>
>                 at
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown
> Source)****
>
>                 at
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown
> Source)****
>
>                 at
> pegasus.logging.derby.appenders.DerbyWriterForCurrent.makePersistent(DerbyWriterForCurrent.java:44)
> ****
>
>                 at
> pegasus.logging.derby.appenders.DerbyAppender.appendRecord(DerbyAppender.java:88)
> ****
>
>                 at
> pegasus.logging.derby.appenders.DerbyAppender.appendEvent(DerbyAppender.java:80)
> ****
>
>                 at
> pegasus.logging.derby.appenders.DerbyAppender.append(DerbyAppender.java:112)
> ****
>
>                 at
> org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)****
>
>                 at
> org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
> ****
>
>                 at
> org.apache.log4j.Category.callAppenders(Category.java:203)****
>
>                 at org.apache.log4j.Category.forcedLog(Category.java:388)*
> ***
>
>                 at org.apache.log4j.Category.log(Category.java:853)****
>
>                 at
> pegasus.logging.tracingmachines.log4j.Log4jLoggingLogger.delegateLogging(Log4jLoggingLogger.java:530)
> ****
>
>                 at
> pegasus.logging.tracingmachines.log4j.Log4jLoggingLogger.genericLog(Log4jLoggingLogger.java:329)
> ****
>
>                 at
> pegasus.logging.internal.factories.LoggerAdapter.delegateLogging(LoggerAdapter.java:341)
> ****
>
>                 at
> pegasus.logging.internal.factories.LoggerAdapter.debug(LoggerAdapter.java:73)
> ****
>
>                 at
> pegasus.logging.internal.factories.LoggerAdapter.debug(LoggerAdapter.java:58)
> ****
>
>                 at
> pegasus.rfiav.udpcp.internal.DataRegistry.receive(DataRegistry.java:68)***
> *
>
>                 at
> pegasus.rfiav.udpcp.internal.UdpcpState.receive(UdpcpState.java:56)****
>
>                 at
> pegasus.rfiav.udpcp.UdpcpServerSocket.processData(UdpcpServerSocket.java:150)
> ****
>
>                 at
> pegasus.rfiav.udpcp.UdpcpServerSocket.receiveFragment(UdpcpServerSocket.java:104)
> ****
>
>                 at
> pegasus.rfiav.udpcp.UdpcpSocket$UdpcpSocketReceiver.run(UdpcpSocket.java:176)
> ****
>
> Caused by: java.sql.SQLException: System will shutdown, got I/O Exception
> while accessing log file.****
>
>                 at
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
> Source)****
>
>                 at
> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
> Source)****
>
>                 ... 30 more****
>
> Caused by: java.sql.SQLException: Java exception:
> 'D:\repos\TOPIK\workspace\log\db_20120614_114744\loggingDB20120614_114744\log\log2846.dat
> (The process cannot access the file because it is being used by another
> process): java.io.FileNotFoundException'.****
>
>                 at
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
> Source)****
>
>                 at
> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
> Source)****
>
>                 at
> org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
> Source)****
>
>                 at
> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)****
>
>                 at org.apache.derby.impl.jdbc.Util.javaException(Unknown
> Source)****
>
>                 at
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
> Source)****
>
>                 ... 27 more****
>
> Caused by: java.io.FileNotFoundException:
> D:\repos\TOPIK\workspace\log\db_20120614_114744\loggingDB20120614_114744\log\log2846.dat
> (The process cannot access the file because it is being used by another
> process)****
>
>                 at java.io.RandomAccessFile.open(Native Method)****
>
>                 at java.io.RandomAccessFile.<init>(Unknown Source)****
>
>                 at
> org.apache.derby.impl.io.DirRandomAccessFile.<init>(Unknown Source)****
>
>                 at
> org.apache.derby.impl.io.DirFile4.getRandomAccessFile(Unknown Source)****
>
>                 at
> org.apache.derby.impl.store.raw.log.LogToFile.run(Unknown Source)****
>
>                 at java.security.AccessController.doPrivileged(Native
> Method)****
>
>                 at
> org.apache.derby.impl.store.raw.log.LogToFile.privRandomAccessFile(Unknown
> Source)****
>
>                 at
> org.apache.derby.impl.store.raw.log.LogToFile.openLogFileInWriteMode(Unknown
> Source)****
>
>                 at
> org.apache.derby.impl.store.raw.log.LogToFile.switchLogFile(Unknown Source)
> ****
>
>                 at
> org.apache.derby.impl.store.raw.log.LogToFile.flush(Unknown Source)****
>
>                 at
> org.apache.derby.impl.store.raw.log.LogToFile.flush(Unknown Source)****
>
>                 at
> org.apache.derby.impl.store.raw.log.FileLogger.flush(Unknown Source)****
>
>                 at
> org.apache.derby.impl.store.raw.xact.Xact.prepareCommit(Unknown Source)***
> *
>
>                 at
> org.apache.derby.impl.store.raw.xact.Xact.commit(Unknown Source)****
>
>                 at
> org.apache.derby.impl.store.raw.xact.Xact.commit(Unknown Source)****
>
>                 at
> org.apache.derby.impl.store.access.RAMTransaction.commit(Unknown Source)**
> **
>
>                 at
> org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.doCommit(Unknown
> Source)****
>
>                 at
> org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.userCommit(Unknown
> Source)****
>
>                 at
> org.apache.derby.impl.jdbc.TransactionResourceImpl.commit(Unknown Source)*
> ***
>
>                 ... 24 more****
>
> ** **
>
> ** **
>
> Dev guide of derby says that : /log directory****
>
> Contains files that make up the database transaction log, used internally
> for data recovery (not the same thing as the error log).****
>
> http://db.apache.org/derby/docs/dev/devguide/cdevdvlp40724.html****
>
> ** **
>
> There aren’t select’s performed on DB – however updates occur.****
>
> ** **
>
> Default isolation level is set.****
>
> ** **
>
> Any idea?****
>
> ** **
>
> ** **
>
> ..........................
> Regards / Pozdrowienia
> Jan Bartosz****
>
> MBB RP I&V Tools&Autom Pegasus Core PL****
>
> My contact info in Phonebook<http://domino.inside.nokiasiemensnetworks.com/nsn/phonebook.nsf/n/61282459>
> ****
>
> Click to call me by using Softphone****
>
> ** **
>

Mime
View raw message