On Tue, 2002-06-25 at 13:15, Sujay wrote:
> Hello, 
> 
> Can someone please help me. I have been tring to debug
> my problem for days, and have not had much luck, and
> totally frustrated. I am using Castor 0.9.3.19 with
> Resin 2.1.2.
> 
> i am running a simpler OQL query
> 
> db = jdo.getDatabase();
> db.begin();
> oql = db.getOQLQuery( "SELECT a FROM User a" );
> oql.bind( 3 );
> results = oql.execute();
> 
> and for some reason i keep getting the following from
> the stack trace. I am able to do insertions without a
> problem. So the classloader is finding the entity
> class. Not sure what's going on. Any help/input would
> be really appreciated.

Is the class "User" in the class path?  Does it belong to a package?  If
it belongs to a package, you need to specify the full package name
(com.yourcompany.User instead of just User).  

Also, though I believe this is unrelated to your current problem, your
OQL seems a little odd to me.  In your query string you don't specify
any constraints but then you bind the value 3.  What you should have is
something like:

SELECT a FROM User a where userid=$1

Then you bind to specify that the userid is going to be 3.  If you are
trying to get all users, you can just skip binding.

---Steve

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to