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

Petr Slaby commented on DERBY-5936:
-----------------------------------

We get this exception from time to time at a customer site. The reason for it 
is always that a conglomerate (*.dat) contains data that were printed to 
standard error from an other part of the application. The Derby code that 
attempts to read some header information from that file is bound to fail as the 
file does not contain Derby data and is a text file instead. 

So far, I was not able to find who redirects stderr to the Derby conglomerate 
file. Is there a chance that Derby does this? I know it is unlikely and I did 
not find any hint in that direction when briefly scanning the Derby sources. On 
the other hand, Derby is the only one who knows the location of these files and 
their names. 

Embedded database, Derby version 10.10.2.0

> AllocPage.ReadContainerInfo throws ArrayIndexOutOfBoundsException at arraycopy
> ------------------------------------------------------------------------------
>
>                 Key: DERBY-5936
>                 URL: https://issues.apache.org/jira/browse/DERBY-5936
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.6.1.0
>         Environment: intel, windows XP, embedded driver, c3p0
>            Reporter: Yuan Yao
>              Labels: derby_triage10_12
>
> The db may not be closed normally. It throws following exceptions as starting.
> logs:
> {code}
> Caused by: java.lang.ArrayIndexOutOfBoundsException
>       at java.lang.System.arraycopy(Native Method)
>       at 
> org.apache.derby.impl.store.raw.data.AllocPage.ReadContainerInfo(Unknown 
> Source)
>       at 
> org.apache.derby.impl.store.raw.data.FileContainer.readHeader(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.RAFContainer4.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.ConcurrentCache.find(Unknown 
> Source)
>       at 
> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown
>  Source)
>       at 
> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openDroppedContainer(Unknown
>  Source)
>       at 
> org.apache.derby.impl.store.raw.xact.Xact.openDroppedContainer(Unknown Source)
>       at 
> org.apache.derby.impl.store.raw.data.ContainerBasicOperation.findContainer(Unknown
>  Source)
>       at 
> org.apache.derby.impl.store.raw.data.ContainerBasicOperation.needsRedo(Unknown
>  Source)
>       at org.apache.derby.impl.store.raw.log.FileLogger.redo(Unknown Source)
>       at org.apache.derby.impl.store.raw.log.LogToFile.recover(Unknown Source)
>       at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
>       at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown 
> Source)
>       at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown 
> Source)
>       at 
> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
>       at 
> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown 
> Source)
>       at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown 
> Source)
>       at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown 
> Source)
>       at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown 
> Source)
>       at 
> org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
>       at 
> org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown 
> Source)
>       at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
>       at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
>       at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown 
> Source)
>       at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown 
> Source)
>       at 
> org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
>       at 
> org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown
>  Source)
>       at 
> org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown
>  Source)
>       at 
> org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown
>  Source)
>       at 
> org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown 
> Source)
>       ... 24 more
> {code}
> I'd like to upload data files if necessary.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to