Title: RE: Problems with a finder method in a cmp

I don't think that will work.

Query in orion-ejb-jar.xml
should be "people.name like $1"
and not "people.name like '$1'"
but the finder method should be
used as indicated.

Chris Madrid
Deloitte Consulting

-----Original Message-----
From: Joseph B. Ottinger [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 09, 2001 8:03 AM
To: Orion-Interest
Subject: Re: Problems with a finder method in a cmp


You'll want to use $1 in the finder method, and specify "%"+name+"%" in
the finder call. Hmm, that didn't sound right... let's try again.

 String findByName_query = "people.name like '$1'";

 ..

 List myList=person.findByName("%"+name+"%");

It could be that EQL will address this; I don't know.

On Thu, 8 Feb 2001, fresnaULL wrote:

> 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
>
>
>
>
>

-----------------------------------------------------------
Joseph B. Ottinger                           [EMAIL PROTECTED]
http://epesh.com/                             IT Consultant

- This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law.  - If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.

Reply via email to