db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Matrigali <mikem_...@sbcglobal.net>
Subject Re: Derby Errors with Apache Jackrabbit
Date Thu, 03 May 2007 20:11:05 GMT
The problem looks like Derby is encountering a bad pointer while
traversing a long column chain - likely a blob or clob column.  The
thing to narrow down is if this is a static problem in the existing
db, or some runtime issue with muliple threads of control accessing
(read/write) the data.  I have seen these types of issues in 
multi-threaded apps where multiple threads use the same connection (ie. 
same transaction) and one thread is in a select loop on a large object 
and another thread updates the same object breaking the linkage in the
middle.  locking will prevent this if threads use different transactions 
but not when using the same transaction.

Also are you using embedded or network version.

Can you reproduce the error, single threaded on a copy of the db?  You
can use logStatementText to get the exact value of ? in that statement
if you have some jackrabbit script that reproduces the problem.

Does anyone know how hard it would be to get the error statement to log
to derby.log the parameters of the statement?

The derby code should be checking for the -1 return, but not sure that
will help you as I think it doesn't expect it.
Steven Huey wrote:
> Hi,
> 
> I'm using Derby 10.2.1.6 with Apache Jackrabbit 1.2.3 and just  started 
> getting the following error in our derby.log file, which is  rendering 
> our Jackrabbit repository inaccessible. To date we've had  no problems 
> with Derby and it's been maintenance free so I'm not sure  how to 
> proceed to resolve the errors, any help is greatly appreciated.
> 
> Database Class Loader started - derby.database.classpath=''
> ----------------------------------------------------------------
> 2007-05-02 17:41:12.805 GMT:
> Booting Derby version The Apache Software Foundation - Apache Derby -  
> 10.2.1.6 - (452058): instance 6074401f-0112-4de1-629c-000000150808
> on database directory /opt/jcr/repository/workspaces/default/db
> 
> Database Class Loader started - derby.database.classpath=''
> 2007-05-02 17:41:59.626 GMT Thread 
> [DefaultQuartzScheduler_Worker-1,5,main] (XID = 28872), (SESSIONID =  
> 0), (DATABASE = /opt/jcr/repository/workspaces/default/db), (DRDAID =  
> null), Cleanup action starting
> 2007-05-02 17:41:59.626 GMT Thread 
> [DefaultQuartzScheduler_Worker-1,5,main] (XID = 28872), (SESSIONID =  
> 0), (DATABASE = /opt/jcr/repository/workspaces/default/db), (DRDAID =  
> null), Failed Statement is: select NODE_DATA from DEFAULT_NODE where  
> NODE_ID = ?
> java.lang.ArrayIndexOutOfBoundsException: -1
>     at org.apache.derby.impl.store.raw.data.BasePage.getHeaderAtSlot 
> (Unknown Source)
>     at  
> org.apache.derby.impl.store.raw.data.StoredPage.restorePortionLongColumn 
> (Unknown Source)
>     at  
> org.apache.derby.impl.store.raw.data.OverflowInputStream.fillByteHolder( 
> Unknown Source)
>     at org.apache.derby.impl.store.raw.data.OverflowInputStream.<init> 
> (Unknown Source)
>     at  
> org.apache.derby.impl.store.raw.data.StoredPage.readRecordFromArray 
> (Unknown Source)
>     at  
> org.apache.derby.impl.store.raw.data.StoredPage.restoreLongRecordFromSlo 
> t(Unknown Source)
>     at  
> org.apache.derby.impl.store.raw.data.StoredPage.restoreRecordFromSlot 
> (Unknown Source)
>     at org.apache.derby.impl.store.raw.data.BasePage.fetchFromSlot 
> (Unknown Source)
>     at  
> org.apache.derby.impl.store.access.conglomerate.GenericConglomerateContr 
> oller.fetch(Unknown Source)
>     at  
> org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.getNextRowC 
> ore(Unknown Source)
>     at  
> org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCor 
> e(Unknown Source)
>     at  
> org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow 
> (Unknown Source)
>     at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown  
> Source)
>     at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
>     at  
> org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.loa 
> d(DatabasePersistenceManager.java:339)
>     at  
> org.apache.jackrabbit.core.state.SharedItemStateManager.loadItemState 
> (SharedItemStateManager.java:1101)
>     at  
> org.apache.jackrabbit.core.state.SharedItemStateManager.getNonVirtualIte 
> mState(SharedItemStateManager.java:1028)
>     at  
> org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState 
> (SharedItemStateManager.java:250)
>     at  
> org.apache.jackrabbit.core.state.LocalItemStateManager.getNodeState 
> (LocalItemStateManager.java:95)
>     at  
> org.apache.jackrabbit.core.state.LocalItemStateManager.getItemState 
> (LocalItemStateManager.java:150)
>     at org.apache.jackrabbit.core.state.XAItemStateManager.getItemState 
> (XAItemStateManager.java:226)
>     at  
> org.apache.jackrabbit.core.state.SessionItemStateManager.getItemState 
> (SessionItemStateManager.java:177)
>     at org.apache.jackrabbit.core.HierarchyManagerImpl.getItemState 
> (HierarchyManagerImpl.java:120)
>     at org.apache.jackrabbit.core.HierarchyManagerImpl.resolvePath 
> (HierarchyManagerImpl.java:267)
>     at org.apache.jackrabbit.core.CachingHierarchyManager.resolvePath 
> (CachingHierarchyManager.java:132)
>     at org.apache.jackrabbit.core.HierarchyManagerImpl.resolvePath 
> (HierarchyManagerImpl.java:267)
>     at org.apache.jackrabbit.core.CachingHierarchyManager.resolvePath 
> (CachingHierarchyManager.java:132)
>     at org.apache.jackrabbit.core.HierarchyManagerImpl.resolvePath 
> (HierarchyManagerImpl.java:203)
>     at org.apache.jackrabbit.core.HierarchyManagerImpl.resolvePath 
> (HierarchyManagerImpl.java:341)
>     at org.apache.jackrabbit.core.CachingHierarchyManager.resolvePath 
> (CachingHierarchyManager.java:193)
>     at org.apache.jackrabbit.core.NodeImpl.resolveRelativeNodePath 
> (NodeImpl.java:243)
>     at org.apache.jackrabbit.core.NodeImpl.getNode(NodeImpl.java:2412)
>     at com.sparta.wcm.jobs.UpdateEmployeeList.initSession 
> (UpdateEmployeeList.java:181)
>     at com.sparta.wcm.jobs.UpdateEmployeeList.execute 
> (UpdateEmployeeList.java:97)
>     at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
>     at org.quartz.simpl.SimpleThreadPool$WorkerThread.run 
> (SimpleThreadPool.java:529)
> Cleanup action completed
> 
> 
> -- 
> 
> Steven Huey
> Steven.Huey@sparta.com
> 
> 
> 
> 
> 


Mime
View raw message