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

OSGiRuntimeService must manage failures on Component.applicationStarted()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4.2
    • Fix Version/s: 5.5
    • Component/s: Runtime

      Description

      When a component fails on its applicationStarted() method, it must not appear as ACTIVATED.

      org.nuxeo.runtime.osgi.OSGiRuntimeService.notifyComponentsOnStarted()
      org.nuxeo.runtime.model.impl.RegistrationInfoImpl.notifyApplicationStarted()
      org.nuxeo.ecm.directory.DirectoryServiceImpl.applicationStarted(ComponentContext) => Exception raised

      See the corresponding log:
      2011-10-31 03:29:15,033 ERROR [org.nuxeo.runtime.osgi.OSGiRuntimeService] Failed to notify components on application started
      org.nuxeo.ecm.directory.DirectoryException: org.nuxeo.ecm.core.api.WrappedException: Exception: org.nuxeo.ecm.directory.DirectoryException. message: Table 'Table(digestauth)' creation failed: Specified key was too long; max key length is 767 bytes
      at org.nuxeo.ecm.directory.sql.SQLDirectoryProxy.getDirectory(SQLDirectoryProxy.java:51)
      at org.nuxeo.ecm.directory.sql.SQLDirectoryProxy.getName(SQLDirectoryProxy.java:59)
      at org.nuxeo.ecm.directory.DirectoryServiceImpl.applicationStarted(DirectoryServiceImpl.java:60)
      at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.notifyApplicationStarted(RegistrationInfoImpl.java:310)
      at org.nuxeo.runtime.osgi.OSGiRuntimeService.notifyComponentsOnStarted(OSGiRuntimeService.java:455)
      at org.nuxeo.runtime.osgi.OSGiRuntimeService.fireApplicationStarted(OSGiRuntimeService.java:480)
      at org.nuxeo.runtime.osgi.OSGiRuntimeService.frameworkEvent(OSGiRuntimeService.java:490)
      at org.nuxeo.osgi.OSGiAdapter.fireFrameworkEvent(OSGiAdapter.java:231)
      at org.nuxeo.osgi.application.loader.FrameworkLoader.doStart(FrameworkLoader.java:179)
      at org.nuxeo.osgi.application.loader.FrameworkLoader.start(FrameworkLoader.java:122)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.nuxeo.osgi.application.FrameworkBootstrap.start(FrameworkBootstrap.java:135)
      at org.nuxeo.runtime.tomcat.NuxeoLauncher.handleEvent(NuxeoLauncher.java:117)
      at org.nuxeo.runtime.tomcat.NuxeoLauncher.lifecycleEvent(NuxeoLauncher.java:88)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4424)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
      at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(StandardService.java:516)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: org.nuxeo.ecm.directory.DirectoryException. message: Table 'Table(digestauth)' creation failed: Specified key was too long; max key length is 767 bytes
      at org.nuxeo.ecm.directory.sql.SQLHelper.createTable(SQLHelper.java:176)
      at org.nuxeo.ecm.directory.sql.SQLHelper.setupTable(SQLHelper.java:118)
      at org.nuxeo.ecm.directory.sql.SQLDirectory.<init>(SQLDirectory.java:154)
      at org.nuxeo.ecm.directory.sql.SQLDirectoryProxy.getDirectory(SQLDirectoryProxy.java:49)
      ... 40 more
      Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException. message: Specified key was too long; max key length is 767 bytes
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
      at com.mysql.jdbc.Util.getInstance(Util.java:386)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2618)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)
      at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:842)
      at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:681)
      at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
      at org.nuxeo.ecm.directory.sql.SQLHelper.createTable(SQLHelper.java:173)
      ... 43 more
      2011-10-31 03:29:15,035 INFO [org.nuxeo.runtime.osgi.OSGiRuntimeService] Nuxeo EP Started
      ======================================================================
      = Nuxeo EP Started
      ======================================================================
      = Component Loading Status: Pending: 0 / Unstarted: 0 / Total: 457
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              jcarsique Julien Carsique
              Reporter:
              jcarsique Julien Carsique
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: