'ResultSet may only be accessed in a forward direction' error when trying to create content on Confluence 6 and SQL server
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
You are unable to create pages, spaces, blogs, file repos, or other content in Confluence. In the browser, you see a "Transaction rolled back because it has been marked as rollback-only" message when attempting to create content.
The following errors appear in the atlassian-confluence.log:
2017-03-30 15:30:11,122 ERROR [http-nio-8090-exec-4] [atlassian.confluence.event.ConfluenceEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.confluence.event.events.content.mail.notification.ContentNotificationAddedEvent[source=com.atlassian.confluence.mail.notification.DefaultNotificationManager@681f79df]] from the invoker [com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1@3b11d5e5]
-- referer: http://localhost:8090/display/NA/File | url: /rest/create-dialog/1.0/content-blueprint/create-content | traceId: 7cadfacfd2a2aa1 | userName: charlie
java.lang.RuntimeException: There was a SQL exception thrown by the Active Objects library:
Database:
- name:Microsoft SQL Server
- version:12.00.4100
- minor version:0
- major version:12
Driver:
- name:jTDS Type 4 JDBC Driver for MS SQL Server and Sybase
- version:1.3.1
java.sql.SQLException: ResultSet may only be accessed in a forward direction.
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:41)
at com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1.invoke(ConfluenceListenerHandlersConfiguration.java:69)
2017-03-30 15:59:05,497 ERROR [http-nio-8090-exec-4] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error :
-- referer: http://localhost:8090/plugins/createcontent/draft-createpage.action?draftId=12746756 | url: /rest/api/content/blueprint/instance/12746756 | traceId: 6c7b3adsf301ccaee5 | userName: charlie
org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
Diagnosis
Environment
- Confluence 6
- SQL Server
Diagnostic Steps
- Ensure the database is set up according to our guide: Database Setup for SQL Server.
- Ensure you are running a supported version of SQL Server: Supported Platforms.
Enable safe mode to see if this is a plugin issue.
Cause
SET NOCOUNT is enabled in SQL Server. This can cause some issues with Atlassian applications: JIRA error caused by SET NOCOUNT in MS SQL server.
Resolution
Setting NOCOUNT to OFF will resolve this issue:
- Connect to the SQL server Confluence database
Run the following:
SET NOCOUNT OFF
- Restart Confluence
- Try creating a page/space once more
- Go to -> General configuration -> Cache management
Scroll down and click on 'Flush all'
This will clear out the database cache in Confluence