You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Lukas Severin <lu...@mindcast.se> on 2003/06/10 13:05:49 UTC
NullPointerException in OjbExtent
I get the following exception running a JDO query in tomcat (if I run it
standalone it works just fine) :
java.lang.NullPointerException
at org.apache.ojb.jdori.sql.OjbExtent.<init>(Unknown Source)
at org.apache.ojb.jdori.sql.OjbStoreManager.getExtent(Unknown
Source)
at com.sun.jdori.common.PersistenceManagerImpl.getExtent(Unknown
Source
at com.sun.jdori.common.query.QueryImpl.checkCandidates(Unknown
Source)
at com.sun.jdori.common.query.QueryImpl.execute(Unknown Source)
My query code :
PersistenceManagerFactory factory = new OjbStorePMF();
PersistenceManager pm = factory.getPersistenceManager();
Query q = null;
Collection c = null;
User user = null;
try {
String filter = "this.id == " +userId;
q = pm.newQuery(User.class, filter);
c = (Collection) q.execute();
user = (User) c.iterator().next();
etc ...
My OJB.properties and repository files are in WEB-INF/classes.
Thanks for suggestions to solve this !
NullPointerException !
Posted by Lukas Severin <lu...@mindcast.se>.
Any ideas why I get this NullPointerException ?
----- Original Message -----
From: "Lukas Severin" <lu...@mindcast.se>
To: "OJB Users List" <oj...@db.apache.org>
Sent: Tuesday, June 10, 2003 1:05 PM
Subject: NullPointerException in OjbExtent
> I get the following exception running a JDO query in tomcat (if I run it
> standalone it works just fine) :
>
> java.lang.NullPointerException
> at org.apache.ojb.jdori.sql.OjbExtent.<init>(Unknown Source)
> at org.apache.ojb.jdori.sql.OjbStoreManager.getExtent(Unknown
> Source)
> at com.sun.jdori.common.PersistenceManagerImpl.getExtent(Unknown
> Source
>
> at com.sun.jdori.common.query.QueryImpl.checkCandidates(Unknown
> Source)
> at com.sun.jdori.common.query.QueryImpl.execute(Unknown Source)
>
> My query code :
> PersistenceManagerFactory factory = new OjbStorePMF();
> PersistenceManager pm = factory.getPersistenceManager();
> Query q = null;
> Collection c = null;
> User user = null;
> try {
> String filter = "this.id == " +userId;
> q = pm.newQuery(User.class, filter);
> c = (Collection) q.execute();
> user = (User) c.iterator().next();
> etc ...
>
>
>
> My OJB.properties and repository files are in WEB-INF/classes.
>
> Thanks for suggestions to solve this !
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>