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 Martin Davidsson <mh...@ncsu.edu> on 2004/07/02 16:49:43 UTC

CastClassException in CollectionPrefetcher.createCollection()

Hello,

I don't know what kind of information would be useful to include to  
answer my question so please let me know if you need to see more. I'm  
running rc6 with the included OJB.properties file. I've tried rc7 but I  
get the same error.

org.apache.ojb.broker.OJBRuntimeException: Can't create new Collection  
for owner
         at  
org.apache.ojb.broker.accesslayer.CollectionPrefetcher.createCollection( 
CollectionPrefetcher.java:219)

Caused by: java.lang.ClassCastException
         at  
org.apache.ojb.broker.accesslayer.CollectionPrefetcher.createCollection( 
CollectionPrefetcher.java:215)

(Those line numbers belong to rc6)

Here is the call that produces the exception:

         DList objects = null;
         Transaction tx = _odmg.newTransaction();
         tx.begin();

         try {
             OQLQuery query = _odmg.newOQLQuery();
             query.create( "select User from model.User" );
             objects = (DList) query.execute();
         }
         catch( Exception ex ) {
             tx.abort();
             throw new OdmgException( ex );
         }

         tx.commit();

Google hasn't been of any help and I really don't know what to try.  
Thanks!

-- Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org