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

  • Home
  • SEARCH
  • 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 8420051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:47:06+00:00 2026-06-10T02:47:06+00:00

My DAO always throws this exception: java.lang.NoSuchMethodError: fr.la.juserright.metier.Ressource.<init>(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V RessourceDAO: public List<Ressource> readAll() throws SQLException

  • 0

My DAO always throws this exception: java.lang.NoSuchMethodError: fr.la.juserright.metier.Ressource.<init>(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V

RessourceDAO:

public List<Ressource> readAll() throws SQLException {
    List<Ressource> __ressource = new ArrayList<Ressource>();
    PreparedStatement _stmt = null;
    ResultSet _rs = null;

    try {
        _stmt = this.cnxUserRight.getCnx().prepareStatement(
                "SELECT * FROM ressource");
        _rs = _stmt.executeQuery();
        while (_rs.next()) {
            Ressource _ressourcetmp = this.getRessource(_rs);
            __ressource.add(_ressourcetmp);
        }
    } catch (NamingException e) {
        e.printStackTrace();
    } finally {
        if (null != _rs) {
            _rs.close();
        }
        if (null != _stmt) {
            _stmt.close();
            this.cnxUserRight.closeCnx();
        }
    }
    return __ressource;
}

public Ressource getRessourceByPathForUpdate(String Path, int idressource)
        throws SQLException {
    Ressource _ressource = null;
    PreparedStatement _stmt = null;
    ResultSet _rs = null;

    try {
        _stmt = this.cnxUserRight
                .getCnx()
                .prepareStatement(
                        "SELECT * FROM ressource WHERE path like ? and idressource not like ?;");
        _stmt.setString(1, Path);
        _stmt.setInt(2, idressource);
        _rs = _stmt.executeQuery();
        if (_rs.next()) {
            _ressource = this.getRessource(_rs);
        } else {
            _ressource = null;
        }
    } catch (NamingException e) {
        e.printStackTrace();
    } finally {
        if (null != _rs) {
            _rs.close();
        }
        if (null != _stmt) {
            _stmt.close();
            this.cnxUserRight.closeCnx();
        }
    }
    return _ressource;
}

private Ressource getRessourceForChild(int _idChild) throws SQLException {
    Ressource _ressource = null;
    PreparedStatement _stmt = null;
    ResultSet _rs = null;
    try {
        _stmt = this.cnxUserRight.getCnx().prepareStatement(
                "SELECT * FROM ressource " + "WHERE idressource = ("
                        + "SELECT idressource "
                        + "FROM ressource_ressource "
                        + "WHERE idressource_ressource = ?);");
        _stmt.setInt(1, _idChild);
        _rs = _stmt.executeQuery();
        if (_rs.next()) {
            _ressource = this.getRessource(_rs);
        }
    } catch (NamingException e) {
        e.printStackTrace();
    } finally {
        if (null != _rs) {
            _rs.close();
        }
        if (null != _stmt) {
            _stmt.close();
            this.cnxUserRight.closeCnx();
        }
    }
    return _ressource;
}

private List<Ressource> getRessourceForMOM(int _idmere) throws SQLException {
    List<Ressource> _ressource = new ArrayList<Ressource>();
    PreparedStatement _stmt = null;
    ResultSet _rs = null;

    String _sql = "SELECT * FROM ressource "
            + "WHERE idressource_ressource = ("
            + "SELECT idressource_ressource " + "FROM ressource_ressource "
            + "WHERE idressource = " + _idmere + ");";
    try {

        _stmt = this.cnxUserRight.getCnx().prepareStatement(_sql);
        _rs = _stmt.executeQuery();
        while (_rs.next()) {
            _ressource.add(this.getRessource(_rs));
        }
    } catch (NamingException e) {
        e.printStackTrace();
    } finally {
        if (null != _rs) {
            _rs.close();
        }
        if (null != _stmt) {
            _stmt.close();
            this.cnxUserRight.closeCnx();
        }
    }
    return _ressource;
}

private Ressource getRessource(ResultSet _rs) throws SQLException {

    int _idRessource = _rs.getInt("idressource");
    String _path = _rs.getString("path");
    String _menu = _rs.getString("menu");
    String _description = _rs.getString("description");
    int _idressource_ressource = _rs.getInt("idressource_ressource");
    Ressource _ressource;
    if (_idressource_ressource != 0) {
        _ressource = new Ressource(_idRessource, _path, _menu,
                _description,
                this.getRessourceForChild(_idressource_ressource));
    } else {
        List<Ressource> _ressourceList = this
                .getRessourceForMOM(_idressource_ressource);
        _ressource = new Ressource(_idRessource, _path, _menu,
                _description, _ressourceList);
    }
    return _ressource;
}

Stack trace:

ATTENTION: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception java.lang.NoSuchMethodError: fr.la.juserright.metier.Ressource.<init>(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V
at fr.la.juserright.dao.RessourceDAO.getRessource(RessourceDAO.java:451)
at fr.la.juserright.dao.RessourceDAO.readAll(RessourceDAO.java:86)
at fr.la.juserright.service.RessourceModule.getAllRessource(RessourceModule.java:33)
at fr.la.juserright.service.ServiceUserRight.getAllRessource(ServiceUserRight.java:132)
at fr.la.juserright.managedbean.ressourceBean.refreshlist(ressourceBean.java:102)
at fr.la.juserright.managedbean.ressourceBean.<init>(ressourceBean.java:42)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:188)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:102)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:103)
at com.sun.el.parser.AstValue.getTarget(AstValue.java:149)
at com.sun.el.parser.AstValue.getType(AstValue.java:84)
at com.sun.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:200)
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:98)
at org.primefaces.component.datatable.DataTable.isLazy(DataTable.java:968)
at org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:191)
at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:108)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1764)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:57)
at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:45)
at org.primefaces.component.layout.LayoutUnitRenderer.encodeEnd(LayoutUnitRenderer.java:51)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1764)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)

If you have an idea I’m interested.

  • 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-10T02:47:08+00:00Added an answer on June 10, 2026 at 2:47 am

    java.lang.NoSuchMethodError: fr.la.juserright.metier.Ressource.(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V

    This means that the following constructor of the fr.la.juserright.metier.Ressource class doesn’t exist at all in the current runtime classpath.

    public Ressource(int arg1, String arg2, String arg3, String arg4, int arg5) {}
    

    But the code given so far doesn’t seem to use that constructor anywhere. The two new Resource() calls in the ResourceDAO class use either Ressource or List<Ressource> as 5th argument.

    Apparently the runtime classpath is dirty and you were running an outdated version of RessourceDAO all the time, while the Ressource class has properly been updated in the runtime classpath.

    Clean, rebuild, redeploy and restart.

    Note that this problem has nothing to do with JSF. The underlying exception is not coming from the javax.faces package, but just from the java.lang package, which basically indicates a basic Java language/runtime problem.

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

Sidebar

Related Questions

Java documentation says: As a matter of style, programmers should always use this annotation
why i always get userDetailDao exception null when executed : package com.springweb.service; import com.springweb.dao.UserDetailDao;
When programming in Java is it always necessary to code according to the DAO
I have this DAO.. public class AreaDAO { private Database database; public AreaDAO(Database database)
Hi I generate Dao classes for some DB operations in this manner making methods
This statement always returns only one record everytime when its executed Dim rs As
dao.DBEngine DBE; dao.Database DB; dao.Recordset RS; string DBPath; DBPath = C:\\Test\\test.mdb; DBE = new
If my Dao layer throws Dao specific exceptions, then does handling them in my
I am trying to cache the result of a DAO, following this JDBC Caching
package dao; import java.sql.ResultSet; import java.sql.SQLException; import org.krams.tutorial.oxm.SubscriptionRequest; import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport; public class

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.