db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anuradha Weeraman" <aweera...@gmail.com>
Subject Issue with Derby Views
Date Fri, 08 Dec 2006 20:51:29 GMT
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

Below is the link to the discussion that has already taken on this subject:


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

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:

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:


                 if (stub.exists())
                         boolean delete_status = privRemoveFile(file);
                         if (SanityManager.DEBUG)
                             if (!delete_status)
                                     "delete of file (" + file + ") failed.");

                         fileData =
                             stub.getRandomAccessFile(canUpdate ? "rw" : "r");

                     catch (IOException ioe2)
// *************** LINE 1539: THIS EXCEPTION IS THROWN ***************
                         throw dataFactory.
                                                      ioe2, this));

                     // RESOLVE: this is a temporary hack


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:


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.

Anuradha Weeraman

View raw message