One Click won't start due to error: The processing instruction target matching "[xX][mM][lL]" is not allowed
search cancel

One Click won't start due to error: The processing instruction target matching "[xX][mM][lL]" is not allowed

book

Article ID: 246534

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction


OneClick tomcat fails to start with the following error seen in the log file


$SPECROOT/tomcat/logs/catalina.out (stdout.log - Windows)

21-Jul-2022 17:11:41.029 SEVERE [main] org.apache.catalina.startup.HostConfig.deployDirectory Error deploying deployment descriptor [/usr/Spectrum/tomcat/webapps/spectrum/META-INF/context.xml]
 org.xml.sax.SAXParseException; systemId: file:///usr/Spectrum/tomcat/webapps/spectrum/META-INF/context.xml; lineNumber: 1; columnNumber: 7; The processing instruction target matching "[xX][mM][lL]" is not allowed.
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
 at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1423)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1090)
 at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1868)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
 at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1045)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1577)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
 at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
 at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
 at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:934)
 at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1382)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1372)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
 at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:907)
 at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at org.apache.catalina.core.StandardService.startInternal(StandardService.java:423)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:933)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:637)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)

 

Environment

Release : 20.2, 21.2

Component : Spectrum OneClick

Cause


The xml definition must be on line 1 without any white spaces

Problem: white space at the beginning of the line

 

Problem: empty line to start the file

 

 

Resolution


Found that the context.xml file had a whitespace at the beginning of line 1

$SPECROOT/tomcat/webapps/spectrum/META-INF/context.xml

 

Note: The <?xml line needs to be the very first line of the file with no white spaces otherwise the xml parser will error causing the settings and OneClick to not load.