You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Janne Kario (JIRA)" <de...@myfaces.apache.org> on 2006/11/20 21:40:03 UTC

[jira] Created: (MYFACES-1498) Myfaces core not 1.4 compatible

Myfaces core not 1.4 compatible
-------------------------------

                 Key: MYFACES-1498
                 URL: http://issues.apache.org/jira/browse/MYFACES-1498
             Project: MyFaces Core
          Issue Type: Bug
          Components: General
    Affects Versions: 1.1.3
         Environment: IBM Java 1.4.2
            Reporter: Janne Kario
            Priority: Minor


I stubled upon this NoSuchMethodError and did a google search and found out that other people on myfaces-user have had this problem too.

As described in http://thicksliced.blogspot.com/2006/04/compiling-for-older-jvms.html the problem is StringBuffer.insert call in _SelectItemsIterator.java:228

My guess is that myfaces-core-1.1.3 release was compiled with 1.5.0 compiler using source="1.4" and target="1.4" switches. Can someone confirm this?
Apparently this alone is not enough to guarantee complete 1.4 compatibility.

I will recompile 1.1.4 myself with 1.4 compiler to confirm this.

There is also a workaround that can be applied in the source level. Cast the second argument of the insert call to Object. insert(2, (Object)strBuf)


[20.11.2006 16:59:10:955 EET] 0000002f ServletWrappe E   SRVE0014E: Uncaught service() exception root cause faces: java.lang.NoSuchMethodError: java/lang/StringBuffer.insert(ILjava/lang/CharSequence;)Ljava/lang/StringBuffer;
        at javax.faces.component._SelectItemsIterator.getPathToComponent(_SelectItemsIterator.java:228)
        at javax.faces.component._SelectItemsIterator.getPathToComponent(_SelectItemsIterator.java:199)
        at javax.faces.component._SelectItemsIterator.hasNext(_SelectItemsIterator.java:131)
        at javax.faces.component._SelectItemsUtil.matchValue(_SelectItemsUtil.java:46)
        at javax.faces.component.UISelectOne.validateValue(UISelectOne.java:62)
        at javax.faces.component.UIInput.validate(UIInput.java:353)
        at javax.faces.component.UIInput.processValidators(UIInput.java:183)
        at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
        at javax.faces.component.UIForm.processValidators(UIForm.java:70)
        at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:624)
        at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:146)
        at org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(LifecycleImpl.java:262)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
        at org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java:74)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira