4 Replies Latest reply on Aug 13, 2002 1:11 AM by Dain Sundstrom

    Postgres: unknown query????

    kiuma Newbie

      Hello everybody, I'm having the following problem:

      I've a customer class that seems to be well bound to my datasource; in fact whent I call the findAll() method it works pretty well.

      The problem is when I try to call methods like findCustomerByName(lastName, firstName);

      I'm using a modified version of the template project given with Jboss.

      So the piece of code declaring the implied piece of code of my EntityBean file is :

      *
      * @ejb:finder signature="java.util.Collection findAll()"
      *
      * @ejb:finder signature="java.util.Collection findCustomerByName( java.lang.String pLastName, java.lang.String pFirstName )"
      *
      * @jboss:finder-query name="findCustomerByName"
      * query="lastName = {0} AND firstName = {1}"
      *

      but the result of my jsp page, which uses a session bean mapped on Customer's one says:
      ----------------------------------------------------------
      Web Client

      The next ID of a Test Entity is:


      Tehere are 1 curomers.

      Customers retrived are:.
      Chiumenti Andrea
      Now I try to find a customer for name with criteria:
      lastName = Chiumenti
      firstName = Andrea

      Caugth exception: Customer not found: Unknown query: public abstract java.util.Collection com.wingstech.webappointments.interfaces.CustomerHome.findCustomerByName(java.lang.String,java.lang.String) throws java.rmi.RemoteException,javax.ejb.FinderException; nested exception is: javax.ejb.EJBException: Customer not found: Unknown query: public abstract java.util.Collection com.wingstech.webappointments.interfaces.CustomerHome.findCustomerByName(java.lang.String,java.lang.String) throws java.rmi.RemoteException,javax.ejb.FinderException


      Have fun and see you soon

      ----------------------------------------------------------

      Can you kindly tell me why this message and how can I correct my mistake?

      Thanks in advance,
      Kiuma