javax.servlet.ServletException: Transaction marked for rollback.

Oracle Community | bclyon | 9 years ago
  1. 0

    How to use JPA's EntityManager.persist() in a servlet - mine does not work

    Oracle Community | 9 years ago | bclyon
    javax.servlet.ServletException: Transaction marked for rollback.
  2. 0

    When attempting to access the application in Crowd that contains the problem directory, the following error is thrown: {noformat} javax.servlet.ServletException: Transaction rolled back because it has been marked as rollback-only at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:284) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.crowd.integration.http.VerifyTokenFilter.doFilter(VerifyTokenFilter.java:172) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138) at com.atlassian.crowd.console.filter.CrowdDelegatingFilterProxy.doFilter(CrowdDelegatingFilterProxy.java:38) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at com.atlassian.crowd.console.filter.CrowdOpenSessionInViewFilter.doFilterInternal(CrowdOpenSessionInViewFilter.java:26) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:81) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138) {noformat} However, the actualy exception in Crowd is: {noformat} 2008-04-09 17:36:00,073 http-8095-Processor7 ERROR [codehaus.xfire.handler.DefaultFaultHandler] Fault occurred! org.springframework.dao.DataRetrievalFailureException: Unable to communicate with LDAP server; nested exception is javax.naming.CommunicationException: maltshovel:389 [Root exception is java.net.ConnectException: Connection refused] Caused by: javax.naming.CommunicationException: maltshovel:389 [Root exception is java.net.ConnectException: Connection refused] at com.sun.jndi.ldap.Connection.<init>(Connection.java:204) at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:118) at com.sun.jndi.ldap.LdapClientFactory.createPooledConnection(LdapClientFactory.java:44) at com.sun.jndi.ldap.pool.Connections.<init>(Connections.java:97) at com.sun.jndi.ldap.pool.Pool.getPooledConnection(Pool.java:114) at com.sun.jndi.ldap.LdapPoolManager.getLdapClient(LdapPoolManager.java:310) at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1572) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2596) at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193) at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136) {noformat} Wrapping a try/catch around {{ldapTemplate.search(baseDN, filter.encode(), searchControls, handler, requestControl);}} in SpringLDAPConnector.java's pageSearchResults method seems to fix the issue. May not be the best approach for a patch though. :)

    Atlassian JIRA | 9 years ago | Donna McGahan [Atlassian]
    javax.servlet.ServletException: Transaction rolled back because it has been marked as rollback-only
  3. 0

    When attempting to access the application in Crowd that contains the problem directory, the following error is thrown: {noformat} javax.servlet.ServletException: Transaction rolled back because it has been marked as rollback-only at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:284) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.crowd.integration.http.VerifyTokenFilter.doFilter(VerifyTokenFilter.java:172) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138) at com.atlassian.crowd.console.filter.CrowdDelegatingFilterProxy.doFilter(CrowdDelegatingFilterProxy.java:38) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at com.atlassian.crowd.console.filter.CrowdOpenSessionInViewFilter.doFilterInternal(CrowdOpenSessionInViewFilter.java:26) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:81) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138) {noformat} However, the actualy exception in Crowd is: {noformat} 2008-04-09 17:36:00,073 http-8095-Processor7 ERROR [codehaus.xfire.handler.DefaultFaultHandler] Fault occurred! org.springframework.dao.DataRetrievalFailureException: Unable to communicate with LDAP server; nested exception is javax.naming.CommunicationException: maltshovel:389 [Root exception is java.net.ConnectException: Connection refused] Caused by: javax.naming.CommunicationException: maltshovel:389 [Root exception is java.net.ConnectException: Connection refused] at com.sun.jndi.ldap.Connection.<init>(Connection.java:204) at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:118) at com.sun.jndi.ldap.LdapClientFactory.createPooledConnection(LdapClientFactory.java:44) at com.sun.jndi.ldap.pool.Connections.<init>(Connections.java:97) at com.sun.jndi.ldap.pool.Pool.getPooledConnection(Pool.java:114) at com.sun.jndi.ldap.LdapPoolManager.getLdapClient(LdapPoolManager.java:310) at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1572) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2596) at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193) at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136) {noformat} Wrapping a try/catch around {{ldapTemplate.search(baseDN, filter.encode(), searchControls, handler, requestControl);}} in SpringLDAPConnector.java's pageSearchResults method seems to fix the issue. May not be the best approach for a patch though. :)

    Atlassian JIRA | 9 years ago | Donna McGahan [Atlassian]
    javax.servlet.ServletException: Transaction 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

    When LDAP errors are thrown in Crowd, the resulting error (rather than the original LDAP exception) is displayed on the screen: {noformat} System Error System Error A system error has occurred please contact your administrator. If this problem continues to occur please contact Atlassian by opening a support request with the following information: * A description of your problem and what you were doing at the time it occurred * Cut & paste the error and system information found below * Attach the application server log file (if possible). Cause : javax.servlet.ServletException: Transaction rolled back because it has been marked as rollback-only Stack Trace : javax.servlet.ServletException: Transaction rolled back because it has been marked as rollback-only at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:284) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) {noformat} This causes at least one additional back and forth on support to obtain the needed logs and get to the root cause of the problem.

    Atlassian JIRA | 9 years ago | Donna McGahan [Atlassian]
    javax.servlet.ServletException: Transaction rolled back because it has been marked as rollback-only
  6. 0

    [CWD-1073] Suppress transaction rolled back servlet exceptions on LDAP-related errors - Atlassian JIRA

    atlassian.com | 1 year ago
    javax.servlet.ServletException: Transaction rolled back because it has been marked as rollback-only

    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. javax.servlet.ServletException

      Transaction marked for rollback.

      at com.xerox.wrc.arundel.AddDestination.doPost()
    2. com.xerox.wrc
      AddDestination.doPost
      1. com.xerox.wrc.arundel.AddDestination.doPost(AddDestination.java:144)
      1 frame
    3. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
      2 frames
    4. Glassfish Core
      StandardPipeline.doInvoke
      1. org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
      2. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
      3. org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
      5. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
      6. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      6 frames
    5. Glassfish
      WebPipeline.invoke
      1. com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
      1 frame
    6. Glassfish Core
      ContainerBase.invoke
      1. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
      2. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
      3. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      4. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
      5. org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
      6. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
      7. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
      8. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      9. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
      10. org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
      10 frames
    7. org.apache.coyote
      CoyoteAdapter.service
      1. org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
      1 frame
    8. Glassfish Core
      DefaultProcessorTask.doProcess
      1. com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
      2. com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
      2 frames