Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-12181

Tests for sql directories should init correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.7.1
    • Fix Version/s: 5.7.2
    • Component/s: Directory

      Description

      In single datasource mode directory init commits when it shouldn't:

      org.nuxeo.ecm.directory.DirectoryException: org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled.
      	at org.nuxeo.ecm.directory.sql.SQLDirectory.<init>(SQLDirectory.java:230)
      	at org.nuxeo.ecm.directory.sql.SQLDirectoryProxy.getDirectory(SQLDirectoryProxy.java:50)
      	at org.nuxeo.ecm.directory.sql.SQLDirectoryTestCase.getDirectory(SQLDirectoryTestCase.java:70)
      	at org.nuxeo.ecm.directory.sql.TestSessionsAreClosedAutomatically.fetchUserDirectory(TestSessionsAreClosedAutomatically.java:84)
      	...
      Caused by: org.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled.
      	at org.postgresql.jdbc2.AbstractJdbc2Connection.commit(AbstractJdbc2Connection.java:813)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at org.nuxeo.runtime.api.ConnectionHelper$ConnectionHandle.invoke(ConnectionHelper.java:233)
      	at com.sun.proxy.$Proxy30.commit(Unknown Source)
      	at org.nuxeo.ecm.directory.sql.SQLDirectory.<init>(SQLDirectory.java:227)
      	... 33 more
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: