myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From " (JIRA)" <>
Subject [jira] Created: (MYFACES-2916) "java.lang.NoSuchMethodException" error when call a managedbean int method
Date Mon, 13 Sep 2010 10:07:34 GMT
"java.lang.NoSuchMethodException" error when call a managedbean int method

                 Key: MYFACES-2916
             Project: MyFaces Core
          Issue Type: Bug
          Components: General
    Affects Versions: 2.0.2-SNAPSHOT
         Environment: OS:winxp
JDK: 1.6.0_20
            Priority: Minor
         Attachments: el-exercises.war

1. Create a managed bean ,defind an int field
package coreservlets;

import javax.faces.bean.*;

public class SpanishColorMapper extends ColorMapper {
    private int age;
  public SpanishColorMapper() {
    super("Spanish", "rojo", "anaranjado", "amarillo",
          "verde", "negro", "blanco");
  public int calYear(int x) {
      return age + x;
  public int getAge() {
      return age;
  public void setAge(int x) {
      age = x;

2.Direclty call calYear method in xhtml like:
but  it's reported that :
java.lang.NoSuchMethodException: coreservlets.SpanishColorMapper.calYear(java.lang.Long)

Caused by:
java.lang.NoSuchMethodException - coreservlets.SpanishColorMapper.calYear(java.lang.Long)

Seems number is set as Long by default , not type as managedbean

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message