Hi folks,

     We’ve run into this problem intermittently and were wondering if you can suggest some ideas about what the problem may be or configuration changes that might help alleviate the problem.  By intermittently, I mean 3 times in the past two months.  The software runs 24x7, so it occurs very infrequently when compared to the number of accesses that are made to the database.

 

Here’s the pertinent environment information:

 

Platform: Windows 2003 Server 64 bit

JVM:       jre-1_5_0_14-windows-amd64

Derby:     10.2.2

 

Note – we are have our software running on multiple platforms (RHEL, Windows 32bit/64bit/XP/Server, Mac, i5/OS), and have only experienced this exception on Windows 2003 Server 64 bit.

 

About an hour before we received this exception, we compressed the database, reducing the total size of the DB from 10GB to 1.5GB.  The largest database file was about 350MB (I’m not sure about the number of records).

 

Now for the error:

 

java.sql.BatchUpdateException: Meta-data for Container org.apache.derby.impl.store.raw.data.RAFContainer@12406ab2 could not be accessed

      at org.apache.derby.impl.jdbc.EmbedStatement.executeBatch(Unknown Source)

      at com.extol.util.jdbc.CacheStatement.executeBatch(CacheStatement.java:51)

<<our code>> <<snip>>

ERROR XSDG3: Meta-data for Container org.apache.derby.impl.store.raw.data.RAFContainer@12406ab2 could not be accessed

      at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)

      at org.apache.derby.impl.store.raw.data.RAFContainer.run(Unknown Source)

      at java.security.AccessController.doPrivileged(Native Method)

      at org.apache.derby.impl.store.raw.data.RAFContainer.openContainer(Unknown Source)

      at org.apache.derby.impl.store.raw.data.FileContainer.setIdent(Unknown Source)

      at org.apache.derby.impl.store.raw.data.RAFContainer.setIdentity(Unknown Source)

      at org.apache.derby.impl.services.cache.CachedItem.takeOnIdentity(Unknown Source)

      at org.apache.derby.impl.services.cache.Clock.addEntry(Unknown Source)

      at org.apache.derby.impl.services.cache.Clock.find(Unknown Source)

      at org.apache.derby.impl.store.raw.data.CachedPage.writePage(Unknown Source)

      at org.apache.derby.impl.store.raw.data.CachedPage.clean(Unknown Source)

      at org.apache.derby.impl.services.cache.CachedItem.clean(Unknown Source)

      at org.apache.derby.impl.services.cache.Clock.rotateClock(Unknown Source)

      at org.apache.derby.impl.services.cache.Clock.findFreeItem(Unknown Source)

      at org.apache.derby.impl.services.cache.Clock.find(Unknown Source)

      at org.apache.derby.impl.store.raw.data.FileContainer.getUserPage(Unknown Source)

      at org.apache.derby.impl.store.raw.data.FileContainer.getPage(Unknown Source)

      at org.apache.derby.impl.store.raw.data.BaseContainerHandle.getPage(Unknown Source)

      at org.apache.derby.impl.store.access.btree.ControlRow.Get(Unknown Source)

      at org.apache.derby.impl.store.access.btree.ControlRow.Get(Unknown Source)

      at org.apache.derby.impl.store.access.btree.BranchControlRow.getChildPageAtSlot(Unknown Source)

      at org.apache.derby.impl.store.access.btree.BranchControlRow.search(Unknown Source)

      at org.apache.derby.impl.store.access.btree.BranchControlRow.search(Unknown Source)

      at org.apache.derby.impl.store.access.btree.BranchControlRow.search(Unknown Source)

      at org.apache.derby.impl.store.access.btree.BTreeController.doIns(Unknown Source)

      at org.apache.derby.impl.store.access.btree.BTreeController.insert(Unknown Source)

      at org.apache.derby.impl.store.access.btree.index.B2IController.insert(Unknown Source)

      at org.apache.derby.impl.sql.execute.IndexChanger.insertAndCheckDups(Unknown Source)

      at org.apache.derby.impl.sql.execute.IndexChanger.doInsert(Unknown Source)

      at org.apache.derby.impl.sql.execute.IndexChanger.insert(Unknown Source)

      at org.apache.derby.impl.sql.execute.IndexSetChanger.insert(Unknown Source)

      at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(Unknown Source)

      at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)

      at org.apache.derby.impl.sql.execute.InsertResultSet.open(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.EmbedPreparedStatement.executeBatchElement(Unknown Source)

      at org.apache.derby.impl.jdbc.EmbedStatement.executeBatch(Unknown Source)

<<our code>>  <<snip>>

java.io.FileNotFoundException: M:\database\xdb1\seg0\c1250.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>(RandomAccessFile.java:212)

      at org.apache.derby.impl.io.DirRandomAccessFile.<init>(Unknown Source)

      at org.apache.derby.impl.io.DirRandomAccessFile4.<init>(Unknown Source)

      at org.apache.derby.impl.io.DirFile4.getRandomAccessFile(Unknown Source)

      at org.apache.derby.impl.store.raw.data.RAFContainer.run(Unknown Source)

      at java.security.AccessController.doPrivileged(Native Method)

      at org.apache.derby.impl.store.raw.data.RAFContainer.openContainer(Unknown Source)

      at org.apache.derby.impl.store.raw.data.FileContainer.setIdent(Unknown Source)

      at org.apache.derby.impl.store.raw.data.RAFContainer.setIdentity(Unknown Source)

      at org.apache.derby.impl.services.cache.CachedItem.takeOnIdentity(Unknown Source)

      at org.apache.derby.impl.services.cache.Clock.addEntry(Unknown Source)

      at org.apache.derby.impl.services.cache.Clock.find(Unknown Source)

      at org.apache.derby.impl.store.raw.data.CachedPage.writePage(Unknown Source)

      at org.apache.derby.impl.store.raw.data.CachedPage.clean(Unknown Source)

      at org.apache.derby.impl.services.cache.CachedItem.clean(Unknown Source)

      at org.apache.derby.impl.services.cache.Clock.rotateClock(Unknown Source)

      at org.apache.derby.impl.services.cache.Clock.findFreeItem(Unknown Source)

      at org.apache.derby.impl.services.cache.Clock.find(Unknown Source)

      at org.apache.derby.impl.store.raw.data.FileContainer.getUserPage(Unknown Source)

      at org.apache.derby.impl.store.raw.data.FileContainer.getPage(Unknown Source)

      at org.apache.derby.impl.store.raw.data.BaseContainerHandle.getPage(Unknown Source)

      at org.apache.derby.impl.store.access.btree.ControlRow.Get(Unknown Source)

      at org.apache.derby.impl.store.access.btree.ControlRow.Get(Unknown Source)

      at org.apache.derby.impl.store.access.btree.BranchControlRow.getChildPageAtSlot(Unknown Source)

      at org.apache.derby.impl.store.access.btree.BranchControlRow.search(Unknown Source)

      at org.apache.derby.impl.store.access.btree.BranchControlRow.search(Unknown Source)

      at org.apache.derby.impl.store.access.btree.BranchControlRow.search(Unknown Source)

      at org.apache.derby.impl.store.access.btree.BTreeController.doIns(Unknown Source)

      at org.apache.derby.impl.store.access.btree.BTreeController.insert(Unknown Source)

      at org.apache.derby.impl.store.access.btree.index.B2IController.insert(Unknown Source)

      at org.apache.derby.impl.sql.execute.IndexChanger.insertAndCheckDups(Unknown Source)

      at org.apache.derby.impl.sql.execute.IndexChanger.doInsert(Unknown Source)

      at org.apache.derby.impl.sql.execute.IndexChanger.insert(Unknown Source)

      at org.apache.derby.impl.sql.execute.IndexSetChanger.insert(Unknown Source)

      at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(Unknown Source)

      at org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown Source)

      at org.apache.derby.impl.sql.execute.InsertResultSet.open(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.EmbedPreparedStatement.executeBatchElement(Unknown Source)

      at org.apache.derby.impl.jdbc.EmbedStatement.executeBatch(Unknown Source)

<<our code>> <<snip>>

 

 

Jeffrey Inns

Application Support, Development

EXTOL International, Inc.

Web: www.extol.com

Tech Support: 866.398.6524

Direct Dial: 570.621.7879