ICEfaces
  1. ICEfaces
  2. ICE-1841

NoSuchMethodError CharSequence argument to StringBuffer.insert

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6.1
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      JDK 1.5 compilation and JDK 1.4 execution

      Description


      Certain applications will throw the following exception on JDK 1.4 with the ICEfaces binaries:

      java.lang.NoSuchMethodError: java.lang.StringBuffer: method insert(ILjava/lang/CharSequence;)Ljava/lang/StringBuffer; not found
      com.icesoft.faces.component.util.CustomComponentUtils.getPathToComponent(CustomComponentUtils.java:204)
      com.icesoft.faces.component.util.CustomComponentUtils.getPathToComponent(CustomComponentUtils.java:177)
      com.icesoft.faces.component.util.CustomComponentUtils.getDateValue(CustomComponentUtils.java:536)
      com.icesoft.faces.component.selectinputdate.SelectInputDateRenderer.encodeEnd(SelectInputDateRenderer.java:311)
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java(Compiled Code))
      com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java(Compiled Code))
      com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java(Compiled Code))
      com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java(Compiled Code))
      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java(Compiled Code))
      com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java(Compiled Code))
      com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java(Compiled Code))
      com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java(Compiled Code))
      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java(Compiled Code))
      com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java(Compiled Code))

        Activity

        Hide
        Ted Goddard added a comment -

        ICEfaces is compiled using JDK 1.5 with a JDK 1.4 target. The following simple example shows the problem:

        public class InsertTest {
        public static void main(String[] args)

        { StringBuffer buf = new StringBuffer("hello"); buf.insert(0, buf); System.out.println(buf); }

        }

        /usr/local/jdk1.5.0_06/bin/javac -target 1.4 -source 1.4 InsertTest.java
        /usr/local/java/bin/java InsertTest

        Exception in thread "main" java.lang.NoSuchMethodError: java.lang.StringBuffer.insert(ILjava/lang/CharSequence;)Ljava/lang/StringBuffer;
        at InsertTest.main(InsertTest.java:6)

        The JDK 1.5 compiler is emitting code that is not supported by JDK 1.4.

        Show
        Ted Goddard added a comment - ICEfaces is compiled using JDK 1.5 with a JDK 1.4 target. The following simple example shows the problem: public class InsertTest { public static void main(String[] args) { StringBuffer buf = new StringBuffer("hello"); buf.insert(0, buf); System.out.println(buf); } } /usr/local/jdk1.5.0_06/bin/javac -target 1.4 -source 1.4 InsertTest.java /usr/local/java/bin/java InsertTest Exception in thread "main" java.lang.NoSuchMethodError: java.lang.StringBuffer.insert(ILjava/lang/CharSequence;)Ljava/lang/StringBuffer; at InsertTest.main(InsertTest.java:6) The JDK 1.5 compiler is emitting code that is not supported by JDK 1.4.
        Hide
        Ted Goddard added a comment -

        jdk1.6.0_01 shows the same problem.

        Show
        Ted Goddard added a comment - jdk1.6.0_01 shows the same problem.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: