Details
-
Type: Bug
-
Status: Closed
-
Priority: 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
-
ICEsoft Forum Reference:
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))
ICEfaces is compiled using JDK 1.5 with a JDK 1.4 target. The following simple example shows the problem:
public class InsertTest {
{ StringBuffer buf = new StringBuffer("hello"); buf.insert(0, buf); System.out.println(buf); }public static void main(String[] args)
}
/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.