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

Fix creation of empty entry with autoincrement id on Oracle

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.10-HF05, 8.2
    • Component/s: Directory

      Description

      The INSERT INTO statement built without values failed on Oracle.

      We've got this error, when we try to execute INSERT INTO `tbl_name` VALUES ( ) :

      08:31:20 main 07:31:20,359 ERROR [RegistrationInfoImpl] Component service:org.nuxeo.ecm.platform.oauth2.providers.OAuth2ServiceProviderRegistry notification of application started failed: createEntry failed{{fState,beforeRun}}
      08:31:20 org.nuxeo.ecm.directory.DirectoryException: createEntry failed
      08:31:20 	at org.nuxeo.ecm.directory.sql.SQLSession.createEntry(SQLSession.java:286)
      08:31:20 	at org.nuxeo.ecm.directory.sql.SQLSession.createEntry(SQLSession.java:1173)
      08:31:20 	at org.nuxeo.ecm.platform.oauth2.providers.OAuth2ServiceProviderRegistryImpl.addProvider(OAuth2ServiceProviderRegistryImpl.java:86)
      08:31:20 	at org.nuxeo.ecm.platform.oauth2.providers.OAuth2ServiceProviderRegistryImpl.registerCustomProviders(OAuth2ServiceProviderRegistryImpl.java:158)
      08:31:20 	at org.nuxeo.ecm.platform.oauth2.providers.OAuth2ServiceProviderRegistryImpl.applicationStarted(OAuth2ServiceProviderRegistryImpl.java:152)
      08:31:20 	at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.notifyApplicationStarted(RegistrationInfoImpl.java:332)
      08:31:20 	at org.nuxeo.runtime.osgi.OSGiRuntimeService.notifyComponentsOnStarted(OSGiRuntimeService.java:485)
      08:31:20 	at org.nuxeo.runtime.osgi.OSGiRuntimeService.fireApplicationStarted(OSGiRuntimeService.java:521)
      08:31:20 	at org.nuxeo.runtime.osgi.OSGiRuntimeService.frameworkEvent(OSGiRuntimeService.java:531)
      08:31:20 	at org.nuxeo.osgi.OSGiAdapter.fireFrameworkEvent(OSGiAdapter.java:232)
      08:31:20 	at org.nuxeo.runtime.test.NXRuntimeTestCase.fireFrameworkStarted(NXRuntimeTestCase.java:189)
      08:31:20 	at org.nuxeo.runtime.test.runner.RuntimeFeature.beforeRun(RuntimeFeature.java:153)
      08:31:20 	at org.nuxeo.runtime.test.runner.FeaturesRunner$2.call(FeaturesRunner.java:157)
      08:31:20 	at org.nuxeo.runtime.test.runner.FeaturesLoader.apply(FeaturesLoader.java:127)
      08:31:20 	at org.nuxeo.runtime.test.runner.FeaturesLoader.apply(FeaturesLoader.java:114)
      08:31:20 	at org.nuxeo.runtime.test.runner.FeaturesRunner.beforeRun(FeaturesRunner.java:153)
      08:31:20 	at org.nuxeo.runtime.test.runner.FeaturesRunner$BeforeClassStatement.evaluate(FeaturesRunner.java:265)
      08:31:20 	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      08:31:20 	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      08:31:20 	at org.junit.runners.Suite.runChild(Suite.java:127)
      08:31:20 	at org.junit.runners.Suite.runChild(Suite.java:26)
      08:31:20 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      08:31:20 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      08:31:20 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      08:31:20 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      08:31:20 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      08:31:20 	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      08:31:20 	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      08:31:20 	at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
      08:31:20 	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:113)
      08:31:20 	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:85)
      08:31:20 	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:54)
      08:31:20 	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:134)
      08:31:20 	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
      08:31:20 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
      08:31:20 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
      08:31:20 Caused by: java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
      08:31:20 
      08:31:20 	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
      08:31:20 	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
      08:31:20 	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1017)
      08:31:20 	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:655)
      08:31:20 	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:249)
      08:31:20 	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:566)
      08:31:20 	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:215)
      08:31:20 	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:58)
      08:31:20 	at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:943)
      08:31:20 	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1075)
      08:31:20 	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3820)
      08:31:20 	at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3923)
      08:31:20 	at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1385)
      08:31:20 	at org.nuxeo.ecm.directory.sql.SQLSession.createEntry(SQLSession.java:261)
      08:31:20 	... 35 more
      

      A solution can be found there : http://stackoverflow.com/questions/6705174/oracle-insert-without-columns-specification

      Dont forget to re-enable test TestLiveConnectBlobProvider#testGetOAuth2Provider().

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: