db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Bradbury <Stan.Bradb...@gmail.com>
Subject Re: Issue with Derby Views
Date Mon, 11 Dec 2006 19:08:29 GMT
Hi -
Sure seems like a bug should be filed on this in JIRA, there is a test 
case and everything needed.  Would you or Suraj be willing to file a 
JIRA bug?  It is easy to do, information on doing so is at:
http://db.apache.org/derby/DerbyBugGuidelines.html

This way the problem will come to the attention of developers looking to 
work with the codeline and possible be corrected.

Anuradha Weeraman wrote:
> Hi All,
>
> The following problem essentially has to do with accessing a view made
> up of more than 300 tables. We found out that by reducing the number
> of tables in the view, we managed to eliminate the problem. But when
> we exceed approximately 300 tables per view, the issue started to
> surface.
>
> Below is the link to the discussion that has already taken on this 
> subject:
>
> http://www.nabble.com/Can't-the-embedded-mode-of-a-Derby-database-boot-from-a-dual-JVMs-t2586621.html

>
>
> Suraj (the reporter of the problem) has created a small application
> which you can download from
> http://www.nabble.com/file/4227/DerbyIssue.zip that recreates this
> issue.
>
> When I debugged the problem, I managed to reproduce the error with the
> following exception:
>
> ERROR XSDG3: Meta-data for Container
> org.apache.derby.impl.store.raw.data.RAFContainer@397fece1 could not
> be accessed
>
> The full stack trace is attached. The root exception seems to be:
>
> java.io.FileNotFoundException:
> C:\db\SampleDerbyDatabase\seg0\cd630.dat (Cannot create a file when
> that file already exists)
>
> When I debugged into RAFContainer.java, it seems to be throwing the
> FILE_CONTAINER_EXCEPTION on line 1539. To give you some context:
>
> --snip--
>
>                 if (stub.exists())
>                 {
>                     try
>                     {
>                         boolean delete_status = privRemoveFile(file);
>                         if (SanityManager.DEBUG)
>                         {
>                             if (!delete_status)
>                             {
>                                 SanityManager.THROWASSERT(
>                                     "delete of file (" + file + ") 
> failed.");
>                             }
>                         }
>
>                         fileData =
>                             stub.getRandomAccessFile(canUpdate ? "rw" 
> : "r");
>
>                         readHeader(fileData);
>                     }
>                     catch (IOException ioe2)
>                     {
> // *************** LINE 1539: THIS EXCEPTION IS THROWN ***************
>                         throw dataFactory.
>                             markCorrupt(StandardException.
>                                         newException(SQLState.
>                                                      
> FILE_CONTAINER_EXCEPTION,
>                                                      ioe2, this));
>                     }
>
>                     // RESOLVE: this is a temporary hack
>
> --snip--
>
> I don't know enough of the Derby internals to know why it's doing
> that. Would appreciate if someone could shed some light on this.
>
> There are about 3400 files in seg0 folder and there was initial
> speculation whether Derby was hitting the following JVM bug:
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4189011
>
> The JVM bug seems to be specific to Windows, but we managed to
> recreate the issue on a Linux JVM, so I'm thinking that the issue is
> not related to the JVM and is somehow Derby-related. But then, it ran
> successfully on JVM 1.5.0_09, so I might be wrong.
>
> ------------------------------------------------------------------------
>
> ERROR XSDG3: Meta-data for Container org.apache.derby.impl.store.raw.data.RAFContainer@397fece1
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.doPrivileged1(Native Method)
> 	at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
> 	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.BaseDataFileFactory.openContainer(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown Source)
> 	at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown Source)
> 	at org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.readConglomerate(Unknown
Source)
> 	at org.apache.derby.impl.store.access.RAMAccessManager.conglomCacheFind(Unknown Source)
> 	at org.apache.derby.impl.store.access.RAMTransaction.findExistingConglomerate(Unknown
Source)
> 	at org.apache.derby.impl.store.access.RAMTransaction.openStoreCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.CompilerContextImpl.getStoreCostController(Unknown
Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.getStoreCostController(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.estimateCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.estimateTotalCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costBasedCostOptimizable(Unknown
Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costOptimizable(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.DMLStatementNode.optimize(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.CursorNode.optimize(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
> 	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
> 	at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAStatement.prepareStatementJDBC3(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAStatement.prepare(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAStatement.explicitPrepare(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAConnThread.parsePRPSQLSTT(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> ============= begin nested exception, level (1) ===========
> java.io.FileNotFoundException: C:\db\SampleDerbyDatabase\seg0\cd630.dat (Cannot create
a file when that file already exists)
> 	at java.io.RandomAccessFile.open(Native Method)
> 	at java.io.RandomAccessFile.<init>(RandomAccessFile.java(Compiled Code))
> 	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.doPrivileged1(Native Method)
> 	at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
> 	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.BaseDataFileFactory.openContainer(Unknown Source)
> 	at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown Source)
> 	at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown Source)
> 	at org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.readConglomerate(Unknown
Source)
> 	at org.apache.derby.impl.store.access.RAMAccessManager.conglomCacheFind(Unknown Source)
> 	at org.apache.derby.impl.store.access.RAMTransaction.findExistingConglomerate(Unknown
Source)
> 	at org.apache.derby.impl.store.access.RAMTransaction.openStoreCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.CompilerContextImpl.getStoreCostController(Unknown
Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.getStoreCostController(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.estimateCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.estimateTotalCost(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costBasedCostOptimizable(Unknown
Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costOptimizable(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.FromBaseTable.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.TableOperatorNode.optimizeSource(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.UnionNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.DMLStatementNode.optimize(Unknown Source)
> 	at org.apache.derby.impl.sql.compile.CursorNode.optimize(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
> 	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
> 	at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAStatement.prepareStatementJDBC3(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAStatement.prepare(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAStatement.explicitPrepare(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAConnThread.parsePRPSQLSTT(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
> 	at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)



Mime
View raw message