A quick addition, just wanted to show a quick screen shot. you can check out here: http://cs.usm.maine.edu/~nstuart/snapshot1.png Take a look at _ids. Its size is 1, but the first element is null :( that cant be good.
On Tue, 18 Jan 2005 15:42:58 -0500, Nick Stuart <[EMAIL PROTECTED]> wrote: > Ok, trying to use simple lazy collection here and have something > borked up. The exception I'm getting is: > > org.exolab.castor.jdo.PersistenceException: Identities can't be null! > at > org.exolab.castor.persist.RelationCollection$IteratorImp.lazyLoad(RelationCollection.java:290) > at > org.exolab.castor.persist.RelationCollection$IteratorImp.next(RelationCollection.java:265) > at > org.moss.tapn.database.impl.TopicManager.getAllReplies(TopicManager.java:218) > at > $Interceptor_10187854476_28.getAllReplies($Interceptor_10187854476_28.java) > at > $SingletonProxy_10187853dc9_22.getAllReplies($SingletonProxy_10187853dc9_22.java) > at test.TopicManagerTest.testGetAllTopics(TopicManagerTest.java:124) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > Attaching the mapping file with the uneeded parts chopped out. along > with the test case I'm running. This is happening with a > self-referential object (can hold many of its own type). The object > loads fine, and the intial Collection is set up fine as I get the > right size() and stuff back from it. Anyone know whats wrong? If not > I'll file a bug with all the info and write a test case for it. > > The offending block of code is: > public Object next() { > if ( changestamp != parent._changecount ) > throw new ConcurrentModificationException("Concurrent > Modification is not allowed!"); > // only needed if application did not call hasNext(), will > skip deleted ids > if ( !hasNext() ) > throw new NoSuchElementException("Read after the end > of iterator!"); > > Object id; > Object o; > if ( cursor < _added.size() ) { > id = _added.get( cursor++ ); > o = _loaded.get( id ); > if ( o != null ) > return o; > return lazyLoad( id ); > } else { > // the deleted ids were skipped by hasNext(), get is safe > id = _ids.get(cursor++ - _added.size()); > // RETURNS NULL!!! > > o = _loaded.get( id ); > if ( o != null ) > return o; > return lazyLoad( id ); > } > } > > in RelationCollection. There is nothing in _added or _ids doing the > step through with the debugger so something isn't getting in there > correctly. =\ > > -Nick > > p.s. Using HSQLDB and the latest CVS CO for castor compiled under jdk1.5.0_01 > > > ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev