Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6917

NullPointerException on SortBuffer.removeFirst()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 10.13.1.1
    • None
    • JDBC, SQL
    • None
    • OS: Red Hat Linux 5.0
      JDK/JRE: 1.8.0_66-b17
      Working with HIbernate ORM
    • Urgent
    • Seen in production
    • Important

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            niroren Nir Oren
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: