Hi
  All u have to do is just write the findByName as u already have in the 
home interface . While deploying the orion will write the coresponding 
finder query for you in the orion--ejb-jar in its finder-method tag



>From: "fresnaULL" <[EMAIL PROTECTED]>
>Reply-To: Orion-Interest <[EMAIL PROTECTED]>
>To: Orion-Interest <[EMAIL PROTECTED]>
>Subject: Problems with a finder method in a cmp
>Date: Thu, 8 Feb 2001 14:01:28 -0000
>
>Hi all,
>
>I'm trying to define this finder method in a cmp:
>
>SELECT * FROM people
>WHERE people.name LIKE '%name%'
>
>which is correct in SQL SERVER 7.0
>
>I put the following in the people home interface:
>
>String findByName_query = "people.name like '%$1%'";
>.
>.
>.
>public java.util.Enumeration findByName(String value) throws
>java.rmi.RemoteException, javax.ejb.FinderException;
>
>but it doesn't work. Orion is able to deploy the cmp but when I try to use
>it I only get this
>error message:
>
>500 Internal Server Error
>java.lang.NullPointerException
>  at sun.jdbc.odbc.JdbcOdbcPreparedStatement.clearParameter(Unknown Source)
>  at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setChar(Unknown Source)
>  at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setString(Unknown Source)
>  at com.evermind.sql.am.setString(JAX)
>  at com.evermind.sql.am.setString(JAX)
>  at
>PeopleHome_EntityHomeWrapper72.findByName(PeopleHome_EntityHomeWrapper72.jav
>a:1142)
>  at Search.doGet(Search.java:46)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>  at com.evermind.server.http.d1.si(JAX)
>  at com.evermind.server.http.d1.forward(JAX)
>  at com.evermind.server.http.ed.sp(JAX)
>  at com.evermind.server.http.ed.so(JAX)
>  at com.evermind.util.f.run(JAX)
>
>
>Does anybody know how i can make it work?
>
>Thanks in advance
>
>
>
>
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Reply via email to