java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid call to ResultSet.Relative because there is no current row.

Jive Software Open Source | Derek DeMoro | 1 decade ago
  1. 0

    An exception is thrown when trying to call resultSet.relative while retrieving next batch of users in Sql Server via the UserManager. It looks like it may be SQL Server 2000-specific. There is a related exception in the logs: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid call to ResultSet.Relative because there is no current row. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.relative(Unknown Source) at org.jivesoftware.database.DbConnectionManager.scrollResultSet(DbConnectionManager.java:293) at org.jivesoftware.wildfire.user.DefaultUserProvider.getUsers(DefaultUserProvider.java:238) at org.jivesoftware.wildfire.user.UserManager.getUsers(UserManager.java:196) at org.jivesoftware.wildfire.admin.user_002dsummary_jsp._jspService(user_002dsummary_jsp.java:214) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:688) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:822) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813) at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:43) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813) at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:41) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813) at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:494) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:569) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:624) at org.mortbay.http.HttpContext.handle(HttpContext.java:1434) at org.mortbay.http.HttpServer.service(HttpServer.java:896) at org.mortbay.http.HttpConnection.service(HttpConnection.java:814) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:366) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

    JIRA | 1 decade ago | Derek DeMoro
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid call to ResultSet.Relative because there is no current row.
  2. 0

    An exception is thrown when trying to call resultSet.relative while retrieving next batch of users in Sql Server via the UserManager. It looks like it may be SQL Server 2000-specific. There is a related exception in the logs: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid call to ResultSet.Relative because there is no current row. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.relative(Unknown Source) at org.jivesoftware.database.DbConnectionManager.scrollResultSet(DbConnectionManager.java:293) at org.jivesoftware.wildfire.user.DefaultUserProvider.getUsers(DefaultUserProvider.java:238) at org.jivesoftware.wildfire.user.UserManager.getUsers(UserManager.java:196) at org.jivesoftware.wildfire.admin.user_002dsummary_jsp._jspService(user_002dsummary_jsp.java:214) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:688) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:822) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813) at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:43) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813) at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:41) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813) at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:494) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:569) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:624) at org.mortbay.http.HttpContext.handle(HttpContext.java:1434) at org.mortbay.http.HttpServer.service(HttpServer.java:896) at org.mortbay.http.HttpConnection.service(HttpConnection.java:814) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:366) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

    Jive Software Open Source | 1 decade ago | Derek DeMoro
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid call to ResultSet.Relative because there is no current row.
  3. 0

    An exception is thrown when trying to call resultSet.relative while retrieving next batch of users in Sql Server via the UserManager. It looks like it may be SQL Server 2000-specific. There is a related exception in the logs: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid call to ResultSet.Relative because there is no current row. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.relative(Unknown Source) at org.jivesoftware.database.DbConnectionManager.scrollResultSet(DbConnectionManager.java:293) at org.jivesoftware.wildfire.user.DefaultUserProvider.getUsers(DefaultUserProvider.java:238) at org.jivesoftware.wildfire.user.UserManager.getUsers(UserManager.java:196) at org.jivesoftware.wildfire.admin.user_002dsummary_jsp._jspService(user_002dsummary_jsp.java:214) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:688) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:822) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813) at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:43) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813) at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:41) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813) at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:494) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:569) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:624) at org.mortbay.http.HttpContext.handle(HttpContext.java:1434) at org.mortbay.http.HttpServer.service(HttpServer.java:896) at org.mortbay.http.HttpConnection.service(HttpConnection.java:814) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:366) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

    JIRA | 1 decade ago | Derek DeMoro
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid call to ResultSet.Relative because there is no current row.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    There is no process to read data written to a pipe.

    Google Groups | 10 years ago | Unknown author
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]There is no process to read data written to a pipe.
  6. 0

    If you have in your mappings set fetch="join" and order-by="" for child collection like in this mapping: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" > <hibernate-mapping package="test.model"> <class name="Cat" table="CAT"> <id name="catId" column="CAT_ID" type="java.lang.Integer"> <generator class="native"/> </id> <property name="name" column="NAME" type="java.lang.String" /> <property name="color" column="COLOR" type="java.lang.String" /> <property name="gender" column="GENDER" type="java.lang.String" /> <set name="kittens" fetch="join" cascade="all-delete-orphan" inverse="true" order-by="name" > <key column="MOTHER_ID"/> <one-to-many class="Cat"/> </set> </class> </hibernate-mapping> adding Projection to criteria will have in a result incorrect query generated and execution will fail, like that: Hibernate: select count(*) as y0_ from CAT this_ left outer join CAT kittens2_ on this_.CAT_ID=kittens2_.MOTHER_ID where this_.COLOR=? order by kittens2_.name 14:12:45,163 ERROR JDBCExceptionReporter:72 - [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Column name 'kittens2_.NAME' is invalid in the ORDER BY clause because it is not contained in an aggregate function and there is no GROUP BY clause. org.hibernate.exception.GenericJDBCException: could not execute query at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.doList(Loader.java:1596) at org.hibernate.loader.Loader.list(Loader.java:1577) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:111) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1322) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:300) at test.test.Test.test(Test.java:62) at test.test.Test.main(Test.java:79) Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Column name 'kittens2_.NAME' is invalid in the ORDER BY clause because it is not contained in an aggregate function and there is no GROUP BY clause. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source) at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source) at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source) at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source) at com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source) at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source) at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source) at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:120) at org.hibernate.loader.Loader.getResultSet(Loader.java:1272) at org.hibernate.loader.Loader.doQuery(Loader.java:391) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218) at org.hibernate.loader.Loader.doList(Loader.java:1593) ... 6 more Source code for criteria is: List results = session.createCriteria(Cat.class) .setProjection( Projections.rowCount() ) .add( Restrictions.eq("color", "BLACK") ) .list(); If you remove fetch="join" everything works just fine. Even if you will use subcriteria with child attributes. Changes in any other attributes have no effect.

    Hibernate JIRA | 1 decade ago | Vasyl Zhabko
    org.hibernate.exception.GenericJDBCException: could not execute query

    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

      [Microsoft][SQLServer 2000 Driver for JDBC]Invalid call to ResultSet.Relative because there is no current row.

      at com.microsoft.jdbc.base.BaseExceptions.createException()
    2. com.microsoft.jdbc
      BaseResultSet.relative
      1. com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
      2. com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
      3. com.microsoft.jdbc.base.BaseResultSet.relative(Unknown Source)
      3 frames
    3. org.jivesoftware.database
      DbConnectionManager.scrollResultSet
      1. org.jivesoftware.database.DbConnectionManager.scrollResultSet(DbConnectionManager.java:293)
      1 frame
    4. org.jivesoftware.wildfire
      user_002dsummary_jsp._jspService
      1. org.jivesoftware.wildfire.user.DefaultUserProvider.getUsers(DefaultUserProvider.java:238)
      2. org.jivesoftware.wildfire.user.UserManager.getUsers(UserManager.java:196)
      3. org.jivesoftware.wildfire.admin.user_002dsummary_jsp._jspService(user_002dsummary_jsp.java:214)
      3 frames
    5. GWT dev
      HttpJspBase.service
      1. org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
      1 frame
    6. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
      1 frame
    7. Jetty Server
      WebApplicationHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
      2. org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:822)
      2 frames
    8. Sitemesh
      PageFilter.doFilter
      1. com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
      2. com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
      2 frames
    9. Jetty Server
      WebApplicationHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813)
      1 frame
    10. org.jivesoftware.util
      LocaleFilter.doFilter
      1. org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:43)
      1 frame
    11. Jetty Server
      WebApplicationHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813)
      1 frame
    12. org.jivesoftware.util
      SetCharacterEncodingFilter.doFilter
      1. org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:41)
      1 frame
    13. Jetty Server
      WebApplicationHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813)
      1 frame
    14. org.jivesoftware.admin
      AuthCheckFilter.doFilter
      1. org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98)
      1 frame
    15. Jetty Server
      ServletHandler.handle
      1. org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:813)
      2. org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:494)
      3. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:569)
      3 frames
    16. org.mortbay.http
      HttpContext.handle
      1. org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
      1 frame
    17. Jetty Server
      WebApplicationContext.handle
      1. org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:624)
      1 frame
    18. org.mortbay.http
      SocketListener.handleConnection
      1. org.mortbay.http.HttpContext.handle(HttpContext.java:1434)
      2. org.mortbay.http.HttpServer.service(HttpServer.java:896)
      3. org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
      4. org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)
      5. org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
      6. org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
      6 frames
    19. Jetty Util
      ThreadPool$PoolThread.run
      1. org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:366)
      2. org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
      2 frames