I am trying to get db4o to work with Jython, and I am thinking it is a problem with Jython knowing what to do with a persisted object that is being returned from a query.

I have tried a number of things, but I usually get a NullPointerException.
I the code below I get a "no code object) at line 0"  on line 37. (db.delete(rr))   the problem is line that reads:  x = rr.name.

if you comment out (x = r.name) it runs as expected.

Any suggestions would be appreciated.

from java.io import File
from com.db4o import Db4o
from com.db4o import ObjectContainer
from com.db4o import ObjectSet
from java.lang import System
from java.lang import String
from java.util import Date

class person:
        name = None
        age = 0
        def __init__(self, _name, _age):
                self.name = _name
                self.age = _age

db = Db4o.openFile('d:\\java\\first.yap')
        # do something with db4o
        p = person("Wy",38)
        p = person("Ri",40)
        result = db.get(None)
        print result.hasNext()
        print result.size()
        while result.hasNext() > 0:
                rr = result.next()
                        x = rr.name
        print 'done'