TIBCO Spotfire Server fails to start with exception "More than one fragment with the name [spring_web] was found. This is not legal with relative ordering" in catalina.log file.

TIBCO Spotfire Server fails to start with exception "More than one fragment with the name [spring_web] was found. This is not legal with relative ordering" in catalina.log file.

book

Article ID: KB0072954

calendar_today

Updated On:

Products Versions
Spotfire Server All Versions

Description

TIBCO Spotfire Server may fail to start with the following error in both server.log and catalina log file when there are multiple versions of spring-web.jar files deployed in Spotfire. This error is specific to spring-web.jar but similar errors can be seen if you have duplicate jar files. 

INFO 2020-10-14T15:21:21,009+0000 [] catalina.startup.HostConfig: Deploying deployment descriptor [/tomcat/conf/Spotfire/localhost/spotfire.xml]
ERROR 2020-10-14T15:21:21,273+0000 [] catalina.startup.HostConfig: Error deploying deployment descriptor [tomcat/conf/Spotfire/localhost/spotfire.xml]
java.lang.IllegalStateException: Error starting child
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720) ~[?:?]
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) ~[?:?]
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705) ~[?:?]
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:631) ~[?:?]
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1830) ~[?:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[?:?]
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118) ~[?:?]
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:526) ~[?:?]
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425) ~[?:?]
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576) ~[?:?]
    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:423) ~[?:?]
    at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366) ~[?:?]
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936) ~[?:?]
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) ~[?:?]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[?:?]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[?:?]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[?:?]
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[?:?]
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[?:?]
    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:421) ~[?:?]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[?:?]
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) ~[?:?]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[?:?]
    at org.apache.catalina.startup.Catalina.start(Catalina.java:738) ~[?:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    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: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Spotfire].StandardHost[localhost].StandardContext[/spotfire]]
    at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440) ~[?:?]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198) ~[?:?]
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717) ~[?:?]
    ... 37 more
Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering.
    at org.apache.tomcat.util.descriptor.web.WebXml.orderWebFragments(WebXml.java:2260) ~[?:?]
    at org.apache.tomcat.util.descriptor.web.WebXml.orderWebFragments(WebXml.java:2218) ~[?:?]
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1342) ~[?:?]
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:983) ~[?:?]
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302) ~[?:?]
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) ~[?:?]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5044) ~[?:?]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[?:?]
    at org.apache.catalina.core.ContainerBase.addChildInt

Issue/Introduction

TIBCO Spotfire Server may fail to start with "More than one fragment with the name [spring_web] was found. This is not legal with relative ordering" exceptions logged in the catalina.log and server.log. This can be caused by duplicate jar files.

Resolution

To resolve, check if there are any duplicate jar files placed in "<server installation dir>/tomcat/custom-ext" , "<server installation dir>/tomcat/lib" and "<server installation dir>/tomcat/webapps/spotfire/WEB-INF/lib" folders and delete accordingly. In this example, spring-web.jar was placed in both <server installation dir>/tomcat/custom-ext and <server installation dir>/tomcat/webapps/spotfire/WEB-INF/lib folders, where as it supposed to be deployed only in "<server installation dir>/tomcat/webapps/spotfire/WEB-INF/lib" folder

Please note that any custom JAR files you add to the server (e.g. additional database drivers or custom extensions) should in general be placed in "<server installation dir>/tomcat/custom-ext".