Suat Gonul <suatgo...@gmail.com> writes:

> Hello everyone,
>
> I would like to know that if there would be a certain case causing the
> exception below. I can't reproduce that exception regularly though. The
> conglomerate number seems to be different in each case. I looked at
> several issues about non-existence of conglomerate but none of them
> seemed to be similar with my case. I would be very glad if you give some
> possible situations which may cause this situation or point me to the
> related issues if there is any.

One possibility is that the statement cache contains an already prepared
statement with this string "SELECT id, revision FROM revisionTable WHERE
revision > ? ORDER BY revision ASC" and that somehow it is no longer up
to date. If, say, the schema of revisionTable changes or applicable
indexes, the cached statement should have been invalidated (and
recompiled on the next usage), but that may not have happened for some
reason. Does you app make concurrent changes to revisionTable and/or its
indexes?

Thanks,
Dag

>
> Currently I use the 10.7.1.1 version within an OSGi environment and I
> prepare and execute the PrepareStatement causing this error as follows:
>
> ps = con.prepareStatement(SELECT id, revision FROM revisionTable WHERE
> revision > ? ORDER BY revision ASC),
>                     ResultSet.TYPE_SCROLL_INSENSITIVE,
> ResultSet.CONCUR_READ_ONLY);
> ps.setLong(1, revision);
> ps.setMaxRows(1000);
> rs = ps.executeQuery();



>
> Best,
> Suat
>
> The stacktrace:
>
> Caused by: java.sql.SQLException: The conglomerate (1,808) requested
> does not exist.
>     at
> org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
> Source)
>     at org.apache.derby.impl.jdbc.Util.generateCsSQLException(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.ConnectionChild.handleException(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.executeQuery(Unknown
> Source)
>     at
> org.apache.stanbol.contenthub.revisionmanager.RevisionManager.getChanges(RevisionManager.java:191)
>     ... 3 more
> Caused by: java.sql.SQLException: The conglomerate (1,808) requested
> does not exist.
>     at
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
> Source)
>     at
> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
> Source)
>     ... 13 more
> Caused by: ERROR XSAI2: The conglomerate (1,808) requested does not exist.
>     at
> org.apache.derby.iapi.error.StandardException.newException(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.getDynamicCompiledConglomInfo(Unknown
> Source)
>     at
> org.apache.derby.impl.sql.execute.TableScanResultSet.openCore(Unknown
> Source)
>     at
> org.apache.derby.impl.sql.execute.BulkTableScanResultSet.openCore(Unknown 
> Source)
>     at org.apache.derby.impl.sql.execute.SortResultSet.openCore(Unknown
> Source)
>     at
> org.apache.derby.impl.sql.execute.ScrollInsensitiveResultSet.openCore(Unknown
> Source)
>     at
> org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(Unknown
> Source)
>     at
> org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown
> Source)
>     at
> org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>     ... 7 more

Reply via email to