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

Better error message on invalid class in extension point

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9.3
    • Component/s: Runtime
    • Release Notes Description:
      Hide

      When a contribution to the runtime expects a class name, and the effective contribution does not refer to a class, runtime exception has been made clearer and there is a warning at startup. Ex: "Failed to load contributions for component service:org.nuxeo.ecm.core.cache.config.bad"

      Show
      When a contribution to the runtime expects a class name, and the effective contribution does not refer to a class, runtime exception has been made clearer and there is a warning at startup. Ex: "Failed to load contributions for component service:org.nuxeo.ecm.core.cache.config.bad"
    • Sprint:
      nxFG 9.3.2
    • Story Points:
      0

      Description

      When an extension point's descriptor expects a class but the XML contains something not recognized as a class, an ERROR is raised about the class but the Runtime does not receive even a Warning about this, and the component where the error is located is not mentioned. This should be improved.

      2017-07-07 09:42:25,449 ERROR [localhost-startStop-1] [org.nuxeo.common.xmap.XValueFactory] Cannot load class: this-is-not-a-class
      java.lang.ClassNotFoundException: this-is-not-a-class
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	at org.nuxeo.runtime.osgi.OSGiRuntimeContext.loadClass(OSGiRuntimeContext.java:101)
      	at org.nuxeo.runtime.model.impl.XMapContext.loadClass(XMapContext.java:47)
      	at org.nuxeo.common.xmap.XValueFactory$10.deserialize(XValueFactory.java:204)
      	at org.nuxeo.common.xmap.XAnnotatedMember.getValue(XAnnotatedMember.java:135)
      	at org.nuxeo.common.xmap.XAnnotatedMember.process(XAnnotatedMember.java:107)
      	at org.nuxeo.common.xmap.XAnnotatedObject.newInstance(XAnnotatedObject.java:104)
      	at org.nuxeo.common.xmap.XMap.loadAll(XMap.java:446)
      	at org.nuxeo.common.xmap.XMap.loadAll(XMap.java:452)
      	at org.nuxeo.common.xmap.XMap.loadAll(XMap.java:408)
      	at org.nuxeo.runtime.model.impl.ExtensionPointImpl.loadContributions(ExtensionPointImpl.java:105)
      	at org.nuxeo.runtime.model.impl.ComponentManagerImpl.loadContributions(ComponentManagerImpl.java:328)
      	at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.activate(RegistrationInfoImpl.java:387)
      	at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.resolve(RegistrationInfoImpl.java:443)
      	at org.nuxeo.runtime.model.impl.ComponentRegistry.resolveComponent(ComponentRegistry.java:179)
      	at org.nuxeo.runtime.model.impl.ComponentRegistry.addComponent(ComponentRegistry.java:127)
      	at org.nuxeo.runtime.model.impl.ComponentManagerImpl.register(ComponentManagerImpl.java:176)
      	at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.deploy(DefaultRuntimeContext.java:129)
      	at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.deploy(DefaultRuntimeContext.java:104)
      	at org.nuxeo.runtime.osgi.OSGiRuntimeService.loadComponents(OSGiRuntimeService.java:229)
      	at org.nuxeo.runtime.osgi.OSGiRuntimeService.createContext(OSGiRuntimeService.java:179)
      	at org.nuxeo.runtime.osgi.OSGiComponentLoader.install(OSGiComponentLoader.java:68)
      	at org.nuxeo.runtime.osgi.OSGiComponentLoader.<init>(OSGiComponentLoader.java:49)
      	at org.nuxeo.runtime.osgi.OSGiRuntimeActivator.start(OSGiRuntimeActivator.java:85)
      	at org.nuxeo.osgi.BundleImpl.start(BundleImpl.java:291)
      	at org.nuxeo.osgi.BundleRegistry.doRegister(BundleRegistry.java:177)
      	at org.nuxeo.osgi.BundleRegistry.register(BundleRegistry.java:125)
      	at org.nuxeo.osgi.BundleRegistry.install(BundleRegistry.java:98)
      	at org.nuxeo.osgi.OSGiAdapter.install(OSGiAdapter.java:186)
      	at org.nuxeo.osgi.application.loader.FrameworkLoader.install(FrameworkLoader.java:273)
      	at org.nuxeo.osgi.application.loader.FrameworkLoader.doStart(FrameworkLoader.java:229)
      	at org.nuxeo.osgi.application.loader.FrameworkLoader.start(FrameworkLoader.java:125)
      	at org.nuxeo.runtime.deployment.NuxeoStarter.start(NuxeoStarter.java:120)
      	at org.nuxeo.runtime.deployment.NuxeoStarter.contextInitialized(NuxeoStarter.java:93)
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h