struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "surahma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4849) ObjectFactory constructor signature change breaks extensions
Date Fri, 22 Sep 2017 10:59:00 GMT

    [ https://issues.apache.org/jira/browse/WW-4849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16176265#comment-16176265
] 

surahma commented on WW-4849:
-----------------------------

[~lukaszlenart] i think , when i am use struts 2.5.10.1 the issue is not problem , but when
i am upgrade to 2.5.13 the error shown,

may be ObjectFactory in struts 2.5.13 must same to ObjectFactory 2.5.10.1


ERROR Dispatcher Dispatcher initialization failed
17:05:23,679 ERROR [STDERR]  
17:05:23,680 ERROR [STDERR] java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
17:05:23,680 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:131)
17:05:23,680 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:52)
17:05:23,680 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:491)
17:05:23,680 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:501)
17:05:23,680 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.ContainerImpl$9.call(ContainerImpl.java:532)
17:05:23,680 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:560)
17:05:23,681 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:530)
17:05:23,681 ERROR [STDERR] 	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:181)
17:05:23,681 ERROR [STDERR] 	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:63)
17:05:23,681 ERROR [STDERR] 	at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:960)
17:05:23,681 ERROR [STDERR] 	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:466)
17:05:23,681 ERROR [STDERR] 	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:499)
17:05:23,681 ERROR [STDERR] 	at org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:75)
17:05:23,681 ERROR [STDERR] 	at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:63)
17:05:23,681 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:234)
17:05:23,681 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:332)
17:05:23,681 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:90)
17:05:23,681 ERROR [STDERR] 	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3783)
17:05:23,682 ERROR [STDERR] 	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4413)
17:05:23,682 ERROR [STDERR] 	at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
17:05:23,682 ERROR [STDERR] 	at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
17:05:23,682 ERROR [STDERR] 	at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
17:05:23,682 ERROR [STDERR] 	at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
17:05:23,682 ERROR [STDERR] 	at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
17:05:23,682 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17:05:23,682 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
17:05:23,682 ERROR [STDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
17:05:23,682 ERROR [STDERR] 	at java.lang.reflect.Method.invoke(Method.java:606)
17:05:23,682 ERROR [STDERR] 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
17:05:23,682 ERROR [STDERR] 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
17:05:23,683 ERROR [STDERR] 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
17:05:23,683 ERROR [STDERR] 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
17:05:23,683 ERROR [STDERR] 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
17:05:23,683 ERROR [STDERR] 	at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
17:05:23,683 ERROR [STDERR] 	at com.sun.proxy.$Proxy39.start(Unknown Source)
17:05:23,683 ERROR [STDERR] 	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
17:05:23,683 ERROR [STDERR] 	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
17:05:23,683 ERROR [STDERR] 	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
17:05:23,683 ERROR [STDERR] 	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
17:05:23,683 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
17:05:23,683 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
17:05:23,683 ERROR [STDERR] 	at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
17:05:23,684 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
17:05:23,684 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
17:05:23,684 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
17:05:23,684 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
17:05:23,684 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
17:05:23,684 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
17:05:23,684 ERROR [STDERR] 	at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
17:05:23,684 ERROR [STDERR] 	at org.jboss.system.ServiceController.start(ServiceController.java:460)
17:05:23,684 ERROR [STDERR] 	at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
17:05:23,684 ERROR [STDERR] 	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
17:05:23,684 ERROR [STDERR] 	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
17:05:23,685 ERROR [STDERR] 	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
17:05:23,685 ERROR [STDERR] 	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
17:05:23,685 ERROR [STDERR] 	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
17:05:23,685 ERROR [STDERR] 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
17:05:23,685 ERROR [STDERR] 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
17:05:23,685 ERROR [STDERR] 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
17:05:23,685 ERROR [STDERR] 	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
17:05:23,685 ERROR [STDERR] 	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
17:05:23,685 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
17:05:23,685 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
17:05:23,685 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
17:05:23,685 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
17:05:23,686 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
17:05:23,686 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
17:05:23,686 ERROR [STDERR] 	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
17:05:23,686 ERROR [STDERR] 	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
17:05:23,686 ERROR [STDERR] 	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
17:05:23,686 ERROR [STDERR] 	at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
17:05:23,686 ERROR [STDERR] 	at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
17:05:23,686 ERROR [STDERR] 	at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
17:05:23,686 ERROR [STDERR] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
17:05:23,686 ERROR [STDERR] 	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
17:05:23,686 ERROR [STDERR] 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
17:05:23,686 ERROR [STDERR] 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
17:05:23,687 ERROR [STDERR] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
17:05:23,687 ERROR [STDERR] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
17:05:23,687 ERROR [STDERR] 	at java.lang.Thread.run(Thread.java:745)
17:05:23,687 ERROR [STDERR] Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
17:05:23,687 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:479)
17:05:23,687 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:516)
17:05:23,687 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:569)
17:05:23,688 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:514)
17:05:23,688 ERROR [STDERR] 	at com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
17:05:23,688 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:129)
17:05:23,688 ERROR [STDERR] 	... 79 more
17:05:23,688 ERROR [STDERR] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
17:05:23,688 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:427)
17:05:23,688 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:477)
17:05:23,688 ERROR [STDERR] 	... 84 more
17:05:23,689 ERROR [STDERR] Caused by: java.lang.reflect.InvocationTargetException
17:05:23,689 ERROR [STDERR] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
17:05:23,689 ERROR [STDERR] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
17:05:23,689 ERROR [STDERR] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
17:05:23,689 ERROR [STDERR] 	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
17:05:23,689 ERROR [STDERR] 	at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:410)
17:05:23,689 ERROR [STDERR] 	... 85 more
17:05:23,689 ERROR [STDERR] Caused by: java.lang.NoSuchMethodError: com.opensymphony.xwork2.ObjectFactory:
method <init>()V not found
17:05:23,689 ERROR [STDERR] 	at cn.agrael.struts.plugin.ejb3.EJBObjectFactory.<init>(EJBObjectFactory.java:17)
17:05:23,690 ERROR [STDERR] 	... 90 more
17:05:23,691 ERROR [[/RiskMonitoring]] Exception starting filter struts2
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
- Class: com.opensymphony.xwork2.inject.ContainerBuilder$4
File: ContainerBuilder.java
Method: create
Line: 131 - com/opensymphony/xwork2/inject/ContainerBuilder.java:131:-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.getFilter(ApplicationFilterConfig.java:234)




> ObjectFactory constructor signature change breaks extensions
> ------------------------------------------------------------
>
>                 Key: WW-4849
>                 URL: https://issues.apache.org/jira/browse/WW-4849
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5.13
>            Reporter: Mitth'raw'nuruodo
>             Fix For: 2.5.14
>
>
> Commit {{6f91d0776a545c911ca4f2875ed9976614711ef9}} changed the signature of the {{ObjectFactory}}
constructor, breaking all classes that extend {{ObjectFactory}} (as per https://struts.apache.org/docs/objectfactory.html).
This affects eg the [{{guice-servlet}} Struts plugin| https://github.com/google/guice/blob/master/extensions/struts2/src/com/google/inject/struts2/Struts2Factory.java].
> This was not listed on the [2.5.13 version notes|https://struts.apache.org/docs/version-notes-2513.html]
as a breaking change, and breaking changes should preferably be avoided in critical security
updates.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message