[jira] [Commented] (DERBY-7114) class org.apache.derby.iapi.store.raw.PageKey cannot be cast to class org.apache.derby.iapi.store.raw.ContainerKey

2024-05-28 Thread Sam Hutchins (Jira)


[ 
https://issues.apache.org/jira/browse/DERBY-7114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17850045#comment-17850045
 ] 

Sam Hutchins commented on DERBY-7114:
-

We still get this from time to time, with Derby 10.17.1.0 and JDK 21.0.2

> class org.apache.derby.iapi.store.raw.PageKey cannot be cast to class 
> org.apache.derby.iapi.store.raw.ContainerKey
> --
>
> Key: DERBY-7114
> URL: https://issues.apache.org/jira/browse/DERBY-7114
> Project: Derby
>  Issue Type: Bug
>Affects Versions: 10.14.2.0
> Environment: Java 8/11, Windows/macOS
>Reporter: Sam Hutchins
>Priority: Major
>
> Hi,
>  
> We're using the embedded driver, and we sometimes see this exception in the 
> wild:
>  
> {code:java}
> java.lang.RuntimeException: java.sql.SQLException: Java exception: 'class 
> org.apache.derby.iapi.store.raw.PageKey cannot be cast to class 
> org.apache.derby.iapi.store.raw.ContainerKey 
> (org.apache.derby.iapi.store.raw.PageKey and 
> org.apache.derby.iapi.store.raw.ContainerKey are in unnamed module of loader 
> 'app'): java.lang.ClassCastException'.java.lang.RuntimeException: 
> java.sql.SQLException: Java exception: 'class 
> org.apache.derby.iapi.store.raw.PageKey cannot be cast to class 
> org.apache.derby.iapi.store.raw.ContainerKey 
> (org.apache.derby.iapi.store.raw.PageKey and 
> org.apache.derby.iapi.store.raw.ContainerKey are in unnamed module of loader 
> 'app'): java.lang.ClassCastException'. at 
> uk.co.screamingfrog.db.utils.DBHelpers.handleSQLException(SourceFile:68) 
> ~[dbutils-1.0-SNAPSHOT.jar:?] at 
> uk.co.screamingfrog.seospider.db.LinksTableOperations.a(SourceFile:341) 
> ~[ScreamingFrogSEOSpider.jar:?] at 
> uk.co.screamingfrog.seospider.db.LinksTableOperations.b(SourceFile:215) 
> ~[ScreamingFrogSEOSpider.jar:?] at 
> uk.co.screamingfrog.seospider.storage.db.k.c(SourceFile:82) 
> ~[ScreamingFrogSEOSpider.jar:?] at java.util.HashMap.computeIfAbsent(Unknown 
> Source) ~[?:?] at uk.co.screamingfrog.seospider.storage.db.k.b(SourceFile:76) 
> ~[ScreamingFrogSEOSpider.jar:?] at 
> uk.co.screamingfrog.seospider.storage.db.k.a(SourceFile:41) 
> ~[ScreamingFrogSEOSpider.jar:?] at 
> uk.co.screamingfrog.seospider.g.f.b(SourceFile:184) 
> ~[ScreamingFrogSEOSpider.jar:?] at 
> uk.co.screamingfrog.seospider.g.f.a(SourceFile:81) 
> ~[ScreamingFrogSEOSpider.jar:?] at 
> uk.co.screamingfrog.seospider.g.f.f(SourceFile:56) 
> ~[ScreamingFrogSEOSpider.jar:?] at 
> uk.co.screamingfrog.seospider.g.m.h_(SourceFile:58) 
> ~[ScreamingFrogSEOSpider.jar:?] at 
> uk.co.screamingfrog.seospider.h.d.c(SourceFile:22) 
> ~[ScreamingFrogSEOSpider.jar:?] at 
> uk.co.screamingfrog.seospider.h.e.c(SourceFile:66) 
> ~[ScreamingFrogSEOSpider.jar:?] at seo.spider.spider.a.n(SourceFile:114) 
> ~[ScreamingFrogSEOSpider.jar:?] at seo.spider.spider.a.k(SourceFile:91) 
> ~[ScreamingFrogSEOSpider.jar:?] at 
> uk.co.screamingfrog.utils.utils.PriorityRunnable.run(SourceFile:25) 
> ~[utils-1.0-SNAPSHOT.jar:?] at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?] at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?] at 
> java.lang.Thread.run(Unknown Source) [?:?]Caused by: java.sql.SQLException: 
> Java exception: 'class org.apache.derby.iapi.store.raw.PageKey cannot be cast 
> to class org.apache.derby.iapi.store.raw.ContainerKey 
> (org.apache.derby.iapi.store.raw.PageKey and 
> org.apache.derby.iapi.store.raw.ContainerKey are in unnamed module of loader 
> 'app'): java.lang.ClassCastException'. at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown 
> Source) ~[derby-10.14.2.0.jar:?] at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown 
> Source) ~[derby-10.14.2.0.jar:?] at 
> org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source) 
> ~[derby-10.14.2.0.jar:?] at 
> org.apache.derby.impl.jdbc.Util.javaException(Unknown Source) 
> ~[derby-10.14.2.0.jar:?] at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
> Source) ~[derby-10.14.2.0.jar:?] at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown 
> Source) ~[derby-10.14.2.0.jar:?] at 
> org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) 
> ~[derby-10.14.2.0.jar:?] at 
> org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) 
> ~[derby-10.14.2.0.jar:?] at 
> org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown 
> Source) ~[derby-10.14.2.0.jar:?] at 
> org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown Source) 
> ~[derby-10.14.2.0.jar:?] at 
> org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source) 
> ~[derby-10.14.2.0.jar:?] at 
> 

[jira] [Commented] (DERBY-7116) Meta-data for unknown could not be accessed to read

2021-05-12 Thread Sam Hutchins (Jira)


[ 
https://issues.apache.org/jira/browse/DERBY-7116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17343260#comment-17343260
 ] 

Sam Hutchins commented on DERBY-7116:
-

Sigh indeed :). Thanks for the link, looks like some good stuff there. I'll 
make a note, just in case we ever do get steps to reproduce it. It seems to be 
pretty rare though, we've not had many reports of it (maybe 3 customers total). 
Can't fix every bug I guess

 

Thanks for the help

> Meta-data for unknown could not be accessed to read
> ---
>
> Key: DERBY-7116
> URL: https://issues.apache.org/jira/browse/DERBY-7116
> Project: Derby
>  Issue Type: Bug
>  Components: SQL, Store
>Affects Versions: 10.14.2.0
> Environment: Windows 10
>Reporter: Sam Hutchins
>Priority: Major
>
> Hi,
>  
> I'm afraid I don't have a reproducible case for this, but it's an issue we've 
> seen in the wild on customer's machines. I'd guess it's specific to Windows, 
> as other platforms don't support exclusive locks, and we've only ever seen it 
> reported from Windows users.
>  
> The `ConcurrentCache` in the stacktrace makes me wonder if Derby is able to 
> lock itself out of the database under the right conditions. Here's the trace:
>  
> {code:java}
> Caused by: java.sql.SQLException: Meta-data for unknown could not be accessed 
> to read 
> C:\Users\USER\.ScreamingFrogSEOSpider\ProjectInstanceData\6b422f28-46c9-492e-bbde-aeb5bc1e6307\results_10505723-008c-4b06-aa69-2c676ef858c8\sql\seg0\c71.dat
>   at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java)
>   at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java)
>   at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java)
>   at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java)
>   at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java)
>   at 
> org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java)
>   at 
> org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java)
>   at 
> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java)
>   at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java)
>   at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(EmbedPreparedStatement.java)
>   at 
> uk.co.screamingfrog.seospider.db.AbstractDuplicateTableOperations.getSpiderUrls(AbstractDuplicateTableOperations.java:152)
>   ... 17 more
> Caused by: ERROR XSDG3: Meta-data for unknown could not be accessed to read 
> C:\Users\USER\.ScreamingFrogSEOSpider\ProjectInstanceData\6b422f28-46c9-492e-bbde-aeb5bc1e6307\results_10505723-008c-4b06-aa69-2c676ef858c8\sql\seg0\c71.dat
>   at 
> org.apache.derby.iapi.error.StandardException.newException(StandardException.java)
>   at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory.java)
>   ... 28 more
> Caused by: java.io.FileNotFoundException: 
> C:\Users\USER\.ScreamingFrogSEOSpider\ProjectInstanceData\6b422f28-46c9-492e-bbde-aeb5bc1e6307\results_10505723-008c-4b06-aa69-2c676ef858c8\sql\seg0\c71.dat
>  (The process cannot access the file because it is being used by another 
> process)
>   at java.base/java.io.RandomAccessFile.open0(Native Method)
>   at java.base/java.io.RandomAccessFile.open(Unknown Source)
>   at java.base/java.io.RandomAccessFile.(Unknown Source)
>   at java.base/java.io.RandomAccessFile.(Unknown Source)
>   at 
> org.apache.derby.impl.io.DirRandomAccessFile.(DirRandomAccessFile.java)
>   at org.apache.derby.impl.io.DirFile.getRandomAccessFile(DirFile.java)
>   at 
> org.apache.derby.impl.store.raw.data.RAFContainer.run(RAFContainer.java)
>   at java.base/java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.derby.impl.store.raw.data.RAFContainer.openContainer(RAFContainer.java)
>   at 
> org.apache.derby.impl.store.raw.data.RAFContainer4.openContainer(RAFContainer4.java)
>   at 
> org.apache.derby.impl.store.raw.data.FileContainer.setIdent(FileContainer.java)
>   at 
> org.apache.derby.impl.store.raw.data.FileContainer.setIdentity(FileContainer.java)
>   at 
> org.apache.derby.impl.services.cache.ConcurrentCache.find(ConcurrentCache.java)
>   at 
> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(BaseDataFileFactory.java)
>   at 
> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(BaseDataFileFactory.java)
>   at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Xact.java)
>   at 
> 

[jira] [Commented] (DERBY-7116) Meta-data for unknown could not be accessed to read

2021-05-12 Thread Sam Hutchins (Jira)


[ 
https://issues.apache.org/jira/browse/DERBY-7116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17343237#comment-17343237
 ] 

Sam Hutchins commented on DERBY-7116:
-

Hi,

 

We're using Derby embedded in consumer 'shrink wrapped' software, so the 
database is just running as the whatever user launched the program. While I 
guess it's technically possible to make the database run as some kind of system 
service under a different user, it would be quite the undertaking to implement 
and isn't really a viable solution. Thankfully it's a rare issue on customer 
machines, so I guess we'll have to live with it for now

 

Thanks

> Meta-data for unknown could not be accessed to read
> ---
>
> Key: DERBY-7116
> URL: https://issues.apache.org/jira/browse/DERBY-7116
> Project: Derby
>  Issue Type: Bug
>  Components: SQL, Store
>Affects Versions: 10.14.2.0
> Environment: Windows 10
>Reporter: Sam Hutchins
>Priority: Major
>
> Hi,
>  
> I'm afraid I don't have a reproducible case for this, but it's an issue we've 
> seen in the wild on customer's machines. I'd guess it's specific to Windows, 
> as other platforms don't support exclusive locks, and we've only ever seen it 
> reported from Windows users.
>  
> The `ConcurrentCache` in the stacktrace makes me wonder if Derby is able to 
> lock itself out of the database under the right conditions. Here's the trace:
>  
> {code:java}
> Caused by: java.sql.SQLException: Meta-data for unknown could not be accessed 
> to read 
> C:\Users\USER\.ScreamingFrogSEOSpider\ProjectInstanceData\6b422f28-46c9-492e-bbde-aeb5bc1e6307\results_10505723-008c-4b06-aa69-2c676ef858c8\sql\seg0\c71.dat
>   at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java)
>   at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java)
>   at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java)
>   at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java)
>   at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java)
>   at 
> org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java)
>   at 
> org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java)
>   at 
> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java)
>   at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java)
>   at 
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(EmbedPreparedStatement.java)
>   at 
> uk.co.screamingfrog.seospider.db.AbstractDuplicateTableOperations.getSpiderUrls(AbstractDuplicateTableOperations.java:152)
>   ... 17 more
> Caused by: ERROR XSDG3: Meta-data for unknown could not be accessed to read 
> C:\Users\USER\.ScreamingFrogSEOSpider\ProjectInstanceData\6b422f28-46c9-492e-bbde-aeb5bc1e6307\results_10505723-008c-4b06-aa69-2c676ef858c8\sql\seg0\c71.dat
>   at 
> org.apache.derby.iapi.error.StandardException.newException(StandardException.java)
>   at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory.java)
>   ... 28 more
> Caused by: java.io.FileNotFoundException: 
> C:\Users\USER\.ScreamingFrogSEOSpider\ProjectInstanceData\6b422f28-46c9-492e-bbde-aeb5bc1e6307\results_10505723-008c-4b06-aa69-2c676ef858c8\sql\seg0\c71.dat
>  (The process cannot access the file because it is being used by another 
> process)
>   at java.base/java.io.RandomAccessFile.open0(Native Method)
>   at java.base/java.io.RandomAccessFile.open(Unknown Source)
>   at java.base/java.io.RandomAccessFile.(Unknown Source)
>   at java.base/java.io.RandomAccessFile.(Unknown Source)
>   at 
> org.apache.derby.impl.io.DirRandomAccessFile.(DirRandomAccessFile.java)
>   at org.apache.derby.impl.io.DirFile.getRandomAccessFile(DirFile.java)
>   at 
> org.apache.derby.impl.store.raw.data.RAFContainer.run(RAFContainer.java)
>   at java.base/java.security.AccessController.doPrivileged(Native Method)
>   at 
> org.apache.derby.impl.store.raw.data.RAFContainer.openContainer(RAFContainer.java)
>   at 
> org.apache.derby.impl.store.raw.data.RAFContainer4.openContainer(RAFContainer4.java)
>   at 
> org.apache.derby.impl.store.raw.data.FileContainer.setIdent(FileContainer.java)
>   at 
> org.apache.derby.impl.store.raw.data.FileContainer.setIdentity(FileContainer.java)
>   at 
> org.apache.derby.impl.services.cache.ConcurrentCache.find(ConcurrentCache.java)
>   at 
> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(BaseDataFileFactory.java)
>   at 
> 

[jira] [Created] (DERBY-7116) Meta-data for unknown could not be accessed to read

2021-05-11 Thread Sam Hutchins (Jira)
Sam Hutchins created DERBY-7116:
---

 Summary: Meta-data for unknown could not be accessed to read
 Key: DERBY-7116
 URL: https://issues.apache.org/jira/browse/DERBY-7116
 Project: Derby
  Issue Type: Bug
Affects Versions: 10.14.2.0
 Environment: Windows 10
Reporter: Sam Hutchins


Hi,

 

I'm afraid I don't have a reproducible case for this, but it's an issue we've 
seen in the wild on customer's machines. I'd guess it's specific to Windows, as 
other platforms don't support exclusive locks, and we've only ever seen it 
reported from Windows users.

 

The `ConcurrentCache` in the stacktrace makes me wonder if Derby is able to 
lock itself out of the database under the right conditions. Here's the trace:

 
{code:java}
Caused by: java.sql.SQLException: Meta-data for unknown could not be accessed 
to read 
C:\Users\USER\.ScreamingFrogSEOSpider\ProjectInstanceData\6b422f28-46c9-492e-bbde-aeb5bc1e6307\results_10505723-008c-4b06-aa69-2c676ef858c8\sql\seg0\c71.dat
at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java)
at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java)
at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java)
at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java)
at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java)
at 
org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java)
at 
org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java)
at 
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java)
at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java)
at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(EmbedPreparedStatement.java)
at 
uk.co.screamingfrog.seospider.db.AbstractDuplicateTableOperations.getSpiderUrls(AbstractDuplicateTableOperations.java:152)
... 17 more
Caused by: ERROR XSDG3: Meta-data for unknown could not be accessed to read 
C:\Users\USER\.ScreamingFrogSEOSpider\ProjectInstanceData\6b422f28-46c9-492e-bbde-aeb5bc1e6307\results_10505723-008c-4b06-aa69-2c676ef858c8\sql\seg0\c71.dat
at 
org.apache.derby.iapi.error.StandardException.newException(StandardException.java)
at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory.java)
... 28 more
Caused by: java.io.FileNotFoundException: 
C:\Users\USER\.ScreamingFrogSEOSpider\ProjectInstanceData\6b422f28-46c9-492e-bbde-aeb5bc1e6307\results_10505723-008c-4b06-aa69-2c676ef858c8\sql\seg0\c71.dat
 (The process cannot access the file because it is being used by another 
process)
at java.base/java.io.RandomAccessFile.open0(Native Method)
at java.base/java.io.RandomAccessFile.open(Unknown Source)
at java.base/java.io.RandomAccessFile.(Unknown Source)
at java.base/java.io.RandomAccessFile.(Unknown Source)
at 
org.apache.derby.impl.io.DirRandomAccessFile.(DirRandomAccessFile.java)
at org.apache.derby.impl.io.DirFile.getRandomAccessFile(DirFile.java)
at 
org.apache.derby.impl.store.raw.data.RAFContainer.run(RAFContainer.java)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at 
org.apache.derby.impl.store.raw.data.RAFContainer.openContainer(RAFContainer.java)
at 
org.apache.derby.impl.store.raw.data.RAFContainer4.openContainer(RAFContainer4.java)
at 
org.apache.derby.impl.store.raw.data.FileContainer.setIdent(FileContainer.java)
at 
org.apache.derby.impl.store.raw.data.FileContainer.setIdentity(FileContainer.java)
at 
org.apache.derby.impl.services.cache.ConcurrentCache.find(ConcurrentCache.java)
at 
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(BaseDataFileFactory.java)
at 
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(BaseDataFileFactory.java)
at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Xact.java)
at 
org.apache.derby.impl.store.access.btree.OpenBTree.init(OpenBTree.java)
at 
org.apache.derby.impl.store.access.btree.BTreeScan.init(BTreeScan.java)
at 
org.apache.derby.impl.store.access.btree.index.B2IForwardScan.init(B2IForwardScan.java)
at org.apache.derby.impl.store.access.btree.index.B2I.openScan(B2I.java)
at 
org.apache.derby.impl.store.access.RAMTransaction.openScan(RAMTransaction.java)
at 
org.apache.derby.impl.store.access.RAMTransaction.openScan(RAMTransaction.java)
at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getDescriptorViaIndexMinion(DataDictionaryImpl.java)
at 

[jira] [Commented] (DERBY-7114) class org.apache.derby.iapi.store.raw.PageKey cannot be cast to class org.apache.derby.iapi.store.raw.ContainerKey

2021-04-19 Thread Sam Hutchins (Jira)


[ 
https://issues.apache.org/jira/browse/DERBY-7114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17324775#comment-17324775
 ] 

Sam Hutchins commented on DERBY-7114:
-

We updated our products to Java 11 a little while ago, but I have managed to 
dig out an example from before that change. This is from an older version of 
the same product, still with Derby 10.14.2.0 and Java 1.8_161:

 
{code:java}
 Caused by: java.sql.SQLException: Java exception: 
'org.apache.derby.iapi.store.raw.PageKey cannot be cast to 
org.apache.derby.iapi.store.raw.ContainerKey: java.lang.ClassCastException'.
at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java)
at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java)
at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java)
at org.apache.derby.impl.jdbc.Util.javaException(Util.java)
at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java)
at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java)
at 
org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java)
at 
org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java)
at 
org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(EmbedResultSet.java)
at 
org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(EmbedResultSet.java)
at org.apache.derby.impl.jdbc.EmbedResultSet.next(EmbedResultSet.java)
at 
uk.co.screamingfrog.seospider.db.LinksTableOperations.getLinks(LinksTableOperations.java:257)
... 15 more
Caused by: ERROR XJ001: Java exception: 
'org.apache.derby.iapi.store.raw.PageKey cannot be cast to 
org.apache.derby.iapi.store.raw.ContainerKey: java.lang.ClassCastException'.
at 
org.apache.derby.iapi.error.StandardException.newException(StandardException.java)
at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory.java)
... 27 more
Caused by: java.lang.ClassCastException: 
org.apache.derby.iapi.store.raw.PageKey cannot be cast to 
org.apache.derby.iapi.store.raw.ContainerKey
at 
org.apache.derby.impl.store.raw.data.FileContainer.setIdentity(FileContainer.java)
at 
org.apache.derby.impl.services.cache.ConcurrentCache.find(ConcurrentCache.java)
at 
org.apache.derby.impl.store.raw.data.FileContainer.getUserPage(FileContainer.java)
at 
org.apache.derby.impl.store.raw.data.FileContainer.getPage(FileContainer.java)
at 
org.apache.derby.impl.store.raw.data.BaseContainerHandle.getPage(BaseContainerHandle.java)
at 
org.apache.derby.impl.store.access.btree.ControlRow.get(ControlRow.java)
at 
org.apache.derby.impl.store.access.btree.ControlRow.get(ControlRow.java)
at 
org.apache.derby.impl.store.access.btree.BranchControlRow.getChildPageAtSlot(BranchControlRow.java)
at 
org.apache.derby.impl.store.access.btree.BranchControlRow.search(BranchControlRow.java)
at 
org.apache.derby.impl.store.access.btree.BranchControlRow.search(BranchControlRow.java)
at 
org.apache.derby.impl.store.access.btree.BTreeScan.positionAtStartForForwardScan(BTreeScan.java)
at 
org.apache.derby.impl.store.access.btree.BTreeForwardScan.positionAtStartPosition(BTreeForwardScan.java)
at 
org.apache.derby.impl.store.access.btree.BTreeForwardScan.fetchRows(BTreeForwardScan.java)
at 
org.apache.derby.impl.store.access.btree.BTreeScan.fetchNext(BTreeScan.java)
at 
org.apache.derby.impl.sql.execute.TableScanResultSet.loopControl(TableScanResultSet.java)
at 
org.apache.derby.impl.sql.execute.TableScanResultSet.getNextRowCore(TableScanResultSet.java)
at 
org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.getNextRowCore(IndexRowToBaseRowResultSet.java)
at 
org.apache.derby.impl.sql.execute.NestedLoopJoinResultSet.getNextRowCore(NestedLoopJoinResultSet.java)
at 
org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(BasicNoPutResultSetImpl.java)
... 18 more{code}

> class org.apache.derby.iapi.store.raw.PageKey cannot be cast to class 
> org.apache.derby.iapi.store.raw.ContainerKey
> --
>
> Key: DERBY-7114
> URL: https://issues.apache.org/jira/browse/DERBY-7114
> Project: Derby
>  Issue Type: Bug
>Affects Versions: 10.14.2.0
> Environment: Java 8/11, Windows/macOS
>Reporter: Sam Hutchins
>Priority: Major
>
> Hi,
>  
> We're using the embedded driver, and we sometimes see this exception in the 
> wild:
>  
> {code:java}
> 

[jira] [Created] (DERBY-7114) class org.apache.derby.iapi.store.raw.PageKey cannot be cast to class org.apache.derby.iapi.store.raw.ContainerKey

2021-04-16 Thread Sam Hutchins (Jira)
Sam Hutchins created DERBY-7114:
---

 Summary: class org.apache.derby.iapi.store.raw.PageKey cannot be 
cast to class org.apache.derby.iapi.store.raw.ContainerKey
 Key: DERBY-7114
 URL: https://issues.apache.org/jira/browse/DERBY-7114
 Project: Derby
  Issue Type: Bug
Affects Versions: 10.14.2.0
 Environment: Java 8/11, Windows/macOS
Reporter: Sam Hutchins


Hi,

 

We're using the embedded driver, and we sometimes see this exception in the 
wild:

 
{code:java}
java.lang.RuntimeException: java.sql.SQLException: Java exception: 'class 
org.apache.derby.iapi.store.raw.PageKey cannot be cast to class 
org.apache.derby.iapi.store.raw.ContainerKey 
(org.apache.derby.iapi.store.raw.PageKey and 
org.apache.derby.iapi.store.raw.ContainerKey are in unnamed module of loader 
'app'): java.lang.ClassCastException'.java.lang.RuntimeException: 
java.sql.SQLException: Java exception: 'class 
org.apache.derby.iapi.store.raw.PageKey cannot be cast to class 
org.apache.derby.iapi.store.raw.ContainerKey 
(org.apache.derby.iapi.store.raw.PageKey and 
org.apache.derby.iapi.store.raw.ContainerKey are in unnamed module of loader 
'app'): java.lang.ClassCastException'. at 
uk.co.screamingfrog.db.utils.DBHelpers.handleSQLException(SourceFile:68) 
~[dbutils-1.0-SNAPSHOT.jar:?] at 
uk.co.screamingfrog.seospider.db.LinksTableOperations.a(SourceFile:341) 
~[ScreamingFrogSEOSpider.jar:?] at 
uk.co.screamingfrog.seospider.db.LinksTableOperations.b(SourceFile:215) 
~[ScreamingFrogSEOSpider.jar:?] at 
uk.co.screamingfrog.seospider.storage.db.k.c(SourceFile:82) 
~[ScreamingFrogSEOSpider.jar:?] at java.util.HashMap.computeIfAbsent(Unknown 
Source) ~[?:?] at uk.co.screamingfrog.seospider.storage.db.k.b(SourceFile:76) 
~[ScreamingFrogSEOSpider.jar:?] at 
uk.co.screamingfrog.seospider.storage.db.k.a(SourceFile:41) 
~[ScreamingFrogSEOSpider.jar:?] at 
uk.co.screamingfrog.seospider.g.f.b(SourceFile:184) 
~[ScreamingFrogSEOSpider.jar:?] at 
uk.co.screamingfrog.seospider.g.f.a(SourceFile:81) 
~[ScreamingFrogSEOSpider.jar:?] at 
uk.co.screamingfrog.seospider.g.f.f(SourceFile:56) 
~[ScreamingFrogSEOSpider.jar:?] at 
uk.co.screamingfrog.seospider.g.m.h_(SourceFile:58) 
~[ScreamingFrogSEOSpider.jar:?] at 
uk.co.screamingfrog.seospider.h.d.c(SourceFile:22) 
~[ScreamingFrogSEOSpider.jar:?] at 
uk.co.screamingfrog.seospider.h.e.c(SourceFile:66) 
~[ScreamingFrogSEOSpider.jar:?] at seo.spider.spider.a.n(SourceFile:114) 
~[ScreamingFrogSEOSpider.jar:?] at seo.spider.spider.a.k(SourceFile:91) 
~[ScreamingFrogSEOSpider.jar:?] at 
uk.co.screamingfrog.utils.utils.PriorityRunnable.run(SourceFile:25) 
~[utils-1.0-SNAPSHOT.jar:?] at 
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?] at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?] at 
java.lang.Thread.run(Unknown Source) [?:?]Caused by: java.sql.SQLException: 
Java exception: 'class org.apache.derby.iapi.store.raw.PageKey cannot be cast 
to class org.apache.derby.iapi.store.raw.ContainerKey 
(org.apache.derby.iapi.store.raw.PageKey and 
org.apache.derby.iapi.store.raw.ContainerKey are in unnamed module of loader 
'app'): java.lang.ClassCastException'. at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) 
~[derby-10.14.2.0.jar:?] at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) 
~[derby-10.14.2.0.jar:?] at 
org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source) 
~[derby-10.14.2.0.jar:?] at 
org.apache.derby.impl.jdbc.Util.javaException(Unknown Source) 
~[derby-10.14.2.0.jar:?] at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
Source) ~[derby-10.14.2.0.jar:?] at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown 
Source) ~[derby-10.14.2.0.jar:?] at 
org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) 
~[derby-10.14.2.0.jar:?] at 
org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) 
~[derby-10.14.2.0.jar:?] at 
org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown 
Source) ~[derby-10.14.2.0.jar:?] at 
org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown Source) 
~[derby-10.14.2.0.jar:?] at 
org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source) 
~[derby-10.14.2.0.jar:?] at 
uk.co.screamingfrog.seospider.db.LinksTableOperations.a(SourceFile:314) 
~[ScreamingFrogSEOSpider.jar:?] ... 17 moreCaused by: 
org.apache.derby.iapi.error.StandardException: Java exception: 'class 
org.apache.derby.iapi.store.raw.PageKey cannot be cast to class 
org.apache.derby.iapi.store.raw.ContainerKey 
(org.apache.derby.iapi.store.raw.PageKey and 
org.apache.derby.iapi.store.raw.ContainerKey are in unnamed module of loader 
'app'): java.lang.ClassCastException'. at 
org.apache.derby.iapi.error.StandardException.newException(Unknown Source)