Re: Problems with a finder method in a cmp

2001-02-12 Thread Geoff Marshall

Please don't laugh at me, but what IS a 'finder method in a CMP'??  Just a
simple explanation or a pointer to more info, please...
-- 

-Geoff Marshall, Director of Development

...
t e r r a s c o p e  (415) 951-4944
54 Mint Street, Suite 110 direct (415) 625-0349
San Francisco, CA  94103 fax (415) 625-0306
...

 From: "mangesh laad" [EMAIL PROTECTED]
 Reply-To: Orion-Interest [EMAIL PROTECTED]
 Date: Fri, 09 Feb 2001 19:49:26 -
 To: Orion-Interest [EMAIL PROTECTED]
 Subject: Re: Problems with a finder method in a cmp
 
 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 -
 
 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.
 
 
 





RE: Problems with a finder method in a cmp

2001-02-12 Thread Russ White

Read O'Reilly - Enterprise JavaBeans 2nd ed.

It will clear up a lot of your questions.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Geoff Marshall
Sent: Monday, February 12, 2001 10:31 AM
To: Orion-Interest
Subject: Re: Problems with a finder method in a cmp


Please don't laugh at me, but what IS a 'finder method in a CMP'??  Just a
simple explanation or a pointer to more info, please...
--

-Geoff Marshall, Director of Development

...
t e r r a s c o p e  (415) 951-4944
54 Mint Street, Suite 110 direct (415) 625-0349
San Francisco, CA  94103 fax (415) 625-0306
...

 From: "mangesh laad" [EMAIL PROTECTED]
 Reply-To: Orion-Interest [EMAIL PROTECTED]
 Date: Fri, 09 Feb 2001 19:49:26 -
 To: Orion-Interest [EMAIL PROTECTED]
 Subject: Re: Problems with a finder method in a cmp

 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 -

 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.










RE: Problems with a finder method in a cmp

2001-02-12 Thread KirkYarina

Suppose you had a widget CMP entity bean, with a handedness field, and 
wanted to get all the left handed widgets.  You'd use a finder method, 
findByHandedness("left"), to return a collection of left handed widgets.

Orion makes this easy; just define it and go.  See 
http://www.orionsupport.com/ for details ( 
http://www.orionsupport.com/articles/ejbfinderquery.html ).  More 
complicated finders ("left handed widgets sold on Mondays") takes a little 
more effort, also described on Orionsupport.

BTW, Orionsupport is a private effort, not an official site.  The 
maintainer occasionally uses the server hardware for other purposes, so if 
it doesn't respond wait a while and try again later.

Kirk Yarina


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Geoff Marshall
Sent: Monday, February 12, 2001 10:31 AM
To: Orion-Interest
Subject: Re: Problems with a finder method in a cmp


Please don't laugh at me, but what IS a 'finder method in a CMP'??  Just a
simple explanation or a pointer to more info, please...
--

-Geoff Marshall, Director of Development

...
t e r r a s c o p e  (415) 951-4944
54 Mint Street, Suite 110 direct (415) 625-0349
San Francisco, CA  94103 fax (415) 625-0306
...





Re: Problems with a finder method in a cmp

2001-02-09 Thread Joseph B. Ottinger

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





RE: Problems with a finder method in a cmp

2001-02-09 Thread Madrid, Christopher P (US - Austin)
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.




Re: Problems with a finder method in a cmp

2001-02-09 Thread mangesh laad

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 -

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.