Re: Problem changing from RC4 to RC5

2003-12-23 Thread Armin Waibel
Hi, you could try to use the "old" DList implementation instead of the new upcoming one. Change in OJB.properties: # org.odmg.DList implementation class #DListClass=org.apache.ojb.odmg.collections.DListImpl_2 DListClass=org.apache.ojb.odmg.collections.DListImpl # # org.odmg.DArray implementation

[Fwd: Re: Problem changing from RC4 to RC5]

2003-12-23 Thread Armin Waibel
(second attempt, my first mail seems lost in "space") Hi, you could try to use the "old" DList implementation instead of the new upcoming one. Change in OJB.properties: # org.odmg.DList implementation class #DListClass=org.apache.ojb.odmg.collections.DListImpl_2 DListClass=org.apache.ojb.odmg.col

Re: Usage WeakHashMap in AnonymousPersistentField Re: Cache and prefetched relationships

2003-12-23 Thread Andy Malakov
Hello Armin, I will send you my version of IdentityWeakHashMap (nothing in there to be proud of ;-). > What about using a wrapper object for all keys and override 'equals' I saw this solution in o.a.ojb.broker.util.IdentityHashMap. I do not think we should use wrappers in this case - AnonymousPe

Re: Problem changing from RC4 to RC5

2003-12-23 Thread Erik Engstrom
Ok, I was being stupid, If you clear the cache BEFORE a lookup the problem does show itself just like an application restart. I am close to having a test case ready but am out for the rest of the week. Ill send you one on monday. Thanks for your time, have a happy hollidays. Erik Engstrom [EMAI

Re: Usage WeakHashMap in AnonymousPersistentField Re: Cache and prefetched relationships

2003-12-23 Thread Brian McCallister
I had another use for an IdentityWeakHashMap recently. Do you have an implementation? If not... this may be the kick in the butt I need to go make one. -Brian On Dec 23, 2003, at 2:35 PM, Armin Waibel wrote: Hi Andy, do you mean we should implement a IdentityWeakHashMap? What about using a w

Ordered Lists and Index Fields

2003-12-23 Thread Coup, Robert Muir
Hi all, What is the best way of storing an ordered list without using Dlist which requires additional tables & SQL lookups? OrderBy works great if the positioning has some underlying field (eg. Object id, name) but if the only thing specifying the position is the list index then it doesn't work t

Re: Usage WeakHashMap in AnonymousPersistentField Re: Cache and prefetched relationships

2003-12-23 Thread Armin Waibel
Hi Andy, do you mean we should implement a IdentityWeakHashMap? What about using a wrapper object for all keys and override 'equals' method to do a obj==obj comparison? class IdentityKey { Object obj; public IdentityKey(Object obj) { this.obj = obj;

Re: Problems changing from rc4 to rc5

2003-12-23 Thread Armin Waibel
Hi Dean, in rc4 "empty cache" implementation use a temporary map to prevent circular references. You can use ObjectCachePerBrokerImpl to prevent circular references (this implementation is very similar to the old version of empty cache) regards, Armin Thurs, Dean wrote: I have found my proble

Re: Problem changing from RC4 to RC5

2003-12-23 Thread Erik Engstrom
I do not get the same results if I clear the cache as when the app is restarted. Erik Engstrom [EMAIL PROTECTED] MnDOT Traffic Management Center - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Problem changing from RC4 to RC5

2003-12-23 Thread Armin Waibel
Hi, Erik Engstrom wrote: Thanks for your quick response. Ill work on a unit test. that's great! EquipmentType.specifications is an ArrayList. Nothing is different in my code or configuration, the only change is RC4 to RC5. I havent used the managed collections, I was thinking that perhaps I s

RE: Problems changing from rc4 to rc5

2003-12-23 Thread Thurs, Dean
I have found my problem after reading the FAQ. I had circular references in our model and we were using EmptyCache; however in RC4 we did not run into the problem with infinite loading of objects. -Original Message- From: Thurs, Dean Sent: Tuesday, December 23, 2003 1:15 PM To: [EMAIL

Re: reload Object ? ? (Problem Cache)

2003-12-23 Thread Armin Waibel
Hi, in your example only 2 System.out.println(..) lines performed, but 3 lines are printed?! Do you forget one println() statement? regards, Armin Reda Benzair wrote: Hi all, I have a -simple?- question about OJB cache: How can I force refreshing an object? Typically is there a method li

RE: Re: InitializerError + OJBRuntimeException

2003-12-23 Thread Coup, Robert Muir
Of course, this is OJB :) OJB.properties location & name can be specified through a call to System.setProperty("OJB.properties", ) before anything is done. In the OJB.properties file you can specify the location and name of the repository.xml file. Have fun, Rob :) -Original Message- F

Problems changing from rc4 to rc5

2003-12-23 Thread Thurs, Dean
I have recently switched from rc4 to rc5 and I am having problems retrieving a collection of client groups from my class client (shown below). The class client-group uses an anonymous reference to the client class but it appears that every time I try to retrieve the client, it retrieves the client

Re: InitializerError + OJBRuntimeException

2003-12-23 Thread Armin Waibel
Hi Dirk, > I am wondering about the OJBRuntimeExeception: what kind of property key is > missed? > Caused by: org.apache.ojb.broker.OJBRuntimeException: Property for key > 'PersistenceBrokerFactoryClass' can not be found in properties file > at org.apache.ojb.broker.core.PersistenceBrokerFactory

Aw: Re: InitializerError + OJBRuntimeException

2003-12-23 Thread servicerespond . dirkmanske
Hi Armin, thanks for your hint. OJB.properties has not been on the classpath indeed. Now it works. However, I do not feel very comfortable with so many property files (ojb, repository.xml ...) on the classpath. Is there another way, so I can store these files where ever I want in my web applica

java.lang.ArithmeticException: / by zero

2003-12-23 Thread Carlos Chávez
Hi, I sending this error because i have no clues about how to solve it. it seems to be inside the OJB code while store an object. here is the extract of the error I got: org.apache.ojb.broker.PersistenceBrokerException: java.lang.ArithmeticException: / by zero this is the stacktra

Re: Problem changing from RC4 to RC5

2003-12-23 Thread Erik Engstrom
Yeah, Im using ODMG and auto-retrieve doesnt seem to make a difference. Erik Engstrom [EMAIL PROTECTED] MnDOT Traffic Management Center >>> [EMAIL PROTECTED] 12/23/03 10:21 AM >>> I think he said he was using ODMG, in which case that shouldn't be needed. I *think*. -Brian On Dec 23, 2003, at

Re: Problem changing from RC4 to RC5

2003-12-23 Thread Jakob Braeuchi
hi brian, you're *right*, he's using ODMG and it's not needed there. jakob Brian McCallister wrote: I think he said he was using ODMG, in which case that shouldn't be needed. I *think*. -Brian On Dec 23, 2003, at 11:17 AM, Jakob Braeuchi wrote: hi erik, have tried setting auto-retrieve="

Re: Problem changing from RC4 to RC5

2003-12-23 Thread Brian McCallister
I think he said he was using ODMG, in which case that shouldn't be needed. I *think*. -Brian On Dec 23, 2003, at 11:17 AM, Jakob Braeuchi wrote: hi erik, have tried setting auto-retrieve="true" in your collection-descriptor named "specifications" ? jakob Erik Engstrom wrote: Howdy, Tha

Re: Problem changing from RC4 to RC5

2003-12-23 Thread Brian McCallister
From the current ODMG Transaction the easiest way is to cast it to a TransactionImpl, get the broker, and clear the cache form that: import org.apache.ojb.odmg.TransactionImpl; ... Transaction tx = impl.currentTransaction(); ((TransactionImpl)tx).getBroker().clearCache(); -Brian On Dec 23, 2003,

Re: Problem changing from RC4 to RC5

2003-12-23 Thread Jakob Braeuchi
hi erik, have tried setting auto-retrieve="true" in your collection-descriptor named "specifications" ? jakob Erik Engstrom wrote: Howdy, Thanks for the great software! I have just upgraded from RC4 to RC5 and it looks like you guys have made a lot of progress (especially in the docs). I

Re: auto-delete=true question

2003-12-23 Thread Jakob Braeuchi
hi thomas, Thomas Mahler wrote: Hi Sebastian, Did you read http://db.apache.org/ojb/tutorial3.html#Setting%20Load,%20Update,%20and%20Delete%20Cascading ? You encounter the interference of two features here: the cascading operations feature and the removal-aware collection. 1. If you remove a

Re: Usage WeakHashMap in AnonymousPersistentField Re: Cache and prefetched relationships

2003-12-23 Thread Andy Malakov
Workaround: Replacing WeakHashMap by IdentityWeakHashMap in AnonymousPersistentField.fkCache. IdentityWeakHashMap (similarly to java.util.IdentityHashMap) uses reference-equality in place of object-equality when comparing weak keys. Unfortunately WeakHashMap has most of the relevant methods as

Re: Problem changing from RC4 to RC5

2003-12-23 Thread Erik Engstrom
Thanks for your quick response. Ill work on a unit test. EquipmentType.specifications is an ArrayList. Nothing is different in my code or configuration, the only change is RC4 to RC5. I havent used the managed collections, I was thinking that perhaps I should. And now for a dumb question: How d

Re: InitializerError + OJBRuntimeException

2003-12-23 Thread Armin Waibel
Hi Dirk, > I am wondering about the OJBRuntimeExeception: what kind of property key is > missed? > Caused by: org.apache.ojb.broker.OJBRuntimeException: Property for key > 'PersistenceBrokerFactoryClass' can not be found in properties file > at org.apache.ojb.broker.core.PersistenceBrokerFactory

Re: Problem changing from RC4 to RC5

2003-12-23 Thread Brian McCallister
Hmm, is there any chance you can provide a unit test that demonstrates this? Nothing looks immediately wrong with the descriptor. Do you get the same results if you clear the cache as when you restart the app? What is the collection type of EquipmentType.specifications? Did you change your O

Using Oracle Lobs

2003-12-23 Thread Robert S. Sfeir
Hey guys. I was looking in the docs for hints on how to use Oracle LOBs. I an interested in CLOB right now, but will need BLOB later for image and document storage. Is there any quick guide/hint out there on how to do this? How will this differ from using text and longvarchar or longbinary in o

Re: Problem changing from RC4 to RC5

2003-12-23 Thread Brian McCallister
On Dec 23, 2003, at 10:24 AM, Erik Engstrom wrote: it looks like you guys have made a lot of progress (especially in the docs). Woot! Thanks. Now to look into the problem you were having... -Brian - To unsubscribe, e-mail: [EM

Problem changing from RC4 to RC5

2003-12-23 Thread Erik Engstrom
Howdy, Thanks for the great software! I have just upgraded from RC4 to RC5 and it looks like you guys have made a lot of progress (especially in the docs). I have an issue though, not sure if its something Im doing or if something broke. If I use RC5 my collections are properly stored in the da

Re: auto-delete=true question

2003-12-23 Thread Sebastian
Thomas Mahler wrote: Hi Sebastian, Did you read http://db.apache.org/ojb/tutorial3.html#Setting%20Load,%20Update,%20and%20Delete%20Cascading ? You encounter the interference of two features here: the cascading operations feature and the removal-aware collection. 1. If you remove a Child and t

Re: auto-delete=true question

2003-12-23 Thread Thomas Mahler
Hi Sebastian, Did you read http://db.apache.org/ojb/tutorial3.html#Setting%20Load,%20Update,%20and%20Delete%20Cascading ? You encounter the interference of two features here: the cascading operations feature and the removal-aware collection. 1. If you remove a Child and then delete the parent

InitializerError + OJBRuntimeException

2003-12-23 Thread Dirk Manske (mobil)
Hi, I am new to OJB and get stuck with the following exception message: java.lang.ExceptionInInitializerError at org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Unkn own Source) at de.premiere.plato.app.dao.ojb.OJBPBPersistenceManager.storeObject(OJBPBPersi stenceManag

Re: NPE in OjbExtent

2003-12-23 Thread Gus Heck
Hi Thomas, I tried that, and I still seem to get the same problem. -Gus Thomas Mahler wrote: Hi Gus, Gus Heck wrote: Hi Thomas, I don't think I did anything exotic in terms of commands executed... public static IdManager findIdManager(Class c) { if (!loadedOK) { // flag for lazy i

Re: AW: AW: AW: JDO - Unable to build object instance

2003-12-23 Thread Gus Heck
Sebastian, One thing I notice that is different about your implementation (from mine) is that your table name does not directly match your class name. I think that _shouldn't_ matter, but it is a difference. There are few other differences too. I notice your jdo file is full of ojb-extensions