org.springframework.transaction.UnexpectedRollbackException: Transaction has been rolled back because it has been marked as rollback-only

Atlassian JIRA | Jens Schumacher | 9 years ago
  1. 0

    When trying to access a page with a user who does not have permission to view it, the following servlet exception is thrown instead of the message that the page does not exist. ---------- 500 Servlet Exception org.springframework.transaction.UnexpectedRollbackException: Transaction has been rolled back because it has been marked as rollback-only at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:469) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:266) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy19.getUser(Unknown Source) at com.atlassian.confluence.core.ConfluenceActionSupport.getUser(ConfluenceActionSupport.java:242) at com.atlassian.confluence.core.ConfluenceActionSupport.getRemoteUser(ConfluenceActionSupport.java:229) at com.atlassian.confluence.core.ConfluenceActionSupport.getLocale(ConfluenceActionSupport.java:546) at com.atlassian.confluence.core.ConfluenceActionSupport.getI18n(ConfluenceActionSupport.java:600) at com.atlassian.confluence.admin.actions.ViewSystemInfoAction.getUptime(ViewSystemInfoAction.java:270) at com.atlassian.confluence.admin.actions.ViewSystemInfoAction.getBuildStats(ViewSystemInfoAction.java:126) at _jsp._500page__jsp._jspService(500page.jsp:71) at com.caucho.jsp.JavaPage.service(JavaPage.java:60)

    Atlassian JIRA | 9 years ago | Jens Schumacher
    org.springframework.transaction.UnexpectedRollbackException: Transaction has been rolled back because it has been marked as rollback-only
  2. 0

    When trying to access a page with a user who does not have permission to view it, the following servlet exception is thrown instead of the message that the page does not exist. ---------- 500 Servlet Exception org.springframework.transaction.UnexpectedRollbackException: Transaction has been rolled back because it has been marked as rollback-only at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:469) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:266) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy19.getUser(Unknown Source) at com.atlassian.confluence.core.ConfluenceActionSupport.getUser(ConfluenceActionSupport.java:242) at com.atlassian.confluence.core.ConfluenceActionSupport.getRemoteUser(ConfluenceActionSupport.java:229) at com.atlassian.confluence.core.ConfluenceActionSupport.getLocale(ConfluenceActionSupport.java:546) at com.atlassian.confluence.core.ConfluenceActionSupport.getI18n(ConfluenceActionSupport.java:600) at com.atlassian.confluence.admin.actions.ViewSystemInfoAction.getUptime(ViewSystemInfoAction.java:270) at com.atlassian.confluence.admin.actions.ViewSystemInfoAction.getBuildStats(ViewSystemInfoAction.java:126) at _jsp._500page__jsp._jspService(500page.jsp:71) at com.caucho.jsp.JavaPage.service(JavaPage.java:60)

    Atlassian JIRA | 9 years ago | Jens Schumacher
    org.springframework.transaction.UnexpectedRollbackException: Transaction has been rolled back because it has been marked as rollback-only
  3. 0

    [META-81] get an error when using {metadata-list} - JIRA

    jira.com | 8 months ago
    org.springframework.transaction.UnexpectedRollbackException: Transaction has been rolled back because it has been marked as rollback-only
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [META-72] Cannot delcare a {metadata-list} block in confluence version 2.6-rc2 - causes system error - JIRA

    jira.com | 8 months ago
    org.springframework.transaction.UnexpectedRollbackException: Transaction has been rolled back because it has been marked as rollback-only
  6. 0

    According to the API for the V2 Macro object's 'getBodyRenderMode()' method: {quote} If this method returns null, it causes the macro processor to treat the macro as one that returns wiki-text rather than HTML. The body of the macro will be passed in un-rendered, and the macro's output will be inserted back into the page for further normal processing by the wiki-engine. {quote} Unfortunately, there seems to be a bug in the {{com.atlassian.confluence.links.LinkParserHelper}} object, where it assumes that the 'getBodyRenderMode()' method will always return an object (line 41): {code:java} if (macro != null && macro.hasBody() && macro.getBodyRenderMode().renderLinks()) {code} This causes the following exception to be thrown when saving a page containing said macro: {noformat} 2007-10-26 10:13:38,539 ERROR [http-8080-Processor2] [com.opensymphony.xwork.ActionSupport] doSaveEditPageBean An error occured while storing the requested page! -- url: /pages/doeditpage.action | userName: admin | action: doeditpage | page: 2031618 java.lang.NullPointerException at com.atlassian.confluence.links.LinkParserHelper.handleMacro(LinkParserHelper.java:41) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:126) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:121) at com.atlassian.renderer.v2.WikiMarkupParser.handlePotentialMacro(WikiMarkupParser.java:94) at com.atlassian.renderer.v2.WikiMarkupParser.parse(WikiMarkupParser.java:60) at com.atlassian.confluence.links.LinkParserHelper.extractLinks(LinkParserHelper.java:67) at com.atlassian.confluence.links.LinkParserHelper.extractLinks(LinkParserHelper.java:60) at com.atlassian.confluence.links.ConfluenceLinkResolver.extractLinkTextList(ConfluenceLinkResolver.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ... {noformat} ...which in turn, spits this out to the browser: {noformat} Cause: org.springframework.transaction.UnexpectedRollbackException: Transaction has been rolled back because it has been marked as rollback-only at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:469) Stack Trace: [hide] org.springframework.transaction.UnexpectedRollbackException: Transaction has been rolled back because it has been marked as rollback-only at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:469) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:266) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy5.findUserByUsername(Unknown Source) at com.opensymphony.user.provider.hibernate.HibernateProfileProvider.handles(HibernateProfileProvider.java:79) at bucket.user.providers.ChainedUserProvider.handles(ChainedUserProvider.java:125) at bucket.user.providers.CachingProfileProvider.handles(CachingProfileProvider.java:71) at com.atlassian.user.impl.osuser.properties.OSUPropertySetFactory.getPropertySet(OSUPropertySetFactory.java:30) at com.atlassian.user.impl.delegation.properties.DelegatingPropertySetFactory.getPropertySet(DelegatingPropertySetFactory.java:34) at bucket.user.DefaultUserAccessor.getPropertySet(DefaultUserAccessor.java:561) at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy19.getPropertySet(Unknown Source) at com.atlassian.confluence.languages.DefaultLocaleManager.getLocale(DefaultLocaleManager.java:27) at com.atlassian.confluence.core.ConfluenceActionSupport.getLocale(ConfluenceActionSupport.java:546) at com.atlassian.confluence.core.ConfluenceActionSupport.getI18n(ConfluenceActionSupport.java:600) at com.atlassian.confluence.core.ConfluenceActionSupport.getText(ConfluenceActionSupport.java:128) at com.atlassian.confluence.pages.actions.AbstractEditPageAction.doSaveEditPageBean(AbstractEditPageAction.java:185) at com.atlassian.confluence.pages.actions.EditPageAction.doSaveEditPageBean(EditPageAction.java:172) at com.atlassian.confluence.pages.actions.EditPageAction.doEdit(EditPageAction.java:244) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) {noformat} Not pretty. A workaround it to return a RenderMode from the 'getBodyRenderMode()' method, however there is no way to have Confluence behave in the same way as returning 'null' is supposed to, which effects how the macros render in the final page.

    Atlassian JIRA | 9 years ago | David Peterson
    org.springframework.transaction.UnexpectedRollbackException: Transaction has been rolled back because it has been marked as rollback-only

  1. abrazeneb 8 times, last 3 months ago
  2. Kawada 5 times, last 6 months ago
2 unregistered visitors
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. org.springframework.transaction.UnexpectedRollbackException

    Transaction has been rolled back because it has been marked as rollback-only

    at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit()
  2. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:469)
    2. org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:266)
    3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    3 frames
  3. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
    2 frames
  4. Unknown
    $Proxy19.getUser
    1. $Proxy19.getUser(Unknown Source)
    1 frame
  5. com.atlassian.confluence
    ViewSystemInfoAction.getBuildStats
    1. com.atlassian.confluence.core.ConfluenceActionSupport.getUser(ConfluenceActionSupport.java:242)
    2. com.atlassian.confluence.core.ConfluenceActionSupport.getRemoteUser(ConfluenceActionSupport.java:229)
    3. com.atlassian.confluence.core.ConfluenceActionSupport.getLocale(ConfluenceActionSupport.java:546)
    4. com.atlassian.confluence.core.ConfluenceActionSupport.getI18n(ConfluenceActionSupport.java:600)
    5. com.atlassian.confluence.admin.actions.ViewSystemInfoAction.getUptime(ViewSystemInfoAction.java:270)
    6. com.atlassian.confluence.admin.actions.ViewSystemInfoAction.getBuildStats(ViewSystemInfoAction.java:126)
    6 frames
  6. _jsp
    _500page__jsp._jspService
    1. _jsp._500page__jsp._jspService(500page.jsp:71)
    1 frame
  7. com.caucho.jsp
    JavaPage.service
    1. com.caucho.jsp.JavaPage.service(JavaPage.java:60)
    1 frame