HTTP Status 404 on OC after upgrade

Document ID : KB000007313
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

After upgrading CA Spectrum, the error “HTTP Status 404 - /spectrum/admin/index.jsp” is observed when launching the OneClick Server from the Web Browser as below:

error.jpg

Environment:
Spectrum 10.x running on all supported platforms
Cause:

Ideally the old jar file(s) should be replaced by new jar file(s) during an upgrade. If the old jar file was being used by some other process and does not get removed, there would be two jar files instead of one in the library folder.

 

The usual cause of the issue is old jar file(s) still existing in the %SPECROOT%/tomcat/lib folder

  

Now when Tomcat is starting it is trying to read the class file of the struts jar file and it finds the old jar file and reads first and hence faces problems as the code is looking for latest class files and which will be under the new struts file.

 

The Spectrum Tomcat log file should have the below information:

.

.

.

... (localhost-startStop-1) (org.apache.struts2.dispatcher.Dispatcher) - (ERROR) - Dispatcher initialization failed

Unable to load configuration. - bean - jar:file:/E:/win32app/Spectrum/tomcat/lib/struts2-core-2.3.32.jar!/struts-default.xml:65:72

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)

at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)

at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)

at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)

at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)

at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)

at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)

at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4958)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260)

at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

Caused by: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/E:/win32app/Spectrum/tomcat/lib/struts2-core-2.3.32.jar!/struts-default.xml:65:72

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)

at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)

at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:234)

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)

... 20 more

Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name struts has already been loaded by bean - jar:file:/E:/win32app/Spectrum/tomcat/lib/struts2-core-2.3.16.3.jar!/struts-default.xml:40:72 - bean - jar:file:/E:/win32app/Spectrum/tomcat/lib/struts2-core-2.3.32.jar!/struts-default.xml:65:72

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:229)

... 23 more

... org.apache.catalina.core.StandardContext filterStart

SEVERE: Exception starting filter struts2

Unable to load configuration. - bean - jar:file:/E:/win32app/Spectrum/tomcat/lib/struts2-core-2.3.32.jar!/struts-default.xml:65:72

at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501)

at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)

at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)

at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)

at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)

at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4958)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260)

at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

Caused by: Unable to load configuration. - bean - jar:file:/E:/win32app/Spectrum/tomcat/lib/struts2-core-2.3.32.jar!/struts-default.xml:65:72

.

.

.

Resolution:

Solution 1:

========

-> Compare the files in the %SPECROOT%/tomcat/lib folder with another working (upgraded) server running good on the SAME version in your environment

-> Replace the old jar files with the new one (copy them over from the working server to the server with the issue)

 

Solution 2:

=======

-> Should there be no good working server running on the SAME Spectrum release, try the below: 

-> Check for the below jar files:

freemarker

struts2-core

xwork-core 

->  If there are two versions for any of the above files like:

freemarker-2.3.19

freemarker-2.3.22

struts2-core-2.3.16.3 

struts2-core-2.3.32

xwork-core-2.3.16.3

xwork-core-2.3.32

-> (Re)move the older jar files from %SPECROOT%/tomcat/lib folder, i.e:

-> (Re)move the below files from the %SPECROOT%/tomcat/lib folder:

freemarker-2.3.19

struts2-core-2.3.16.3

xwork-core-2.3.16.3

-> Let the below updated files be untouched in the %SPECROOT%/tomcat/lib folder:

freemarker-2.3.22

struts2-core-2.3.32

xwork-core-2.3.32

-> Restart the OneClick Web Server

-> Launch the OneClick Web Server from the Web Browser

 

If the issue still exist, please open a case with CA Technical Support

Additional Information:

Refer the below link on how to restart OneClick Web Server:

https://docops.ca.com/ca-spectrum/10-2-1/en/administrating/oneclick-administration/oneclick-web-server-administration