'ResultSet may only be accessed in a forward direction' error when trying to create content on Confluence 6 and SQL server

Still need help?

The Atlassian Community is here for you.

Ask the community

This article only applies to the Atlassian server platform. Learn more about the differences between cloud and server.

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

Cause

SET NOCOUNT is enabled in SQL ServerThis 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:

  1. Connect to the SQL server Confluence database
  2. Run the following:

    SET NOCOUNT OFF
    
  3. Restart Confluence
  4. Try creating a page/space once more
  5. Go to  -> General configuration -> Cache management
  6. Scroll down and click on 'Flush all'

    This will clear out the database cache in Confluence

 

Last modified on Nov 15, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.