org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.crowd.model.directory.DirectoryImpl#327683]; SQL []; Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'.; nested exception is java.sql.SQLException: Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'.

Atlassian JIRA | Tim Wong [Atlassian] | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Set priority to major, due to seriousness of the state it leaves you in: Scenario- 1. Create 1 external directory named 'Directory One' (arbitrary name. Type of directory does not matter). 2. Create a second directory also named 'Directory One'. Save. Expected behavior- Give an error of some kind reminding you that there is already a 'Directory One' and instruct you to create one of a different name. Actual Behavior- Oops error on User directory, as well as any Manage Users/Groups screen Error in Log {code} 2011-04-21 12:54:05,315 ERROR [http-8080-1] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'. -- referer: http://localhost:8080/plugins/servlet/embedded-crowd/configure/ldap/ | url: /plugins/servlet/embedded-crowd/configure/ldap/ | userName: admin 2011-04-21 12:54:05,318 ERROR [http-8080-1] [sf.hibernate.impl.SessionImpl] execute Could not synchronize database state with session -- referer: http://localhost:8080/plugins/servlet/embedded-crowd/configure/ldap/ | url: /plugins/servlet/embedded-crowd/configure/ldap/ | userName: admin 2011-04-21 12:54:05,321 ERROR [http-8080-1] [atlassian.plugin.servlet.ServletModuleContainerServlet] service Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.crowd.model.directory.DirectoryImpl#327683]; SQL []; Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'.; nested exception is java.sql.SQLException: Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'. -- referer: http://localhost:8080/plugins/servlet/embedded-crowd/configure/ldap/ | url: /plugins/servlet/embedded-crowd/configure/ldap/ | userName: admin org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.crowd.model.directory.DirectoryImpl#327683]; SQL []; Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'.; nested exception is java.sql.SQLException: Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'. at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:583) {code} Workaround - Restart, or flush caches from Cache Statistics

    Atlassian JIRA | 6 years ago | Tim Wong [Atlassian]
    org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.crowd.model.directory.DirectoryImpl#327683]; SQL []; Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'.; nested exception is java.sql.SQLException: Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'.
  2. 0

    Set priority to major, due to seriousness of the state it leaves you in: Scenario- 1. Create 1 external directory named 'Directory One' (arbitrary name. Type of directory does not matter). 2. Create a second directory also named 'Directory One'. Save. Expected behavior- Give an error of some kind reminding you that there is already a 'Directory One' and instruct you to create one of a different name. Actual Behavior- Oops error on User directory, as well as any Manage Users/Groups screen Error in Log {code} 2011-04-21 12:54:05,315 ERROR [http-8080-1] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'. -- referer: http://localhost:8080/plugins/servlet/embedded-crowd/configure/ldap/ | url: /plugins/servlet/embedded-crowd/configure/ldap/ | userName: admin 2011-04-21 12:54:05,318 ERROR [http-8080-1] [sf.hibernate.impl.SessionImpl] execute Could not synchronize database state with session -- referer: http://localhost:8080/plugins/servlet/embedded-crowd/configure/ldap/ | url: /plugins/servlet/embedded-crowd/configure/ldap/ | userName: admin 2011-04-21 12:54:05,321 ERROR [http-8080-1] [atlassian.plugin.servlet.ServletModuleContainerServlet] service Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.crowd.model.directory.DirectoryImpl#327683]; SQL []; Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'.; nested exception is java.sql.SQLException: Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'. -- referer: http://localhost:8080/plugins/servlet/embedded-crowd/configure/ldap/ | url: /plugins/servlet/embedded-crowd/configure/ldap/ | userName: admin org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.crowd.model.directory.DirectoryImpl#327683]; SQL []; Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'.; nested exception is java.sql.SQLException: Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'. at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:583) {code} Workaround - Restart, or flush caches from Cache Statistics

    Atlassian JIRA | 6 years ago | Tim Wong [Atlassian]
    org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.crowd.model.directory.DirectoryImpl#327683]; SQL []; Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'.; nested exception is java.sql.SQLException: Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'.
  3. 0

    Bitbucket Server throws 500 error when attempting to edit an External User Directory - Atlassian Documentation

    atlassian.com | 5 months ago
    org.springframework.web.util.NestedServletException: Request processing failed; nested exception is com.atlassian.crowd.exception.DirectoryNotFoundException: java.lang.NumberFormatException: For input string: "229377?xsrfTokenName=atl_token"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Stash throws 500 error when attempting to edit an External User Directory - Atlassian Documentation

    atlassian.com | 5 months ago
    org.springframework.web.util.NestedServletException: Request processing failed; nested exception is com.atlassian.crowd.exception.DirectoryNotFoundException: java.lang.NumberFormatException: For input string: "229377?xsrfTokenName=atl_token"

    7 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.web.util.NestedServletException

      Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.crowd.model.directory.DirectoryImpl#327683]; SQL []; Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'.; nested exception is java.sql.SQLException: Violation of UNIQUE KEY constraint 'UQ__cwd_directory__3C69FB99'. Cannot insert duplicate key in object 'dbo.cwd_directory'.

      at org.springframework.web.servlet.FrameworkServlet.processRequest()
    2. Spring MVC
      FrameworkServlet.processRequest
      1. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:583)
      1 frame