I keep doing a migration from struts 2.3 to 2.5.
When I start the tomcat server it gives me the following error:
sep 12, 2017 12:26:47 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTENCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:factura' did not find a matching property.
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: Server version: Apache Tomcat/7.0.65
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: Server built: Oct 9 2015 08:36:58 UTC
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: Server number: 7.0.65.0
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: OS Name: Windows 7
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: OS Version: 6.1
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: Architecture: x86
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: Java Home: C:\Program Files (x86)\Java\jreReg
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: JVM Version: 1.8.0_144-b01
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: JVM Vendor: Oracle Corporation
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: CATALINA_BASE: C:\Users\desarrollo\Documents\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: CATALINA_HOME: C:\apache\apache-tomcat-7.0.65
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: Command line argument: -Dcatalina.base=C:\Users\desarrollo\Documents\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: Command line argument: -Dcatalina.home=C:\apache\apache-tomcat-7.0.65
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: Command line argument: -Dwtp.deploy=C:\Users\desarrollo\Documents\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: Command line argument: -Djava.endorsed.dirs=C:\apache\apache-tomcat-7.0.65\endorsed
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMACIÓN: Command line argument: -Dfile.encoding=Cp1252
sep 12, 2017 12:26:47 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFORMACIÓN: La biblioteca nativa de Apache Tomcat basada en ARP que permite un rendimiento óptimo en entornos de desarrollo no ha sido hallada en java.library.path: C:\Program Files (x86)\Java\jreReg\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:/Program Files (x86)/Java/jreReg/bin/client;C:/Program Files (x86)/Java/jreReg/bin;C:/Program Files (x86)/Java/jreReg/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\SWTOOLS\ReadyApps;C:\Program Files (x86)\Common Files\Lenovo;%JAVA_HOME\bin%;C:\maven-3.0\apache-maven-3.1.1\bin;C:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\nodejs\;C:\Program Files\AutoFirma\AutoFirma;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\Users\desarrollo\AppData\Local\Programs\EmEditor;C:\Users\desarrollo\AppData\Roaming\npm;C:\eclipse;;.
sep 12, 2017 12:26:47 PM org.apache.coyote.AbstractProtocol init
INFORMACIÓN: Initializing ProtocolHandler ["http-bio-8080"]
sep 12, 2017 12:26:47 PM org.apache.coyote.AbstractProtocol init
INFORMACIÓN: Initializing ProtocolHandler ["ajp-bio-8009"]
sep 12, 2017 12:26:47 PM org.apache.catalina.startup.Catalina load
INFORMACIÓN: Initialization processed in 359 ms
sep 12, 2017 12:26:47 PM org.apache.catalina.core.StandardService startInternal
INFORMACIÓN: Arrancando servicio Catalina
sep 12, 2017 12:26:47 PM org.apache.catalina.core.StandardEngine startInternal
INFORMACIÓN: Starting Servlet Engine: Apache Tomcat/7.0.65
sep 12, 2017 12:26:51 PM org.apache.catalina.startup.TldConfig execute
INFORMACIÓN: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
12:26:52.562 [localhost-startStop-1] INFO com.mncars.scheduler.TareasDiariasListener - ...Iniciando contexto
12:26:52.563 [localhost-startStop-1] INFO com.mncars.scheduler.TareasDiariasListener - Creado Scheduler que elimina ficheros pdf's
12:26:52.672 [localhost-startStop-1] ERROR org.apache.struts2.dispatcher.Dispatcher - Dispatcher initialization failed
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:427) ~[struts2-core-2.5.13.jar:2.5.13]
at com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:218) ~[struts2-core-2.5.13.jar:2.5.13]
at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:52) ~[struts2-core-2.5.13.jar:2.5.13]
at com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:91) ~[struts2-core-2.5.13.jar:2.5.13]
at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:571) ~[struts2-core-2.5.13.jar:2.5.13]
at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:568) ~[struts2-core-2.5.13.jar:2.5.13]
at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:560) ~[struts2-core-2.5.13.jar:2.5.13]
at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:568) ~[struts2-core-2.5.13.jar:2.5.13]
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:284) ~[struts2-core-2.5.13.jar:2.5.13]
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:159) ~[struts2-core-2.5.13.jar:2.5.13]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:63) ~[struts2-core-2.5.13.jar:2.5.13]
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:960) ~[struts2-core-2.5.13.jar:2.5.13]
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:466) ~[struts2-core-2.5.13.jar:2.5.13]
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:499) [struts2-core-2.5.13.jar:2.5.13]
at org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:75) [struts2-core-2.5.13.jar:2.5.13]
at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:63) [struts2-core-2.5.13.jar:2.5.13]
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) [catalina.jar:7.0.65]
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) [catalina.jar:7.0.65]
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) [catalina.jar:7.0.65]
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4841) [catalina.jar:7.0.65]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5535) [catalina.jar:7.0.65]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.65]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574) [catalina.jar:7.0.65]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564) [catalina.jar:7.0.65]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_144]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_144]
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_144]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_144]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_144]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_144]
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:410) ~[struts2-core-2.5.13.jar:2.5.13]
... 27 more
Caused by: java.lang.NoSuchMethodError: org.apache.commons.lang3.text.StrSubstitutor.setValueDelimiter(Ljava/lang/String;)Lorg/apache/commons/lang3/text/StrSubstitutor;
at com.opensymphony.xwork2.config.providers.EnvsValueSubstitutor.<init>(EnvsValueSubstitutor.java:32) ~[struts2-core-2.5.13.jar:2.5.13]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_144]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_144]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_144]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_144]
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:410) ~[struts2-core-2.5.13.jar:2.5.13]
... 27 more
sep 12, 2017 12:26:52 PM org.apache.catalina.core.StandardContext filterStart
GRAVE: Excepción arrancando filtro struts2
java.lang.reflect.InvocationTargetException - Class: com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector
File: ContainerImpl.java
Method: construct
Line: 427 - com/opensymphony/xwork2/inject/ContainerImpl.java:427:-1
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:512)
at org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:75)
at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:63)
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:4841)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5535)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:427)
at com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:218)
at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:52)
at com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:91)
at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:571)
at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:568)
at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:560)
at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:568)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:284)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:159)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:63)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:960)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:466)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:499)
... 14 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:410)
... 27 more
Caused by: java.lang.NoSuchMethodError: org.apache.commons.lang3.text.StrSubstitutor.setValueDelimiter(Ljava/lang/String;)Lorg/apache/commons/lang3/text/StrSubstitutor;
at com.opensymphony.xwork2.config.providers.EnvsValueSubstitutor.<init>(EnvsValueSubstitutor.java:32)
... 32 more
12:26:52.688 [localhost-startStop-1] INFO com.mncars.scheduler.TareasDiariasListener - ...Cerrando contexto
12:26:52.688 [localhost-startStop-1] INFO com.mncars.scheduler.TareasDiariasListener - Cerrado Scheduler que elimina ficheros
sep 12, 2017 12:26:52 PM org.apache.catalina.core.StandardContext startInternal
GRAVE: One or more Filters failed to start. Full details will be found in the appropriate container log file
sep 12, 2017 12:26:52 PM org.apache.catalina.core.StandardContext startInternal
GRAVE: Falló en arranque del Contexto [/factura] debido a errores previos
sep 12, 2017 12:26:55 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
GRAVE: La aplicación web [/factura] registró el conductor JDBC [com.mysql.jdbc.Driver] pero falló al anular el registro mientras la aplicación web estaba parada. Para prevenir un fallo de memoria, se ha anulado el registro del conductor JDBC por la fuerza.
sep 12, 2017 12:26:55 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
GRAVE: La aplicación web [/factura] registró el conductor JDBC [com.microsoft.sqlserver.jdbc.SQLServerDriver] pero falló al anular el registro mientras la aplicación web estaba parada. Para prevenir un fallo de memoria, se ha anulado el registro del conductor JDBC por la fuerza.
sep 12, 2017 12:26:55 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
GRAVE: La aplicación web [/factura] parece haber arrancado un hilo llamado [Abandoned connection cleanup thread] pero no ha podido pararlo. Esto tiene todas las papeletas de convertirse en un fallo de memoria.
sep 12, 2017 12:26:55 PM org.apache.coyote.AbstractProtocol start
INFORMACIÓN: Starting ProtocolHandler ["http-bio-8080"]
sep 12, 2017 12:26:55 PM org.apache.coyote.AbstractProtocol start
INFORMACIÓN: Starting ProtocolHandler ["ajp-bio-8009"]
sep 12, 2017 12:26:55 PM org.apache.catalina.startup.Catalina start
INFORMACIÓN: Server startup in 8053 ms
ERROR org.apache.struts2.dispatcher.Dispatcher - Dispatcher initialization failed
I suppose that the error is the previous one, I have searched on google and I do not see much concrete information but rather particular errors.
A
java.lang.NoSuchMethodError
means:I found the class I was looking for
But the method you wanted to invoke from the class doesn't exist.
The problem comes from the fact that the code has been compiled against a version of the class that is different from the one it finds. Usually with an older version (it's normal not to remove methods from classes, although it can be done).
In this case, if we go to the javadoc of the class we see
That is, the code that uses this class needs at least version 3.2 of Apache Commons - Lang.
Review the list of struts dependencies and make sure they are on the correct version. Consider using Maven/Ivy/any other dependency manager to get this and similar problems off your back.