java.sql.SQLException: The 'getRow()' method is only allowed on scroll cursors.

Spring JIRA | Robert Kasanicky | 9 years ago
  1. 0

    What DBMS to use for portability when downloading?

    Oracle Community | 10 years ago | 807607
    java.sql.SQLException: The 'getRow()' method is only allowed on scroll cursors.
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Spring Batch JdbcPagingItemReader seems not paginating

    Stack Overflow | 1 year ago | Jose Villaveces
    java.sql.SQLException: The 'getRow()' method is only allowed on scroll cursors.
  4. 0

    When working with sqlite datasource fetching paged results works only for first page. When trying to fetch second and further I get: {code} java.sql.SQLException: SQLite only supports TYPE_FORWARD_ONLY cursors at org.sqlite.core.CoreConnection.checkCursor(CoreConnection.java:278) at org.sqlite.jdbc4.JDBC4Connection.prepareStatement(JDBC4Connection.java:45) at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:251) at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:275) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1550) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1505) at org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:778) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:619) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:558) at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1991) at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:299) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:694) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2738) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2691) at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:495) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1168) at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:899) at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1127) at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:403) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1215) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1793) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1775) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1740) at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:258) at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:469) at org.springframework.data.jpa.repository.support.SimpleJpaRepository.readPage(SimpleJpaRepository.java:434) at org.springframework.data.jpa.repository.support.SimpleJpaRepository.findAll(SimpleJpaRepository.java:332) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:358) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:343) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.data.jpa.repository.support.LockModeRepositoryPostProcessor$LockModePopulatingMethodIntercceptor.invoke(LockModeRepositoryPostProcessor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy31.findAll(Unknown Source) ... {code} I am using a repository method defined like: {code:java} Page<T> findAll(Specification<T> s, Pageable pgbl); {code}

    Spring JIRA | 2 years ago | Maciej Lizewski
    java.sql.SQLException: SQLite only supports TYPE_FORWARD_ONLY cursors

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      The 'getRow()' method is only allowed on scroll cursors.

      at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException()
    2. Derby
      EmbedResultSet.getRow
      1. org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
      2. org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
      3. org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
      4. org.apache.derby.impl.jdbc.EmbedResultSet.checkScrollCursor(Unknown Source)
      5. org.apache.derby.impl.jdbc.EmbedResultSet.getRow(Unknown Source)
      5 frames
    3. Commons DBCP
      DelegatingResultSet.getRow
      1. org.apache.commons.dbcp.DelegatingResultSet.getRow(DelegatingResultSet.java:331)
      1 frame
    4. Spring Batch Infrastructure
      JdbcCursorItemReader$BufferredResultSetReader.read
      1. org.springframework.batch.item.database.JdbcCursorItemReader$BufferredResultSetReader.read(JdbcCursorItemReader.java:475)
      1 frame