yuwei5380 / jsonplugin

Automatically exported from code.google.com/p/jsonplugin
0 stars 0 forks source link

NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get (struts-2.1.6, jsonplugin 0.3.3) #79

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I use jsonpluging-0.3.3 with struts-2.1.6
2. It throws exception NoSuchMethodError:
com.opensymphony.xwork2.ActionContext.get(...)

Please provide any additional information below.

I look into jsonplugin's code and fix this error by adding the flowing code:
- JSONResult.java

    public void execute(ActionInvocation invocation) throws Exception {
//        ActionContext actionContext = invocation.getInvocationContext();
        ActionContext actionContext = ActionContext.getContext();
      .........
      .........
    }

    protected com.googlecode.jsonplugin.smd.SMD writeSMD(ActionInvocation
invocation) {
//        ActionContext actionContext = invocation.getInvocationContext();
        ActionContext actionContext = ActionContext.getContext();
      .........
      .........
    }

Original issue reported on code.google.com by tungnq.n...@gmail.com on 17 Jan 2009 at 4:27

GoogleCodeExporter commented 8 years ago
Hi, I´m Roberto, from Spain, I have had the same problem but only with struts 
2.0.6,
when I have upgraded my protect to struts 2.1.6 version, the problem have
disappeared. You can see it at http://code.google.com/p/timelapse/.

Original comment by robertov...@gmail.com on 31 Jan 2009 at 5:46

GoogleCodeExporter commented 8 years ago
I have tried version 0.33 with struts-2.1.6 and it works fine. Version 0.31 
cause the 
problem, I think you need to make sure it's deleted, I believe if you use 
eclipse and 
delete the old jar from the lib folder it will still be present on the deploy 
directory, you have to clean the deploy folder

Original comment by omer.daw...@gmail.com on 12 Feb 2009 at 12:13

GoogleCodeExporter commented 8 years ago
As mentioned, this is fixed in 0.33 make sure all you dont have a duplicated 
jar.

Original comment by musa...@gmail.com on 28 Jul 2009 at 5:22