java.lang.NoSuchMethodError: java.io.Writer.append(Ljava/lang/CharSequence;)Ljava/io/Writer;

Spring JIRA | Stuart Wood | 9 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    There is a call to a method that was only added in java 1.5 within one of the Mock classes used when testing xml flows. The particular call causing problems is context.getExternalContext().getResponseWriter().append(viewId); of org.springframework.webflow.test.MockViewFactoryCreator$MockView.render(MockViewFactoryCreator.java:109) The method append was only added to the Writer class as of 1.5, therefore when using java 1.4 then following NoSuchMethodError occurs, I have worked round this for the time being by running the test with the 1.5 runtime, but this is not ideal. java.lang.NoSuchMethodError: java.io.Writer.append(Ljava/lang/CharSequence;)Ljava/io/Writer; at org.springframework.webflow.test.MockViewFactoryCreator$MockView.render(MockViewFactoryCreator.java:109) at org.springframework.webflow.engine.ViewState.render(ViewState.java:240) at org.springframework.webflow.engine.ViewState.doEnter(ViewState.java:179) at org.springframework.webflow.engine.State.enter(State.java:193) at org.springframework.webflow.engine.Transition.execute(Transition.java:222) at org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51) at org.springframework.webflow.engine.State.enter(State.java:193) at org.springframework.webflow.engine.Flow.start(Flow.java:515) at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:357) at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:239) at org.springframework.webflow.test.execution.AbstractFlowExecutionTests.startFlow(AbstractFlowExecutionTests.java:123) at org.springframework.webflow.test.execution.AbstractFlowExecutionTests.startFlow(AbstractFlowExecutionTests.java:111)

    Spring JIRA | 9 years ago | Stuart Wood
    java.lang.NoSuchMethodError: java.io.Writer.append(Ljava/lang/CharSequence;)Ljava/io/Writer;
  2. 0

    There is a call to a method that was only added in java 1.5 within one of the Mock classes used when testing xml flows. The particular call causing problems is context.getExternalContext().getResponseWriter().append(viewId); of org.springframework.webflow.test.MockViewFactoryCreator$MockView.render(MockViewFactoryCreator.java:109) The method append was only added to the Writer class as of 1.5, therefore when using java 1.4 then following NoSuchMethodError occurs, I have worked round this for the time being by running the test with the 1.5 runtime, but this is not ideal. java.lang.NoSuchMethodError: java.io.Writer.append(Ljava/lang/CharSequence;)Ljava/io/Writer; at org.springframework.webflow.test.MockViewFactoryCreator$MockView.render(MockViewFactoryCreator.java:109) at org.springframework.webflow.engine.ViewState.render(ViewState.java:240) at org.springframework.webflow.engine.ViewState.doEnter(ViewState.java:179) at org.springframework.webflow.engine.State.enter(State.java:193) at org.springframework.webflow.engine.Transition.execute(Transition.java:222) at org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51) at org.springframework.webflow.engine.State.enter(State.java:193) at org.springframework.webflow.engine.Flow.start(Flow.java:515) at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:357) at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:239) at org.springframework.webflow.test.execution.AbstractFlowExecutionTests.startFlow(AbstractFlowExecutionTests.java:123) at org.springframework.webflow.test.execution.AbstractFlowExecutionTests.startFlow(AbstractFlowExecutionTests.java:111)

    Spring JIRA | 9 years ago | Stuart Wood
    java.lang.NoSuchMethodError: java.io.Writer.append(Ljava/lang/CharSequence;)Ljava/io/Writer;

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      java.io.Writer.append(Ljava/lang/CharSequence;)Ljava/io/Writer;

      at org.springframework.webflow.test.MockViewFactoryCreator$MockView.render()
    2. Spring Web Flow
      AbstractFlowExecutionTests.startFlow
      1. org.springframework.webflow.test.MockViewFactoryCreator$MockView.render(MockViewFactoryCreator.java:109)
      2. org.springframework.webflow.engine.ViewState.render(ViewState.java:240)
      3. org.springframework.webflow.engine.ViewState.doEnter(ViewState.java:179)
      4. org.springframework.webflow.engine.State.enter(State.java:193)
      5. org.springframework.webflow.engine.Transition.execute(Transition.java:222)
      6. org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
      7. org.springframework.webflow.engine.State.enter(State.java:193)
      8. org.springframework.webflow.engine.Flow.start(Flow.java:515)
      9. org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:357)
      10. org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:239)
      11. org.springframework.webflow.test.execution.AbstractFlowExecutionTests.startFlow(AbstractFlowExecutionTests.java:123)
      12. org.springframework.webflow.test.execution.AbstractFlowExecutionTests.startFlow(AbstractFlowExecutionTests.java:111)
      12 frames