You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Bryan Pendleton (JIRA)" <ji...@apache.org> on 2016/11/24 16:34:58 UTC

[jira] [Commented] (DERBY-6917) NullPointerException on SortBuffer.removeFirst()

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

Bryan Pendleton commented on DERBY-6917:
----------------------------------------

I have no idea what's wrong, but have some general thoughts about things that might give clues:

- Does the pattern of test failures in your automated test suites give you any ideas about what might be special about the particular failing runs?
- Can you try different versions of Derby, to see if this is a new bug, and if so what release it might have been introduced in?
- Are there any other Derby-related errors that occur prior to this error in the failing run?
- Is there any chance that there is an out-of-resource problem occuring? For example, is there any chance that the test machine runs out of disk space during the run?
- If you configure your test system to give the Java Virtual Machine more memory, does that change the pattern of failures? What about if you give the JVM less memory?
- Are there multiple physical machines in your test automation system? Does the failure occur on every machine, or only on a single machine? Is there any chance there's a hardware issue here?
- Can you arrange to build a copy of Derby from source with sane=true and use that in your test automation system? This might do either of two things: (1) we might see a different failure mode because the sane=true builds include extra assertions and sanity checks in the code which might give a clearer message, and (2) we would get the exact line numbers in the source code where the problem is occurring
- Can you share any more details about the database schema of this database, and about the particular query that is run?

Sorry to not have any instant answers, but this is old, old code and has been extremely reliable, so I really don't have any good theories about what might be wrong.

> NullPointerException on SortBuffer.removeFirst()
> ------------------------------------------------
>
>                 Key: DERBY-6917
>                 URL: https://issues.apache.org/jira/browse/DERBY-6917
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, SQL
>    Affects Versions: 10.13.1.1
>         Environment: OS: Red Hat Linux 5.0
> JDK/JRE: 1.8.0_66-b17
> Working with HIbernate ORM
>            Reporter: Nir Oren
>
> While running simple select statement we got the following error:
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> The query we ran was from the following form:
> select this_.id as y0_, ...<more_attributes> from <table> this_ where this_.<some_attr>=<some_value> order by y0_ asc fetch first 1000 rows only
> Full Log and Stack Trace:
> ----------------------------------------------------------------
> Tue Nov 15 21:33:17 IST 2016:
> Booting Derby version The Apache Software Foundation - Apache Derby - 10.13.1.1 - (1765088): instance a816c00e-0158-697a-aef3-0000427a785d 
> on database directory /local/ntr/vlnx577.159043/local_server/vmgr.db with class loader sun.misc.Launcher$AppClassLoader@312b1dae 
> Loaded from file:/view/niroren_ngv_dev_vm_fst_upgrade_derby_pb/vobs/dvproject/.m2/repository/org/apache/derby/derby/10.13.1.1/derby-10.13.1.1.jar
> java.vendor=Oracle Corporation
> java.runtime.version=1.8.0_66-b17
> user.dir=/local/ntr/vlnx577.159043
> os.name=Linux
> os.arch=amd64
> os.version=2.6.32-431.11.2.el6.x86_64
> derby.system.home=/local/ntr/vlnx577.159043/local_server
> Database Class Loader started - derby.database.classpath=''
> ----------------------------------------------------------------
> Tue Nov 15 21:33:35 IST 2016:
> Shutting down instance a816c00e-0158-697a-aef3-0000427a785d on database directory /local/ntr/vlnx577.159043/local_server/vmgr.db with class loader sun.misc.Launcher$AppClassLoader@312b1dae 
> ----------------------------------------------------------------
> Tue Nov 15 21:33:39 IST 2016:
> Booting Derby version The Apache Software Foundation - Apache Derby - 10.13.1.1 - (1765088): instance 0a0c9f2c-0158-697a-aef3-0000427a785d 
> on database directory /local/ntr/vlnx577.159043/local_server/vmgr.db with class loader sun.misc.Launcher$AppClassLoader@312b1dae 
> Loaded from file:/view/niroren_ngv_dev_vm_fst_upgrade_derby_pb/vobs/dvproject/.m2/repository/org/apache/derby/derby/10.13.1.1/derby-10.13.1.1.jar
> java.vendor=Oracle Corporation
> java.runtime.version=1.8.0_66-b17
> user.dir=/local/ntr/vlnx577.159043
> os.name=Linux
> os.arch=amd64
> os.version=2.6.32-431.11.2.el6.x86_64
> derby.system.home=/local/ntr/vlnx577.159043/local_server
> Database Class Loader started - derby.database.classpath=''
> Tue Nov 15 22:09:07 IST 2016 Thread[pool-11-thread-9,5,main] (XID = 14429), (SESSIONID = 3), (DATABASE = vmgr.db), (DRDAID = null), Cleanup action starting
> Tue Nov 15 22:09:07 IST 2016 Thread[pool-11-thread-9,5,main] (XID = 14429), (SESSIONID = 3), (DATABASE = vmgr.db), (DRDAID = null), Failed Statement is: select this_.id as y0_, ... from .... this_ where ... order by y0_ asc fetch first 1000 rows only with 1 parameters begin parameter #1: .... :end parameter 
> java.lang.NullPointerException
> 	at org.apache.derby.impl.store.access.sort.SortBuffer.removeFirst(Unknown Source)
> 	at org.apache.derby.impl.store.access.sort.SortBufferScan.next(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.getRowFromSorter(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.getNextRowFromRS(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.SortResultSet.getNextRowCore(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.RowCountResultSet.getNextRowCore(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 com.mchange.v2.c3p0.impl.NewProxyResultSet.next(NewProxyResultSet.java:684)
> 	at org.hibernate.loader.Loader.processResultSet(Loader.java:975)
> 	at org.hibernate.loader.Loader.doQuery(Loader.java:937)
> 	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:343)
> 	at org.hibernate.loader.Loader.doList(Loader.java:2609)
> 	at org.hibernate.loader.Loader.doList(Loader.java:2592)
> 	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2424)
> 	at org.hibernate.loader.Loader.list(Loader.java:2419)
> 	at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:109)
> 	at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1855)
> 	at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:365)
> 	at ....... <application_code>
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
> 	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> 	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
> 	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
> 	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
> 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
> 	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
> 	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
> 	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
> 	at com.sun.proxy.$Proxy73.find(Unknown Source)
>         at ...... <application_code>
> 	at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at javax.swing.SwingWorker.run(SwingWorker.java:334)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> Cleanup action completed
> This failure, however, is not consistent and occures during our nightly regression, when the same database query is executed multiple times.
> Regards,
> Nir



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)