Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-275

Streaming result without result throw "Current position is before the first row"

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 1.4.0, 1.4.1
    • 1.4.2
    • Other
    • None

    Description

      message from Huber Greg Huber
      Hello,
      I am using quartz scheduler and get this error when upgrading to 1.4. (1.3.7 works OK). Any ideas?
      2016-04-07 14:38:40,946 ERROR org.quartz.core.ErrorLogger ErrorLogger:schedulerError - An error occurred while scanning for the next triggers to fire.
      org.quartz.JobPersistenceException: Couldn't acquire next trigger: Current position is before the first row
      at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2860) ~[quartz-2.2.2.jar:?]
      at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2759) ~[quartz-2.2.2.jar:?]
      at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2757) ~[quartz-2.2.2.jar:?]
      at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3799) ~[quartz-2.2.2.jar:?]
      at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2756) ~[quartz-2.2.2.jar:?]
      at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:272) [quartz-2.2.2.jar:?]
      Caused by: java.sql.SQLDataException: Current position is before the first row
      at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:115) ~[mariadb-java-client-1.4.0.jar:?]
      at org.mariadb.jdbc.internal.util.ExceptionMapper.throwException(ExceptionMapper.java:69) ~[mariadb-java-client-1.4.0.jar:?]
      at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.throwError(MariaSelectResultSet.java:553) ~[mariadb-java-client-1.4.0.jar:?]
      at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.checkObjectRange(MariaSelectResultSet.java:536) ~[mariadb-java-client-1.4.0.jar:?]
      at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.getString(MariaSelectResultSet.java:811) ~[mariadb-java-client-1.4.0.jar:?]
      at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.getString(MariaSelectResultSet.java:819) ~[mariadb-java-client-1.4.0.jar:?]
      at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:263) ~[commons-dbcp-1.4.jar:1.4]
      at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:263) ~[commons-dbcp-1.4.jar:1.4]
      at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTriggerToAcquire(StdJDBCDelegate.java:2616) ~[quartz-2.2.2.jar:?]
      at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2800) ~[quartz-2.2.2.jar:?]
      ... 5 more
      Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Current position is before the first row
      at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.throwError(MariaSelectResultSet.java:553) ~[mariadb-java-client-1.4.0.jar:?]
      at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.checkObjectRange(MariaSelectResultSet.java:536) ~[mariadb-java-client-1.4.0.jar:?]
      at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.getString(MariaSelectResultSet.java:811) ~[mariadb-java-client-1.4.0.jar:?]
      at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.getString(MariaSelectResultSet.java:819) ~[mariadb-java-client-1.4.0.jar:?]
      at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:263) ~[commons-dbcp-1.4.jar:1.4]
      at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:263) ~[commons-dbcp-1.4.jar:1.4]
      at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTriggerToAcquire(StdJDBCDelegate.java:2616) ~[quartz-2.2.2.jar:?]
      at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2800) ~[quartz-2.2.2.jar:?]
      ... 5 more

      Attachments

        Activity

          diego dupin Diego Dupin added a comment -

          When using streaming (Statement.setFetchSize) with no result, resultset.next() will return true.
          Accessing data will throw an SQLDataException "Current position is before the first row".

          if you use maven, correction is available by

          <repositories>
              <repository>
                  <id>sonatype-nexus-snapshots</id>
                  <name>Sonatype Nexus Snapshots</name>
                  <url>https://oss.sonatype.org/content/repositories/snapshots</url>
              </repository>
          </repositories>
           
          <dependencies>
              <dependency>
                  <groupId>org.mariadb.jdbc</groupId>
                  <artifactId>mariadb-java-client</artifactId>
                  <version>1.4.2-SNAPSHOT</version>
              </dependency>
          </dependencies>
          

          This is a critical issue, so as soon as you confirm the correction, a new release will be created

          diego dupin Diego Dupin added a comment - When using streaming (Statement.setFetchSize ) with no result, resultset.next() will return true. Accessing data will throw an SQLDataException "Current position is before the first row". if you use maven, correction is available by <repositories> <repository> <id>sonatype-nexus-snapshots</id> <name>Sonatype Nexus Snapshots</name> <url>https: //oss.sonatype.org/content/repositories/snapshots</url> </repository> </repositories>   <dependencies> <dependency> <groupId>org.mariadb.jdbc</groupId> <artifactId>mariadb-java-client</artifactId> <version> 1.4 . 2 -SNAPSHOT</version> </dependency> </dependencies> This is a critical issue, so as soon as you confirm the correction, a new release will be created
          Huber Greg Huber added a comment -

          OK, great, have tested it and now starts with no errors. Thanks.

          Huber Greg Huber added a comment - OK, great, have tested it and now starts with no errors. Thanks.

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.