I have only a guess:

>From you stacktrace we can see that there is a problem in the OjbExtent
constructor:
    public OjbExtent(Class pClazz, PersistenceBroker pBroker)
    {
        clazz = pClazz;
        Criteria selectExtent = null;
        Query q = QueryFactory.newQuery(clazz, selectExtent);
        broker = pBroker;
        iterator = (RsIterator) broker.getIteratorByQuery(q);
    }

The only place for a NPE is the last line.
So the problem seems to be that it was not possible to retieve a broker
instance.
This is usually an Indicator for problems with the repository.

Please try to set all log levels to DEBUG and try if you can see more
details.
It would also be could to use a servlet container debug environment 
(like WSAD with it's Tomcat testenvironment) to see what's going on...

cheers,
thomas

> -----Original Message-----
> From: Lukas Severin [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 10, 2003 4:54 PM
> To: OJB Users List
> Subject: NullPointerException !
> 
> 
> 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]
> 
> 


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

Reply via email to