DBCP Properties - testOnBorrow

2010-05-24 Thread Joe Baldwin
My webapp is getting the following exception (Cayenne 3.0, with dbcpdatasourcefactory): java.util.NoSuchElementException: Could not create a validated object, cause: ValidateObject failed org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1191) W

Re: Blobs in the DataContext

2010-05-24 Thread MGargano
Hi Andrew, These be flame war words. :-p Actually, I would normally totally agree with both your and Aristedes' recommendations, unfortunately the architecture I inherited for this product bills the BLOBs in the DB as a sort of "feature" that I don't see changing anytime soon. Curre

Re: Maven2 cgen task problem

2010-05-24 Thread Andrus Adamchik
Looks like "additionalMaps" parameter requires some attention and unit tests. Looks like it somehow grabs cayenne.xml from the main map directory. I was actually surprised to notice that "additionalMaps" is a directory in the first place. Intuitively this should be a list of DataMap locat

Re: OutOfMemory with large number of inserts

2010-05-24 Thread Steve Wells
Typical Cayenne users exceedingly fast helpful answers! I've tried a few more things based on your replies but nothing positive so far. Andrey, I am only creating *most* new objects in datacontext. But I am selecting the related (master a.k.a 'rel') data-objects and "connecting" them to the deta

Re: Maven2 cgen task problem

2010-05-24 Thread Gary Jarrel
> > Aha, the Maven task is naive assuming all XML files in a given folder are > DataMaps... I guess we may make it smarter by and check for map.xml > extensions. For now the fix is to delete the backup file > "ssistMap.map.xml~". > Ouch, how did I miss that... I removed the files and ran it again

Re: Maven2 cgen task problem

2010-05-24 Thread Andrus Adamchik
On May 24, 2010, at 10:23 AM, Gary Jarrel wrote: /home/garyj/dev/workspace/com1-projects/projects/core-site/ assistMap.map.xml~ Aha, the Maven task is naive assuming all XML files in a given folder are DataMaps... I guess we may make it smarter by and check for map.xml extensions. For now

Re: Maven2 cgen task problem

2010-05-24 Thread Gary Jarrel
> > This looks like encoding problem. I'm not sure whether you can specify > encoding in cgen though. > -- Just ran with the options as suggested by Andrus and also verified that both data maps were in UTF-8 encoding and received the following exception: Embedded error: [v.3.0 Apr 30 2010 11:29:3

Re: OutOfMemory with large number of inserts

2010-05-24 Thread Juergen Saar
First try: use a new ObjectContext for each csv-File ... If this doesn't solve the memory-problem you should try to make a commit after let's say 200 inserts and then create a new ObjectContext ... 2010/5/24 Steve Wells > Hi All, > > I am importing from a lot of csv files (2200+) and each csv h

Re: OutOfMemory with large number of inserts

2010-05-24 Thread Andrus Adamchik
Actually you can do batch processing with Cayenne, as DataContext uses weak references to committed objects. So doing commit after each X inserted objects should release the memory. However "rel" object reference may prevent that from happening if it is the same object for all inserted obje

Re: OutOfMemory with large number of inserts

2010-05-24 Thread Andrey Razumovsky
ORM technologies require additional memory than just plain JDBC. Million records you read will lead to creating million data objects and this is not a case for ORM, because huge size of memory is needed. Moreover, you'll see major slowdowns during the commit. So the actual advice is to use plain SQ

OutOfMemory with large number of inserts

2010-05-24 Thread Steve Wells
Hi All, I am importing from a lot of csv files (2200+) and each csv has between 0 and 3000 rows, each row will create a new DataObject in a DataContext etc : The code is simple enough and distilled here is: for each csv file RelatedObj rel = getRelatedObj() for each line in csv file