0 Replies Latest reply on Dec 10, 2004 2:47 AM by Ami Desai

    Getting one Strange error for EJB QL

    Ami Desai Newbie

      Hi All,

      In server.log I see errors for the EJB QL where finder method name is anything other then (findBy + CMP filed name)!!

      In the end you can find error log. Where you can see that "findByUserID" works and "findByOrgIDAndTelID" does not works!! It is taking wrong cmp field name only. EJB QL for the second query is as follow:

      " Select OBJECT(u) FROM userParmsBean AS u WHERE u.emailUserID = ?1 AND u.emailPassword = ?2 "

      Any help/pointer is appreciated.


      Thanks,
      -Ami

      2004-12-10 12:13:43,118 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand] Save AutoGenerated findByUserID public abstract java.util.Enumeration com.ipunity.webmail.ejb.entity.usr.UserParmsHome.findByUserID(java.lang.String) throws java.rmi.RemoteException,javax.ejb.FinderException
      2004-12-10 12:13:43,118 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCFindByCommand] cmp field name: userid
      2004-12-10 12:13:43,118 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand] findByUserID SQL: SELECT userID FROM userParms WHERE userID=?


      2004-12-10 12:13:43,118 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand] Save AutoGenerated findByOrgIDAndTelID public abstract java.util.Enumeration com.ipunity.webmail.ejb.entity.usr.UserParmsHome. findByOrgIDAndTelID (java.lang.Integer,java.lang.Integer) throws java.rmi.RemoteException,javax.ejb.FinderException
      2004-12-10 12:13:43,118 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCFindByCommand] cmp field name: orgidandtelid
      2004-12-10 12:13:43,118 DEBUG [org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand] Could not create the finder findByOrgIDAndTelID, because no matching CMP field was found.
      java.lang.IllegalArgumentException: No finder for this method: findByOrgIDAndTelID
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCFindByCommand.(JDBCFindByCommand.java:74)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommandFactory.createFindByCommand(JDBCCommandFactory.java:230)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand.(JDBCFindEntitiesCommand.java:166)