-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 11.1
-
Component/s: Runtime
-
Epic Link:
-
Team:AT
-
Sprint:nxAT 11.1.24
-
Story Points:2
Did a test to check the behaviour with an empty XML config and an invalid one (parse error), note that behaviour might defer depending on:
- if we're in unit tests
- if the contribution is in a bundle
- if the contribution is in the nxserver/config
Symptoms when the contribution is in the "nxserver/config" directory (with server started in lenient mode):
Empty XML:
$ ./bin/nuxeoctl console --lenient [...] ====================================================================== = Starting Nuxeo Framework ====================================================================== * Server home = /opt/nuxeo-server-tomcat-11.3-SNAPSHOT * Runtime home = /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/nxserver * Data Directory = /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/nxserver/data * Log Directory = /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/log * Configuration Directory = /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/nxserver/config * Temp Directory = /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/tmp ====================================================================== [Fatal Error] :-1:-1: Premature end of file. 2020-08-13T14:35:15,220 ERROR [FrameworkLoader] Failed to install bundle: /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/nxserver/bundles/nuxeo-runtime-11.3-SNAPSHOT.jar org.osgi.framework.BundleException: Failed to start bundle at: /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/nxserver/bundles/nuxeo-runtime-11.3-SNAPSHOT.jar with activator: org.nuxeo.runtime.osgi.OSGiRuntimeActivator at org.nuxeo.osgi.BundleImpl.start(BundleImpl.java:300) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleRegistry.doRegister(BundleRegistry.java:177) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleRegistry.register(BundleRegistry.java:125) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleRegistry.install(BundleRegistry.java:98) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.OSGiAdapter.install(OSGiAdapter.java:180) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.application.loader.FrameworkLoader.install(FrameworkLoader.java:255) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.application.loader.FrameworkLoader.doStart(FrameworkLoader.java:220) [nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.application.loader.FrameworkLoader.start(FrameworkLoader.java:124) [nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.deployment.NuxeoStarter.start(NuxeoStarter.java:124) [nuxeo-runtime-deploy-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.deployment.NuxeoStarter.contextInitialized(NuxeoStarter.java:93) [nuxeo-runtime-deploy-11.3-SNAPSHOT.jar:?] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4678) [catalina.jar:9.0.37] [...] [bootstrap.jar:9.0.37] at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) [bootstrap.jar:9.0.37] Caused by: java.lang.IllegalArgumentException: Cannot load config from /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/nxserver/config/invalid-component-registration-config.xml at org.nuxeo.runtime.osgi.OSGiRuntimeService.loadConfig(OSGiRuntimeService.java:328) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.AbstractRuntimeService.start(AbstractRuntimeService.java:134) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.api.Framework.initialize(Framework.java:131) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.osgi.OSGiRuntimeActivator.start(OSGiRuntimeActivator.java:84) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleImpl.start(BundleImpl.java:292) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] ... 50 more Caused by: java.io.IOException: org.xml.sax.SAXParseException; Premature end of file. at org.nuxeo.common.xmap.XMap.loadAll(XMap.java:339) ~[nuxeo-common-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.ComponentDescriptorReader.read(ComponentDescriptorReader.java:74) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.createRegistrationInfo(DefaultRuntimeContext.java:233) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.createRegistrationInfo(DefaultRuntimeContext.java:228) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.deploy(DefaultRuntimeContext.java:133) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.deploy(DefaultRuntimeContext.java:127) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.osgi.OSGiRuntimeService.loadConfig(OSGiRuntimeService.java:326) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.AbstractRuntimeService.start(AbstractRuntimeService.java:134) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.api.Framework.initialize(Framework.java:131) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.osgi.OSGiRuntimeActivator.start(OSGiRuntimeActivator.java:84) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleImpl.start(BundleImpl.java:292) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] ... 50 more Caused by: org.xml.sax.SAXParseException: Premature end of file. at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) ~[xercesImpl-2.12.0-nx1.jar:?] at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) ~[xercesImpl-2.12.0-nx1.jar:?] at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122) ~[?:?] at org.nuxeo.common.xmap.XMap.loadAll(XMap.java:336) ~[nuxeo-common-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.ComponentDescriptorReader.read(ComponentDescriptorReader.java:74) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.createRegistrationInfo(DefaultRuntimeContext.java:233) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.createRegistrationInfo(DefaultRuntimeContext.java:228) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.deploy(DefaultRuntimeContext.java:133) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.deploy(DefaultRuntimeContext.java:127) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.osgi.OSGiRuntimeService.loadConfig(OSGiRuntimeService.java:326) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.AbstractRuntimeService.start(AbstractRuntimeService.java:134) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.api.Framework.initialize(Framework.java:131) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.osgi.OSGiRuntimeActivator.start(OSGiRuntimeActivator.java:84) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleImpl.start(BundleImpl.java:292) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] ... 50 more WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.jboss.seam.Component (file:/opt/nuxeo-server-tomcat-11.3-SNAPSHOT/nxserver/lib/jboss-seam-2.3.1.Final.NX03.jar) to method java.util.ResourceBundle$Control.toResourceName0(java.lang.String,java.lang.String) WARNING: Please consider reporting this to the maintainers of org.jboss.seam.Component WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release 2020-08-13 14:35:16 WARNING [main] org.jboss.seam.security.permission.PersistentPermissionResolver.initPermissionStore no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required. 2020-08-13 14:35:18 WARNING [main] org.richfaces.javascript.ClientServiceConfigParser.parse Found JavaScript function definition for class org.hibernate.validator.constraints.NotEmpty, but that class is not presented 2020-08-13 14:35:18 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file 2020-08-13 14:35:18 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/nuxeo] startup failed due to previous errors 2020-08-13T14:35:18,883 ERROR [BundleRegistry] Failed to stop bundle org.nuxeo.runtime org.osgi.framework.BundleException: Failed to stop activator: org.nuxeo.runtime.osgi.OSGiRuntimeActivator at org.nuxeo.osgi.BundleImpl.shutdown(BundleImpl.java:328) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleRegistry.shutdown(BundleRegistry.java:209) [nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.OSGiAdapter.shutdown(OSGiAdapter.java:149) [nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.application.loader.FrameworkLoader.doStop(FrameworkLoader.java:230) [nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.application.loader.FrameworkLoader.stop(FrameworkLoader.java:135) [nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.deployment.NuxeoStarter.stop(NuxeoStarter.java:128) [nuxeo-runtime-deploy-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.deployment.NuxeoStarter.contextDestroyed(NuxeoStarter.java:110) [nuxeo-runtime-deploy-11.3-SNAPSHOT.jar:?] at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4724) [catalina.jar:9.0.37] [...] at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342) [bootstrap.jar:9.0.37] at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) [bootstrap.jar:9.0.37] Caused by: java.lang.NullPointerException at org.nuxeo.runtime.osgi.OSGiRuntimeActivator.stop(OSGiRuntimeActivator.java:96) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleImpl.shutdown(BundleImpl.java:321) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] ... 48 more 2020-08-13 14:35:19 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [6880] milliseconds ^CShutting down... Stopping server..... Stopped in 0min01s Shutdown complete.
Invalid XML (content: '<' and that's all):
====================================================================== = Starting Nuxeo Framework ====================================================================== * Server home = /opt/nuxeo-server-tomcat-11.3-SNAPSHOT * Runtime home = /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/nxserver * Data Directory = /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/nxserver/data * Log Directory = /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/log * Configuration Directory = /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/nxserver/config * Temp Directory = /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/tmp ====================================================================== [Fatal Error] :1:2: The markup in the document preceding the root element must be well-formed. 2020-08-13T14:38:24,685 ERROR [FrameworkLoader] Failed to install bundle: /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/nxserver/bundles/nuxeo-runtime-11.3-SNAPSHOT.jar org.osgi.framework.BundleException: Failed to start bundle at: /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/nxserver/bundles/nuxeo-runtime-11.3-SNAPSHOT.jar with activator: org.nuxeo.runtime.osgi.OSGiRuntimeActivator at org.nuxeo.osgi.BundleImpl.start(BundleImpl.java:300) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleRegistry.doRegister(BundleRegistry.java:177) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleRegistry.register(BundleRegistry.java:125) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleRegistry.install(BundleRegistry.java:98) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.OSGiAdapter.install(OSGiAdapter.java:180) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.application.loader.FrameworkLoader.install(FrameworkLoader.java:255) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.application.loader.FrameworkLoader.doStart(FrameworkLoader.java:220) [nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.application.loader.FrameworkLoader.start(FrameworkLoader.java:124) [nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.deployment.NuxeoStarter.start(NuxeoStarter.java:124) [nuxeo-runtime-deploy-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.deployment.NuxeoStarter.contextInitialized(NuxeoStarter.java:93) [nuxeo-runtime-deploy-11.3-SNAPSHOT.jar:?] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4678) [catalina.jar:9.0.37] [...] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342) [bootstrap.jar:9.0.37] at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) [bootstrap.jar:9.0.37] Caused by: java.lang.IllegalArgumentException: Cannot load config from /opt/nuxeo-server-tomcat-11.3-SNAPSHOT/nxserver/config/invalid-component-registration-config.xml at org.nuxeo.runtime.osgi.OSGiRuntimeService.loadConfig(OSGiRuntimeService.java:328) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.AbstractRuntimeService.start(AbstractRuntimeService.java:134) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.api.Framework.initialize(Framework.java:131) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.osgi.OSGiRuntimeActivator.start(OSGiRuntimeActivator.java:84) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleImpl.start(BundleImpl.java:292) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] ... 50 more Caused by: java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 2; The markup in the document preceding the root element must be well-formed. at org.nuxeo.common.xmap.XMap.loadAll(XMap.java:339) ~[nuxeo-common-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.ComponentDescriptorReader.read(ComponentDescriptorReader.java:74) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.createRegistrationInfo(DefaultRuntimeContext.java:233) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.createRegistrationInfo(DefaultRuntimeContext.java:228) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.deploy(DefaultRuntimeContext.java:133) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.deploy(DefaultRuntimeContext.java:127) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.osgi.OSGiRuntimeService.loadConfig(OSGiRuntimeService.java:326) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.AbstractRuntimeService.start(AbstractRuntimeService.java:134) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.api.Framework.initialize(Framework.java:131) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.osgi.OSGiRuntimeActivator.start(OSGiRuntimeActivator.java:84) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleImpl.start(BundleImpl.java:292) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] ... 50 more Caused by: org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed. at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) ~[xercesImpl-2.12.0-nx1.jar:?] at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) ~[xercesImpl-2.12.0-nx1.jar:?] at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122) ~[?:?] at org.nuxeo.common.xmap.XMap.loadAll(XMap.java:336) ~[nuxeo-common-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.ComponentDescriptorReader.read(ComponentDescriptorReader.java:74) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.createRegistrationInfo(DefaultRuntimeContext.java:233) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.createRegistrationInfo(DefaultRuntimeContext.java:228) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.deploy(DefaultRuntimeContext.java:133) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.model.impl.DefaultRuntimeContext.deploy(DefaultRuntimeContext.java:127) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.osgi.OSGiRuntimeService.loadConfig(OSGiRuntimeService.java:326) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.AbstractRuntimeService.start(AbstractRuntimeService.java:134) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.api.Framework.initialize(Framework.java:131) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.osgi.OSGiRuntimeActivator.start(OSGiRuntimeActivator.java:84) ~[nuxeo-runtime-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleImpl.start(BundleImpl.java:292) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] [...] org.apache.catalina.core.StandardContext.startInternal Context [/nuxeo] startup failed due to previous errors 2020-08-13T14:38:28,079 ERROR [BundleRegistry] Failed to stop bundle org.nuxeo.runtime org.osgi.framework.BundleException: Failed to stop activator: org.nuxeo.runtime.osgi.OSGiRuntimeActivator at org.nuxeo.osgi.BundleImpl.shutdown(BundleImpl.java:328) ~[nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.BundleRegistry.shutdown(BundleRegistry.java:209) [nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.OSGiAdapter.shutdown(OSGiAdapter.java:149) [nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.application.loader.FrameworkLoader.doStop(FrameworkLoader.java:230) [nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.osgi.application.loader.FrameworkLoader.stop(FrameworkLoader.java:135) [nuxeo-runtime-osgi-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.deployment.NuxeoStarter.stop(NuxeoStarter.java:128) [nuxeo-runtime-deploy-11.3-SNAPSHOT.jar:?] at org.nuxeo.runtime.deployment.NuxeoStarter.contextDestroyed(NuxeoStarter.java:110) [nuxeo-runtime-deploy-11.3-SNAPSHOT.jar:?] at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4724) [catalina.jar:9.0.37] [...]
As seen on NXP-29499 (and stated on https://github.com/nuxeo/nuxeo/pull/4239), the "@class" annotation behaviour would need to be refined for proper error management when the target class implementation does not match.