java.lang.NoSuchMethodError: net.sf.json.JSONObject.<init>(Ljava/lang/String;)V

Spring JIRA | Rinaldo Cavalieri | 10 years ago
  1. 0

    In the latest Jason-lib-1.0 the constructor private JSONObject( String string) was substituted by the constructor private JSONObject( String string, String[] excludes, boolean ignoreDefaultExcludes ) This constructor is called in the "initEvent" method o f AjaxInterceptor class, so when a jason parameter was passed, the AjaxInterceptor return this error java.lang.NoSuchMethodError: net.sf.json.JSONObject.<init>(Ljava/lang/String;)V at org.springmodules.xt.ajax.AjaxInterceptor.initEvent(AjaxInterceptor.java:395) at org.springmodules.xt.ajax.AjaxInterceptor.preHandle(AjaxInterceptor.java:126) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:810) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:755) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) The old 0.9 version of jeson-lib work fine (so, it can be used while this bug isn't fixed)

    Spring JIRA | 10 years ago | Rinaldo Cavalieri
    java.lang.NoSuchMethodError: net.sf.json.JSONObject.<init>(Ljava/lang/String;)V
  2. 0

    In the latest Jason-lib-1.0 the constructor private JSONObject( String string) was substituted by the constructor private JSONObject( String string, String[] excludes, boolean ignoreDefaultExcludes ) This constructor is called in the "initEvent" method o f AjaxInterceptor class, so when a jason parameter was passed, the AjaxInterceptor return this error java.lang.NoSuchMethodError: net.sf.json.JSONObject.<init>(Ljava/lang/String;)V at org.springmodules.xt.ajax.AjaxInterceptor.initEvent(AjaxInterceptor.java:395) at org.springmodules.xt.ajax.AjaxInterceptor.preHandle(AjaxInterceptor.java:126) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:810) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:755) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) The old 0.9 version of jeson-lib work fine (so, it can be used while this bug isn't fixed)

    Spring JIRA | 10 years ago | Rinaldo Cavalieri
    java.lang.NoSuchMethodError: net.sf.json.JSONObject.<init>(Ljava/lang/String;)V
  3. 0

    From 2.0 version of json lib the static method public JSONObject getJSONObject(String key) used in private void initEvent(AjaxEvent event, HttpServletRequest request) on the class org.springmodules.xt.ajax.AjaxInterceptor was deprecated and removed in the next version..so, it's impossible to use the latest json-lib version (2.2) with Spring Modules Xt that return java.lang.NoSuchMethodError: net.sf.json.JSONObject.fromString(Ljava/lang/String;)Lnet/sf/json/JSONObject; at org.springmodules.xt.ajax.AjaxInterceptor.initEvent(AjaxInterceptor.java:432) at org.springmodules.xt.ajax.AjaxInterceptor.preHandle(AjaxInterceptor.java:139) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:865) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)

    Spring JIRA | 8 years ago | Rinaldo Cavalieri
    java.lang.NoSuchMethodError: net.sf.json.JSONObject.fromString(Ljava/lang/String;)Lnet/sf/json/JSONObject;
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    From 2.0 version of json lib the static method public JSONObject getJSONObject(String key) used in private void initEvent(AjaxEvent event, HttpServletRequest request) on the class org.springmodules.xt.ajax.AjaxInterceptor was deprecated and removed in the next version..so, it's impossible to use the latest json-lib version (2.2) with Spring Modules Xt that return java.lang.NoSuchMethodError: net.sf.json.JSONObject.fromString(Ljava/lang/String;)Lnet/sf/json/JSONObject; at org.springmodules.xt.ajax.AjaxInterceptor.initEvent(AjaxInterceptor.java:432) at org.springmodules.xt.ajax.AjaxInterceptor.preHandle(AjaxInterceptor.java:139) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:865) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)

    Spring JIRA | 8 years ago | Rinaldo Cavalieri
    java.lang.NoSuchMethodError: net.sf.json.JSONObject.fromString(Ljava/lang/String;)Lnet/sf/json/JSONObject;
  6. 0

    Having issues with ICBM startup

    GitHub | 2 years ago | fatyg5
    java.lang.NoSuchMethodError: com.builtbroken.mc.lib.mod.AbstractMod.<init>(Ljava/lang/String;Ljava/lang/String;)V

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      net.sf.json.JSONObject.<init>(Ljava/lang/String;)V

      at org.springmodules.xt.ajax.AjaxInterceptor.initEvent()
    2. org.springmodules.xt
      AjaxInterceptor.preHandle
      1. org.springmodules.xt.ajax.AjaxInterceptor.initEvent(AjaxInterceptor.java:395)
      2. org.springmodules.xt.ajax.AjaxInterceptor.preHandle(AjaxInterceptor.java:126)
      2 frames
    3. Spring MVC
      FrameworkServlet.doGet
      1. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:810)
      2. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:755)
      3. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
      4. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350)
      4 frames
    4. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      2 frames
    5. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      8. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      8 frames
    6. Grizzly HTTP
      LeaderFollowerWorkerThread.runIt
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      2. org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      3. org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      4. org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      4 frames
    7. Tomcat Util
      ThreadPool$ControlRunnable.run
      1. org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      1 frame
    8. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame