Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9128199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:27:34+00:00 2026-06-17T07:27:34+00:00

I have this very simple page wich is driving me crazy. basically I have

  • 0

I have this very simple page wich is driving me crazy.
basically I have 2 buttons calling method on a bean, but it won’t call them, each time I get :

javax.el.MethodNotFoundException: /vues/vehicule/creationVehicule.xhtml @49,94 action=”#{creationVehicule.creer}”: Method not found: fr.efrei.gpa.web.beans.vehicule.ModificationVehiculeBean@1387498.creer()

this is my controller (I removed the imports)

@Getter
@Setter
@ManagedBean(name = "creationVehicule")
@ViewScoped
public class CreationVehiculeBean implements Serializable{
    //
    private static final long serialVersionUID = 4790600937909196533L;
    private String immatriculation;
    private Date dateAchat;
    private String marque;
    private String modele;
    private String kilometrage;
    private String puissance;
    private String etat;

    private VehiculeService vehiculeService = new VehiculeDelegate();

    public void creer() throws Exception{
        Vehicule v = new Vehicule();
        v.setImmatriculation(immatriculation);
        v.setKilometrage(kilometrage);
        v.setMarque(marque);
        v.setModele(modele);
        v.setPuissance(puissance);
        v.setEtat("etat");
        v.setDateAchat(dateAchat);
        int id = vehiculeService.create(v);

        FacesContext.getCurrentInstance().getExternalContext().redirect("/web-office/vue/vehicule/rechercherContrat.xhtml&id="+Integer.toString(id));
    }

    public String annuler(){
        return "/vues/vehicule/rechercheVehicule?faces-redirect=true";
    }

}

And this is my view

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:cogepat="http://cogepat.com/facelets"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:ccc="http://java.sun.com/jsf/composite/compositeForms"
    xmlns:cccg="http://java.sun.com/jsf/composite/compositeGeneral">

<ui:composition template="/templates/template.xhtml">
    <ui:param name="module" value="vehicules" />
    <ui:define name="title">
        #{msg.CreerUnProduit}
    </ui:define>

    <ui:define name="titreModule">
        #{msg.GestionVehicule}
    </ui:define>

    <ui:define name="onglets">
        <ul>
            <li>
                <a class="tab" href="#{facesContext.externalContext.requestContextPath}/vues/vehicule/rechercheVehicule.xhtml">#{msg.RechercherUnVehicule}</a>
            </li>
            <li>
                <a class="selectedTab" href="#{facesContext.externalContext.requestContextPath}/vues/vehicule/creationVehicule.xhtml">#{msg.CreerUnVehicule}</a>
            </li>
        </ul>
    </ui:define>

    <ui:define name="nav">
        <h:form>
            <h:commandLink id="link1" value="#{msg.vehicules}" action="rechercheVehicule.xhtml" />
                >#{msg.creation}
        </h:form>
    </ui:define>


    <ui:define name="titreOnglet">
        #{msg.FormCreationVehicule}
    </ui:define>

    <ui:define name="corpsContenu">
        <ccc:formVehicule bean="#{creationVehicule}" />
        <div class="boutons">
                <h:commandButton type="submit" value="#{msg.creer}" action="#{creationVehicule.creer}" />
                <h:commandButton type="submit" value="#{msg.annuler}" action="#{creationVehicule.annuler}" />
        </div>
        <br/><br/>
    </ui:define>

</ui:composition>
</html>

so when I clic on either one of those buttons I get the error.
which is weird because I’m calling method in other bean from other page in the excat same way.

the buttons

Any ideas?
thanks.

I’m using the JDK 6u35,
richfaces 4.2.1.Final,
tomcat 7,
and JSF 2.1.6

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:27:35+00:00Added an answer on June 17, 2026 at 7:27 am

    Look once again at the exception message and then particularly at the class name:

    fr.efrei.gpa.web.beans.vehicule.ModificationVehiculeBean@1387498.creer()
    

    That’s not the FQN of the CreationVehiculeBean class which you’re having at hands. This suggests that you’ve another managed bean class ModificationVehiculeBean which uses exactly the same managed bean name and got precedence in classloading and/or was the last one in managed bean registration.

    Giving the ModificationVehiculeBean class a different managed bean name should fix this problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this html page which is very simple, it contains a text box
Okay this question is very simple: I have a facebook page, and a website.
I'm sure this is very simple. I have gotten colorbox to work before, but
i have this very simple download page to get an xml file. the script
This should be simple but I cannot figure it out. I have this very
I have a very simple page that is displaying canned data. I experienced this
We have a very simple page for displaying the records. Basically, it passes certain
This is a very simple question I know, but I have this jQuery code
I have this very simple page: <html> <head> </head> <body>Handling... <script> var token =
This is probably very simple, but I can't work it out. I have this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.