0

Sigo haciendo una migracion de struts 2.3 a 2.5.

Cuando arranco el servidor tomcat me arroja el siguiente 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

Supongo que el error es el anterior, he buscado por google y no veo mucha información concreta sino mas bien errores particulares.

1 respuesta 1

2

Un java.lang.NoSuchMethodError significa:

  • He encontrado la clase que buscaba

  • Pero el método que quería invocar de la clase no existe.

El problema viene de que el código se ha compilado contra una versión de la clase diferente de la que encuentra. Normalmente, con una versión anterior (es normal no eliminar métodos de las clases, aunque se puede hacer).

En este caso, si vamos al javadoc de la clase vemos

Since:

3.2

Es decir, que el código que usa esta clase necesita como mínimo la versión 3.2 de Apache Commons - Lang.

Revisa la lista de dependencias de struts y que estén en la versión correcta. Considera usar Maven/Ivy/cualquier otro gestor de dependencias para quitarte este y problemas similares de encima.

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.