Any ideas why I get this NullPointerException ?

----- Original Message ----- 
From: "Lukas Severin" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to