Thanks so much for the replies. Ouch I'm sorry. Yes it is part of a package, and yes it is in the Class Path. And i did have it named according to the castor spec i.e. Packagename.class, like below. Unfortunately none of those scenarios worked. I keep getting the stack trace which is appended below. The insertion works fine, and is loading from the class path, which is what's throwing me off.
Thanks once again. Sujay db.begin(); oql = db.getOQLQuery( "SELECT a FROM app.User a WHERE id=$1" ); oql.bind( 3 ); results = oql.execute(); [Castor:] Begin transaction [Castor:] Loading mapping descriptors from file:/usr/local/resin/webapps/castor2/WEB-INF/mapping.xml org.exolab.castor.jdo.QueryException: Could not find class app.User org.exolab.castor.jdo.QueryException: Could not find class app.User at org.exolab.castor.jdo.oql.ParseTreeWalker.checkFromPart(Unknown Source) at org.exolab.castor.jdo.oql.ParseTreeWalker.checkErrors(Unknown Source) at org.exolab.castor.jdo.oql.ParseTreeWalker.(Unknown Source) at org.exolab.castor.jdo.engine.OQLQueryImpl.create(Unknown Source) at org.exolab.castor.jdo.engine.DatabaseImpl.getOQLQuery(Unknown Source) at app.Query.doGet(Query.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:126) at javax.servlet.http.HttpServlet.service(HttpServlet.java:103) at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96) at com.caucho.server.http.Invocation.service(Invocation.java:311) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:221) at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163) at com.caucho.server.TcpConnection.run(TcpConnection.java:137) at java.lang.Thread.run(Thread.java:484) --- Steve Stearns <[EMAIL PROTECTED]> wrote: > 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 > __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
