powered by Jive Software

User summary (jTDS)

We´re using jTDS to connect our SQLServer and when we´re trying to navigate on pages of user summary the following error is thrown on error log and every other page except the first is empty:

2005.11.18 14:13:09 org.jivesoftware.messenger.user.DefaultUserProvider.getUsers(DefaultUserProvider .java:239)

java.sql.SQLException: ResultSet may only be accessed in a forward direction.

at net.sourceforge.jtds.jdbc.JtdsResultSet.checkScrollable(JtdsResultSet.java:312)

at net.sourceforge.jtds.jdbc.JtdsResultSet.relative(JtdsResultSet.java:707)

at org.jivesoftware.database.DbConnectionManager.scrollResultSet(DbConnectionManag er.java:293)

at org.jivesoftware.messenger.user.DefaultUserProvider.getUsers(DefaultUserProvide r.java:230)

at org.jivesoftware.messenger.user.UserManager.getUsers(UserManager.java:196)

at org.jivesoftware.messenger.admin.user_002dsummary_jsp._jspService(user_002dsumm ary_jsp.java:238)

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(WebApplica tionHandler.java:822)

at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:43)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:41)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.java:813)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98)

at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplica tionHandler.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.ja va: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)

We had almost the same problem using Microsoft JDBC driver for SQLServer.

Can anyone help us?

I think I found the problem:

DefaultUserProvider.java method getUsers on line 235 a new preparedStatment is created:

pstmt = con.prepareStatement(ALL_USERS);

But i think that this statment must be created using createScrollablePreparedStatement of the DbConnectionManager class, like this:

pstmt = DbConnectionManager.createScrollablePreparedStatement(con,ALL_USERS);

Beppler,

Thanks for the bug report and fix. I filed it as JM-468 and will get the fix into SVN.

-Matt

Hi,

I have the same problem, but with free JDBC driver provided by Microsoft. Can you help me?

Thanks,

Carlos Branco