Hi Armin,

sorry for the late response.

In all cases I'm using the
ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheEmptyImpl.

I use the following class-descriptor in repository and the
OqlCollectionClass in OJB.properties.

   <class-descriptor
          class="de.orgacard.common.ojb.bo.Dislike"
          table="ABNEIG"
   >
      <field-descriptor id="1"
         name="id"
         column="id"
         jdbc-type="INTEGER"
         primarykey="true"
         autoincrement="true"
         access="readwrite"
      />
   </class-descriptor>


OqlCollectionClass=org.apache.ojb.odmg.collections.DListImpl

This is my query
                try {
                        OQLQuery query = myOdmg.newOQLQuery();
                        String oqlQuery = "select del from " + 
DbObject.class.getName();
                        query.create(oqlQuery);
                        DList result = (DList) query.execute();
                        size = result.size();
                } catch( Exception lnge ) {
                        lnge.printStackTrace();
                }

This exception is thrown
35266 [main] ERROR  (?:?) - Generation of new id failed
java.lang.NullPointerException
        at
org.apache.ojb.broker.util.sequence.AbstractSequenceManager.getUniqueValue(U
nknown Source)
        at org.apache.ojb.odmg.collections.DListImpl.generateNewId(Unknown Source)
        at org.apache.ojb.odmg.collections.DListImpl.getId(Unknown Source)
        at org.apache.ojb.odmg.collections.DListEntry.<init>(Unknown Source)
        at org.apache.ojb.odmg.collections.DListImpl.ojbAdd(Unknown Source)
        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknow
n Source)
        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknow
n Source)
        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknow
n Source)
        at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(
Unknown Source)
        at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(
Unknown Source)
        at org.apache.ojb.odmg.oql.OQLQueryImpl.execute(Unknown Source)


If I use
OqlCollectionClass=org.apache.ojb.broker.util.collections.ManageableArrayLis
t all is ok.

Query with ManageableArrayList
                try {
                        OQLQuery query = myOdmg.newOQLQuery();
                        String oqlQuery = "select del from " + 
DbObject.class.getName();
                        ManageableArrayList result = 
(ManageableArrayList)query.execute();
                        size = result.size();
                } catch( Exception lnge ) {
                        lnge.printStackTrace();
                }

I get the same result when I'm using the
ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl.

Thanks for response.
Ralf


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

Reply via email to