RE: Speeding up commit

2011-06-15 Thread C N Davies
Actually on that point I think I agree that I have seen this very behaviour myself. OpenJPA gets confused if change B then change A then commit A (with cascade all set on A), I commonly get detached entity errors in reference to B. I ended up working around that by persisting B, reread it then pe

RE: Speeding up commit

2011-06-14 Thread C N Davies
would blow up my batch size. Thanks, Aron On 6/14/2011 10:54 AM, C N Davies wrote: > I had a load of issues with committing large quantities of entities > (OpenJPA 2.0), in the end I batched them into batches of 200 and the > overall performance was significantly better. This is not a

RE: Speeding up commit

2011-06-14 Thread C N Davies
I had a load of issues with committing large quantities of entities (OpenJPA 2.0), in the end I batched them into batches of 200 and the overall performance was significantly better. This is not a scientific analysis of the issue I know, but might be of use to you :) Chris -Original Message

RE: count and 'group by' in jpql

2010-11-23 Thread C N Davies
Wouldn't you group by f or select by f.lastResp ? JPA 2 is a pain because it forces us to only group by stuff in the select clause, some DBA propeller head negotiate that stupid rule into the spec. Chris -Original Message- From: Joel Halbert [mailto:j...@su3analytics.com] Sent: Wednes

RE: setting autocommit to false

2010-11-23 Thread C N Davies
I had a similar issue some time ago and ended up fixing it like this: private void persist(DataLoad ld, int count) { es.merge(ld); if (count>maxBatchSize){ es.commitTx(); es.clear(); } }

RE: Update problem in OneToMany bidirection relationship

2010-11-22 Thread C N Davies
Use an ant build.xml I have mine attached, alter as required. Chris -Original Message- From: kuldeep.poonia [mailto:kuldeep.poo...@delhiassam.com] Sent: Monday, 22 November 2010 6:53 PM To: users@openjpa.apache.org Subject: Re: Update problem in OneToMany bidirection relationship Hi

RE: OpenJPA Eclipse Tooling plugin - missing entity relationships

2010-11-22 Thread C N Davies
I run org.apache.openjpa.enhance.PCEnhancer manually it all works fine. Given that I can live with runtime enhanced classes when running & testing from Eclipse, and I can manually compile-time enhance when releasing code using ant, I guess I'll leave the ecipse plugin fttb. Joel On 22/11/10 13:34, C

RE: OpenJPA Eclipse Tooling plugin - missing entity relationships

2010-11-22 Thread C N Davies
Don't waste your time with anything other than the ant built, all these plugins and such will drive you mad tying to troubleshoot issues completely unrelated to enhancement. I learned this the hard way because I was trying to avoid using ant, it's an apache project so they expect you to use ant.

RE: Can't obtain Primary Key value by JPQL

2010-11-04 Thread C N Davies
Build time enhancement is the only method I ever trust, plugins and runtime enhancement has taken years off my life :) 2c from me! Chris -Original Message- From: Alex, Huang [mailto:primemo...@gmail.com] Sent: Friday, 5 November 2010 4:19 PM To: users@openjpa.apache.org Subject: Re: Ca

Nested Transactions

2010-10-26 Thread C N Davies
I don't seem to be able to find this in the docs anywhere but is it possible to use nested transactions in OpenJPA 2.x, it seems to work on some test code I wrote but is there any rules that need to be followed ? Thanks Chris

RE: JDBC Properties

2010-10-26 Thread C N Davies
Did you check javadoc OpenJPAConfigurationImpl ? Chris -Original Message- From: idan [mailto:ida...@gmail.com] Sent: Wednesday, 27 October 2010 12:47 AM To: users@openjpa.apache.org Subject: JDBC Properties Hey, Is it possible to pass extra connection properties to the JDBC driver? I

RE: Schema generation uses auto-commit mode; breaks on XA data sources

2010-10-14 Thread C N Davies
Yao please send your persistence.xml, DB and driver details. -Original Message- From: chunlinyao [mailto:chunlin...@gmail.com] Sent: Thursday, 14 October 2010 6:28 PM To: users@openjpa.apache.org Subject: Re: Schema generation uses auto-commit mode; breaks on XA data sources Hi You sa

RE: How to reset OpenJPA cache

2010-09-23 Thread C N Davies
Em.clear(); seems to do the job for me. chris -Original Message- From: nasseria1 [mailto:nasser.f...@gmail.com] Sent: Friday, 24 September 2010 7:32 AM To: users@openjpa.apache.org Subject: How to reset OpenJPA cache Hi all, After reading OpenJPA, I could not find a clear way to cle

RE: Disabling enhancement on my netbeans project

2010-07-11 Thread C N Davies
Decompile them and you can see for sure. "implements PersistenceCapable" C hris -Original Message- From: jingmeifan [mailto:janef...@hotmail.com] Sent: Monday, 12 July 2010 5:54 AM To: users@openjpa.apache.org Subject: Re: Disabling enhancement on my netbeans project I already enhanc

RE: Issue with ID column for Database view as Entity (EJB3.0)

2010-06-29 Thread C N Davies
The exception says it wants a varchar, but your view is returning a big int, have you checked that? You might need to specify the column type : @Column(name="ID", columnDefinition="VARCHAR") Chris -Original Message- From: Himadri [mailto:hima_...@yahoo.co.in] Sent: Wednesday, 30 June

RE: Virtual Entity

2010-06-29 Thread C N Davies
Well I must say I gave up allowing OpenJPA to manage my joins a long time ago ... ok to be honest it is not OpenJPA it is just the immaturity of the JPA spec. Apart from this issue you raise, the logic of view management is at best naïve, lazy loading is as dumb as a box of rocks. EBeans! Or EJ

RE: Table name too long

2010-06-29 Thread C N Davies
Looks like a defect but you can use the properties to set openjpa.jdbc.DBDictionary for maxTableNameLength to set the maximum length. According to the doc the default is 128 characters but that's not true! Chris -Original Message- From: Donald Woods [mailto:dwo...@apache.org] Sent: We

RE: MaxDB and OpenJPA

2010-06-28 Thread C N Davies
Oh Ok ... hmm I haven't used dropping because I like to keep the old data/schema even I am not using it. I just checked the manual regarding the mapping tool (this property uses) and I think you need to change your action stuff. Check Pg 262 of the 1.2.x manual (pdf version) . It looks like I d

RE: MaxDB and OpenJPA

2010-06-28 Thread C N Davies
Joe I am not sure exactly what your question is, is it the "SchemaAction" or is it more generally the SynchronizeMappings property? Anyway, I use MaxDB with this setting on 1.2.2 and 2.0 perfectly fine. Always use build time enhancement or buy a lotto ticket instead! Chris -Original Mess

RE: Virtual Entity

2010-06-25 Thread C N Davies
Hi Milosz, It's a while back now because I've been using 2.0 for some time but bascially the behaviour was very inconsistent. I could run a query against a view 10 times and 3 out of 10 times there would be missing rows. The other issue was that if my view included joins, null handling was very

RE: Virtual Entity

2010-06-24 Thread C N Davies
Not sure about OpenJPA 2.0 but on 1.2.2 views on MySQL was totally broken. -Original Message- From: Matthew Adams [mailto:matt...@matthewadams.me] Sent: Friday, 25 June 2010 3:46 AM To: users@openjpa.apache.org Subject: Re: Virtual Entity Instead of a virtual entity, you could create the

RE: Virtual Entity

2010-06-24 Thread C N Davies
thing with setters if you wanted. Chris -Original Message- From: Daryl Stultz [mailto:daryl.stu...@opentempo.com] Sent: Thursday, 24 June 2010 10:59 PM To: users@openjpa.apache.org Subject: Re: Virtual Entity On Thu, Jun 24, 2010 at 8:33 AM, C N Davies wrote: > I have virtual ent

RE: Virtual Entity

2010-06-24 Thread C N Davies
I have virtual entity that has nothing but getters, if you do it his way you can use JPQL referring to the virtual fields and let OpenJPA do the work for you. Chris -Original Message- From: Daryl Stultz [mailto:da...@6degrees.com] Sent: Thursday, 24 June 2010 10:07 PM To: OpenJPA User

RE: Performance with large lists

2010-06-18 Thread C N Davies
Not sure if you have the same issue, but I found breaking my commits down to 10 records per commit and calling em.clear() after each commit improved my performance and fixed a lot of dettached entity issues. -Original Message- From: Adam Hardy [mailto:adam@cyberspaceroad.com] Sent

RE: SELECT TOP n records Equilent in JPQL

2010-06-18 Thread C N Davies
OK assuming you have an entitymanager object called em Query query = em.createQuery("select blah blah "); query.setMaxResults(1); List ret = query.getResultList(); Returns the first record matching your query. -Original Message- From: SreeAsh [mailto:srinivasulu.krist...@fs.mphasis.c

RE: Column alias name in OPenJPA

2010-06-18 Thread C N Davies
Select uniqueid aliasid from -Original Message- From: SreeAsh [mailto:srinivasulu.krist...@fs.mphasis.com] Sent: Friday, 18 June 2010 8:46 PM To: users@openjpa.apache.org Subject: Column alias name in OPenJPA Hi All, I required column alias name, like Select empId as eid From t

RE: SELECT TOP n records Equilent in JPQL

2010-06-18 Thread C N Davies
query.setMaxResults(rcnt); -Original Message- From: SreeAsh [mailto:srinivasulu.krist...@fs.mphasis.com] Sent: Friday, 18 June 2010 8:19 PM To: users@openjpa.apache.org Subject: SELECT TOP n records Equilent in JPQL Hi all, Is there any implementation get TOp n recods in OPENJPA,

RE: Under what circumstances a table/row is locked exclusively if Optimistic=true & LockManager=version?

2010-06-10 Thread C N Davies
Not sure if OpenJPA 2.0 has this issue, but 1.2.x had an issue whereby it would not release locks in case of duplicate inserts failing unique constraints, might be worth checking. Did you check the lock owner? Chris -Original Message- From: Rick Curtis Sent: 11/06/2010 01:31:48 Subje

RE: JPA for portable database management (and wishes for JPA 3.0)

2010-06-08 Thread C N Davies
I like @Auditable because it's easy to switch on auditing of specific entities or entity hierarchies. But the property would allow for auditability globally to be turned on or off. Personally I would favour also adding a property like : - Pinaki -- View this message in context: http://

RE: openjpa-2.0 how join fetch work?

2010-05-31 Thread C N Davies
I find I need to cast my resultlist but your error doesn't suggest that is the issue but anyway : List result = (List)query.getResultList(); -Original Message- From: Zhanming Qi [mailto:openglo...@gmail.com] Sent: Monday, 31 May 2010 11:10 PM To: users@openjpa.apache.org Subject: openj

RE: tomcat6+openjpa+jsf

2010-05-31 Thread C N Davies
Hmm interesting. I'll send you a sample offline you can use to test. Chris -Original Message- From: davidautentico [mailto:davidautent...@hotmail.com] Sent: Tuesday, 1 June 2010 1:59 AM To: users@openjpa.apache.org Subject: RE: tomcat6+openjpa+jsf Put the find inside the transaction di

RE: tomcat6+openjpa+jsf

2010-05-31 Thread C N Davies
>From your stack trace it looks like there is a little more going on than I orginally understood to be the case, are you sure all this is being done in a single call to your servlet? I think that moving your find inside the transaction will fix the issue. -Original Message- From: davidau

RE: tomcat6+openjpa+jsf

2010-05-31 Thread C N Davies
Just on a hunch, Try em.clear() between the first commit and the find, I had a strange issue like this before: em.getTransaction().commit(); em.clear(); Person fx = em.find(Person.class, 1); -Original Message- From: davidautentico [mailto:davidautent...@hotmail.com] Sent: Tuesday, 1 J

RE: tomcat6+openjpa+jsf

2010-05-31 Thread C N Davies
>From your sample you have two issues, 1) you should be merging, 2) I don't' see a commit anywhere after the missing merge, here is a very basic sample of how to do it : EntityManagerFactory emf = Persistence.createEntityManagerFactory("PERSISTENCEUNITNAME"); EntityManager em = emf.createEntityMa

RE: tomcat6+openjpa+jsf

2010-05-31 Thread C N Davies
Well I can say for sure it is not you combination of technology because I use the same myself. We need more info first, like what version of OpenJPA you are using also are you using runtime or buildtime enhancement. Chris -Original Message- From: davidautentico [mailto:davidautent...@

RE: tomcat6+openjpa+jsf

2010-05-31 Thread C N Davies
You need to call kem.merge(p1); before flush Chris -Original Message- From: davidautentico Sent: 31/05/2010 17:44:42 Subject: tomcat6+openjpa+jsf Hi I have problems to update any entity in my database with openjpa in a jsf enviroment with Tomcat6 as server. When I executed this s

RE: equals, hashcode, toString, etc, and field access

2010-05-30 Thread C N Davies
a DB and retrieving them again. -Original Message- From: Trenton D. Adams [mailto:tr...@trentonadams.ca] Sent: Monday, 31 May 2010 3:26 PM To: users@openjpa.apache.org; c...@cndavies.com Subject: Re: equals, hashcode, toString, etc, and field access ----- "C N Davies" wrot

RE: equals, hashcode, toString, etc, and field access

2010-05-30 Thread C N Davies
ld totally work in a single VM, where you use enhancement. - "C N Davies" wrote: > From: "C N Davies" > To: "Trenton D. Adams" , users@openjpa.apache.org > Sent: Sunday, May 30, 2010 11:22:18 PM GMT -07:00 US/Canada Mountain > Subject: R

RE: equals, hashcode, toString, etc, and field access

2010-05-30 Thread C N Davies
Festival? Educational Media Foundation? Energy Modeling Forum? Eclipse Modeling Framework? Google wasn't helpful. lol ----- "C N Davies" wrote: > From: "C N Davies" > To: users@openjpa.apache.org > Sent: Sunday, May 30, 2010 7:14:44 PM GMT -07:00 US/Can

RE: equals, hashcode, toString, etc, and field access

2010-05-30 Thread C N Davies
2010 5:12 PM To: users@openjpa.apache.org Subject: Re: equals, hashcode, toString, etc, and field access I'm interested in hearing what you would like to see with regard to entities after the persistence context in which they were valid no longer exists. Thanks, Craig On May 28, 2010, at

RE: equals, hashcode, toString, etc, and field access

2010-05-28 Thread C N Davies
Darryl is right, I fought with this one for some time then it dawned upon me that I was dealing with a detached entity that had a lazy loaded field. The result of toString is like picking the lottery numbers.. pot luck! Now do the same thing with runtime enhancement during development and deploy it

RE: ArgumentException when using generics

2010-05-28 Thread C N Davies
Why not just use String.format(); to work around the issue and log a jira or fix the code and submit it. -Original Message- From: stlecho [mailto:stle...@gmail.com] Sent: Friday, 28 May 2010 6:40 PM To: users@openjpa.apache.org Subject: Re: ArgumentException when using generics Using

RE: openjpa-1.2.1 partial commit problem

2010-05-27 Thread C N Davies
ort of annotation that I need to do on my enum, but > don't know what. > > - "C N Davies" wrote: > > > From: "C N Davies" > > To: users@openjpa.apache.org > > Sent: Thursday, May 27, 2010 12:25:14 AM GMT -07:00 US/Canada > Mountain

RE: openjpa-1.2.1 partial commit problem

2010-05-26 Thread C N Davies
Use prepersist / preupate listeners, you can check the content of your objects inside there. Trust me, you would be better to spend your time working out why build time enhancement blows up one of your objects, as I mentioned before and Pinaki re-iterated runtime enhancement will often cause is

RE: Duplicate class definition for name: "sun/security/mscapi/SunMSCAPI"

2010-05-26 Thread C N Davies
http://kickjava.com/src/WhichClass.java.htm A nice example of how to find a class in your class path so you can understand what is being found where. Chris -Original Message- From: stlecho [mailto:stle...@gmail.com] Sent: Wednesday, 26 May 2010 8:27 PM To: users@openjpa.apache.org Subje

RE: Duplicate class definition for name: "sun/security/mscapi/SunMSCAPI"

2010-05-26 Thread C N Davies
I'd log the class path on application startup so you can see where it's being found in the classpath, that normally give me a clue. Chris -Original Message- From: stlecho [mailto:stle...@gmail.com] Sent: Wednesday, 26 May 2010 8:27 PM To: users@openjpa.apache.org Subject: Duplicate class

RE: Inappropriate error message

2010-05-25 Thread C N Davies
11:16 AM To: users@openjpa.apache.org; c...@cndavies.com Subject: Re: Inappropriate error message Build time enhancement? - "C N Davies" wrote: > From: "C N Davies" > To: users@openjpa.apache.org > Sent: Tuesday, May 25, 2010 7:32:11 PM GMT -07:00 US/

RE: Inappropriate error message

2010-05-25 Thread C N Davies
I raised this point about a year ago, this seems to be a catch all error because I would also get it on null fields intermittently when there was no DB constraint in effect. This was fixed by build time enhancement, but if you have a DB constraint then it doesn't seen to fix it as you have repor

RE: OpenJPA confusing classes

2010-05-25 Thread C N Davies
OK ic, thanks for the clarification. I still think it is a bug, because if I wanted to search by the super class I would have specified that. If you specify class x then how hard is it to get that right, having to specify this using a parameter that is defaulting to false just doesn't make any sen

RE: OpenJPA confusing classes

2010-05-25 Thread C N Davies
toString on all my entity classes always returns the primary key value, so I would have assumed that find using class type and key would always be unique especially when using table per class. Chris -Original Message- From: Pinaki Poddar [mailto:ppod...@apache.org] Sent: Wednesday, 26 M

RE: OpenJPA confusing classes

2010-05-25 Thread C N Davies
Thanks guys, I must say it seems strange that with when using table per class this would be the default behaviour. It was wasn't in 1.2.x Chris -Original Message- From: Jeremy Bauer [mailto:techhu...@gmail.com] Sent: Wednesday, 26 May 2010 12:12 AM To: users@openjpa.apache.org Subjec

RE: OpenJPA confusing classes

2010-05-24 Thread C N Davies
SQL trace is showing that OpenJPA is executing the finder against the base table instead of the individual table(s). Please file a JIRA for this bug. I'll get the test code into trunk and then someone (possibly myself) can look into fixing it. -Jeremy On Mon, May 24, 2010 at 11:55 AM, C N D

RE: OpenJPA confusing classes

2010-05-24 Thread C N Davies
to narrow down the source? You mention the "cache", but I'm not sure which one you are referring to. Your scenario looks pretty straight forward. Have you been able to create a simple testcase to demonstrate the problem? Any suggestions for resolution? Thanks, Kevin On Mon, May

RE: OpenJPA confusing classes

2010-05-24 Thread C N Davies
o:dk0...@att.com] Sent: Tuesday, 25 May 2010 1:33 AM To: users@openjpa.apache.org; c...@cndavies.com Subject: RE: OpenJPA confusing classes > -Original Message- > From: C N Davies [mailto:c...@cndavies.com] > Sent: Monday, May 24, 2010 8:19 AM > To: users@openjpa.apache.org > Subjec

OpenJPA confusing classes

2010-05-24 Thread C N Davies
Here's a snippet of my ode, (Department) es.find(Department.class, "N/A"); (PrintQueue) es.find(PrintQueue.class, "N/A"); Both Department and PrintQueue entities are based upon the same super class but I use table per class so they are in separate tables. As yo

RE: java.lang.IllegalArgumentException: no-named-params

2010-05-21 Thread C N Davies
Avoidance of NPE :) -Original Message- From: Daryl Stultz [mailto:daryl.stu...@opentempo.com] Sent: Saturday, 22 May 2010 1:32 AM To: users@openjpa.apache.org Subject: Re: java.lang.IllegalArgumentException: no-named-params On Fri, May 21, 2010 at 11:22 AM, C N Davies wrote: >

RE: java.lang.IllegalArgumentException: no-named-params

2010-05-21 Thread C N Davies
I don't mean to be pedantic, but String.format("SELECT id FROM %s WHERE (next_run - now() < interval '2 minutes')", tablename); Chris -Original Message- From: Miłosz [mailto:mtyle...@o2.pl] Sent: Saturday, 22 May 2010 12:11 AM To: users@openjpa.apache.org Subject: Re: java.lang.Illeg

RE: Schema version problem upgrading to JPA 2.0

2010-05-20 Thread C N Davies
You can set the classpath on a per server basis in weblogic, why not just do that so you can specifically tell weblogic what class you want your app to load with rather than let it use its default. The other thing I have done to sort these types of isues out is to create a basic app with a 2 funct

RE: Schema version problem upgrading to JPA 2.0

2010-05-19 Thread C N Davies
I had some issues like this when I switched, it ended up being that I had class files that had been compiled under 1.2.x still in my deployment directory. I blew the directory away and rebuilt and off I went. Chris -Original Message- From: KARR, DAVID (ATTSI) [mailto:dk0...@att.com] Sen

RE: PreUpdate listener is very nosey!

2010-05-19 Thread C N Davies
ache.org/builds/2.0.0/apache-openjpa-2.0.0/docs/manual/manu al.html#prePostUpdate On Wed, May 19, 2010 at 10:40 AM, C N Davies wrote: My code loads a collection of entities using findall(class). The em is left open rather than having to open and close it every time the user performs an operation

PreUpdate listener is very nosey!

2010-05-19 Thread C N Davies
My code loads a collection of entities using findall(class). The em is left open rather than having to open and close it every time the user performs an operation on one of these objects in the list. Below is my PreUpdate listener for that entity, so I know when it is getting called I have syst

RE: ClassFormatError when using Enhancement Builder

2010-05-19 Thread C N Davies
Some of the Eclipse bundles come with jre and jdk buried in some local directories, I have some under c:\user\local\chris\eclipse\blah\blah\com.sun\jre.. on my Win 7 machine. Have you specifically pointed your build file at JDK you are expecting it to use or are you replying on it finding the

RE: ClassFormatError when using Enhancement Builder

2010-05-19 Thread C N Davies
I think you need to check it first, because the error indicates jdk/jvm differences, here is how: The first 4 bytes are a magic number, 0xCAFEBABe, to identify a valid class file then the next 2 bytes identify the class format version (major and minor). Possible major/minor value : major minor J

RE: JPA 3.0

2010-05-18 Thread C N Davies
; values > > >>>>> for > > >>>>>>> the various annotation elements. If your application can live > > >> with > > >>>> the > > >>>>>>> default processing, then all that is really necessary is the > &g

RE: Ant based enhancement

2010-05-17 Thread C N Davies
Not so sure about NetBeans but in MyEclipse Ant is pretty fussy. I can set up mailto:curti...@gmail.com] Sent: Tuesday, 18 May 2010 12:25 AM To: users@openjpa.apache.org Subject: Re: Ant based enhancement I'm not an ant expert, but I do notice that in the blog posting the openjpac task specifie

RE: configure RemoteCommitProvider for Amazon EC2

2010-05-17 Thread C N Davies
Not quite answering your question but my issue was similar with proprietary OMS. Our DB is pretty large but not in clustered environment, bad design decision made many years ago. So our DB will "go away" and "come back" several times every day without warning, effectively leaving our application w

RE: Abstract class Fetch Join

2010-05-15 Thread C N Davies
I a have similar "Active" field on all my entities, I use "join fetch" not "left join fetch" for the same purpose but don't have this issue. Chris -Original Message- From: vld [mailto:knezevicvladi...@yahoo.com] Sent: Saturday, 15 May 2010 8:19 AM To: users@openjpa.apache.org Subject:

RE: InvalidStateException

2010-05-14 Thread C N Davies
I keep is simple by implementing an EntityService and let it handle the errors and such, so I can standardise error handling, persisting or merging decisions etc. Then I just have a private static instance of the factory so it gets shared application wide. Also for perfomance purposes I keep a cac

RE: InvalidStateException

2010-05-14 Thread C N Davies
You are creating a new entity manager each time you retrieve an entity manager, hence you will never have a transaction. Use my sample code and it will work. > protected EntityManager getEntityManager() { > return emf.createEntityManager(); <- always creating a new entity manager >

RE: InvalidStateException

2010-05-14 Thread C N Davies
I don't know what is inside "getEntityManager()" but the error suggests to me that it might be returning a different entity manager instance at each call, and hence you are committing outside a transaction which is what this error is telling you. I would code it like this: EntityManager em = getE

RE: JPA 3.0

2010-05-11 Thread C N Davies
up > > this process. > > > > Thanks for the input, > > Kevin > > > > [1] jsr-317-feedb...@sun.com > > [2] https://issues.apache.org/jira/browse/OPENJPA > > > > On Tue, May 11, 2010 at 9:12 AM, C N Davies wrote: > > > > > I'm so frustrated by JPA 2.0 but can't seem to find an JSR for JPA 3 or > > > anything. Can anyone point me it? > > > > > > > > > > > > Thanks J > > > > > > > > > > > > Chris > > > > > > > > > > > > > > >

JPA 3.0

2010-05-11 Thread C N Davies
I'm so frustrated by JPA 2.0 but can't seem to find an JSR for JPA 3 or anything. Can anyone point me it? Thanks J Chris

RE: Get the persistencUnit using EntittyManager Taking 4 seconds

2010-05-11 Thread C N Davies
This is one of the significant limitations with JPA, not just OpenJPA, each time you create an entity manager it reads all the DB meta before you can do anything. The only solution I have found is to keep an EM hanging around as long as possible and reuse it, this has it's own problems since it's s

RE: openjpa javaagent enhancement with tomcat

2010-05-10 Thread C N Davies
Set this property win your persistence.xml if you want to want to use runtime enhancement. But I'd use build time enhancement, check the list archives, runtime enhancement is pretty buggy and using build time enhancement fixes a lot of issues. I'd just get rid off runtime enhancement until it is m

RE: Slice: OutOfMemoryError shortly after pounding 1000+ threads to the system.

2010-05-03 Thread C N Davies
I had this issue a lot on OpenJPA 1.2.2, I found that doing a clear after committing a specified number of record kept things going. Chris -Original Message- From: ssso [mailto:simo...@yahoo.com] Sent: Tuesday, 4 May 2010 9:43 AM To: users@openjpa.apache.org Subject: Slice: OutOfMemor

RE: What is a NaN?

2010-05-03 Thread C N Davies
Inf http://www.concentric.net/~Ttwang/tech/javafloat.htm has other examples. -Original Message----- From: C N Davies [mailto:c...@cndavies.com] Sent: Monday, May 03, 2010 1:05 PM To: users@openjpa.apache.org Subject: RE: What is a NaN? No, just a str8 insert :( -Original Message- From: Da

RE: What is a NaN?

2010-05-03 Thread C N Davies
No, just a str8 insert :( -Original Message- From: Daryl Stultz [mailto:da...@6degrees.com] Sent: Tuesday, 4 May 2010 2:54 AM To: users@openjpa.apache.org Subject: Re: What is a NaN? On Mon, May 3, 2010 at 12:09 PM, C N Davies wrote: > I guess it is "Not a Number", &g

RE: problem with query.setParameter(values with space)

2010-04-30 Thread C N Davies
I think you should turn on TRACE logging for SQL in your persistence.xml then you can see what SQL OpenJPA is generating and your answer will be there. Hth Chris -Original Message- From: sp reddy [mailto:snakeoi...@gmail.com] Sent: Friday, 30 April 2010 2:19 PM To: users@openjpa.ap

RE: LazyLoading hell resolved

2010-04-29 Thread C N Davies
nt to get the size of the list. I'm not sure if you've looked at large result sets[1] in the past but they can be helpful when working with very large amounts of data. [1] http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_db setup_lrs -- Thanks, Rick On Thu, Apr

LazyLoading hell resolved

2010-04-29 Thread C N Davies
Finally I managed to sort out one of my major performance issues with OpenJPA, but to do so I feel like I'm sacrificing good design. I have a simple Entity: public class LoadHeader ...{ @ManyToOne(fetch=FetchType.LAZY) private List data; public int getData(){ retu

L1 Cache Problem

2010-04-28 Thread C N Davies
I have an issue with my OpenJPA 2.0 based app, where I keep getting L1 cache errors. Basically I have a backing bean that retrieves a collection of entities and retains them in a static list, if I try to retrieve this list a second time before the first load query has finished executing I will

RE: DataSource initialization error

2010-04-28 Thread C N Davies
I think you are supposed to set the property to class-table not the actual class name of he generator. Chris -Original Message- From: Ян Программист [mailto:webautoma...@gmail.com] Sent: Thursday, 29 April 2010 2:35 AM To: users@openjpa.apache.org Subject: DataSource initialization

RE: After statting the server login time taking 2 minutes

2010-04-27 Thread C N Davies
I have had a similar issue for a couple of months now, I enhance at build time, also checked that the classes are persistence cable. Still runs like a dog, a couple of minutes to retrieve a few thousand records is par for the course. I a not sure what started it, things were much better up unti

RE: IOB Error

2010-04-26 Thread C N Davies
Hi, Chris, Can you provide the entity definitions? Thanks, Fay - Original Message ---- From: C N Davies To: users@openjpa.apache.org Sent: Sun, April 25, 2010 2:51:56 AM Subject: IOB Error This application has been running just fine for the last few months, suddenly I am starting to get

IOB Error

2010-04-25 Thread C N Davies
This application has been running just fine for the last few months, suddenly I am starting to get this error. I have restored the DB and there have been no code changes to this software for months other than updating to OpenJPA Beta 3 a few weeks ago. I tested on the latest OpenJPA 2.0 releas

RE: Problem build and run hellojpa using Maven

2010-04-22 Thread C N Davies
Did you add the Message class to your persistence.xml? I just love OpenJPA error messages, about as useful as tits on a bull: "..The configuration property named "openjpa.Id" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.Id" ..." Look

RE: Entity data missing in enhanced mode

2010-04-21 Thread C N Davies
Not sure if this is your issue but when I used lazy loading I had similar issues. I removed the lazy loading and the issue went away. Chris -Original Message- From: Vásáry, Dániel [mailto:vas...@elgekko.net] Sent: Thursday, 22 April 2010 3:03 AM To: users@openjpa.apache.org Subject: E

RE: I just don't get OpenJPA joins

2010-04-19 Thread C N Davies
Yes these are enhanced at build time. I just loaded 34 lines of data and it took nearly an hour to commit. By comparison If I export my database in MySQL to an SQ script, blow the DB and then execute the script to recreate the db and create all the data, it will take only about 30 seconds to execut

I just don't get OpenJPA joins

2010-04-19 Thread C N Davies
I think I must be stupid or something, but I just don't' get the logic behind joins in OpenJPA. Here is an example: @Entity Public class User { @Id String somekey; @OneToOne(fetch=FetchType.LAZY,cascade={CascadeType.Refresh}) UserProf

OpenJPA Beta 3 enforcing group by rules

2010-04-06 Thread C N Davies
I have some queries that I have been using in my app for about a year now but since I started using Beta 3 they fail validation because OpenJPA wants me to include all of my select columns in the group by. Since most of the select items are SUM(blah) I can't really do that and also there is no nee

RE: Unmanaged Object Problems

2010-04-06 Thread C N Davies
ers@openjpa.apache.org; c...@cndavies.com Subject: Re: Unmanaged Object Problems On Sun, Apr 4, 2010 at 12:12 PM, C N Davies wrote: This is a problem that continues to haunt me intermittently since I first started using OpenJPA and cannot understand why it comes up from time to time for no apparent r

Unmanaged Object Problems

2010-04-04 Thread C N Davies
Hi, This is a problem that continues to haunt me intermittently since I first started using OpenJPA and cannot understand why it comes up from time to time for no apparent reason. I have an Entity like this: @Entity public class DataLoad { .. @ManyToOne(cascade={CascadeType.R

RE: Serializing database tables to file - eager load problems

2010-03-08 Thread C N Davies
Hi Mike, I had a similar issue when creating my reporting engine, since I always use single table per class strategy I and a consistent foreign key name, I reverted to native queries to extract the data. For example, I have a main entity "Supplier" which has a ManyToOne relationship to the "User"

Getting version data

2010-03-05 Thread C N Davies
Hi, I need to report the version of OpenJPA that is being used in software, it's very useful when supporting my products. I can't seem to find any function that will return the version of the implementation. Something like org.apache.openja.Version.getVersion() org.apache.openja.Version.

Query Mayhem

2010-02-26 Thread C N Davies
Hi, I am using Open JPA 2.0 Beta and I have some JPQL that seems to be confusing the parser. Here is my query: SELECT ct.assets.queue.uniqueid from Contract ct where ct.uniqueid = '012444686ECC' Here is my parse error: "Error message: No field named "queue" in class "class co

RE: JPA adding class name to join column name

2010-02-26 Thread C N Davies
OpenJPA does use the class name as a prefix for columns, for example if I have a many to one relationship and I am using TablePerClass, then the column name for the external reference is named like this: ReferenceClass_key For example in my "Asset" entity I have a reference to a "Contract" entit

RE: Query confusion

2010-02-24 Thread C N Davies
ue, Feb 23, 2010 at 11:41 PM, C N Davies wrote: Thanks Catalina. I didn't see that in the spec so I will take another look at it. It would be nice to have it as a feature but personally I prefer strong adherence to specifications and if I want a feature to try to get the spec improved. I

RE: Query confusion

2010-02-23 Thread C N Davies
for your patience. We'll get to the bottom of your questions soon. Thanks, Kevin On Tue, Feb 23, 2010 at 7:11 PM, C N Davies wrote: Hi Kevin, It's a bit strange, because I had this issue when I was trying move up to 2.0Beta from 1.2.1 on the weekend. I found that Jira and used

RE: Query confusion

2010-02-23 Thread C N Davies
nk I found the JIRA you were referring to... https://issues.apache.org/jira/browse/OPENJPA-1410. I'm not sure what's in Nicolas's patched version. Since Donald is the current assignee, I'll copy him on this reply to see if he has any other ideas. And, I'll copy Rick since

RE: Query confusion

2010-02-22 Thread C N Davies
y. Chris From: Kevin Sutter [mailto:kwsut...@gmail.com] Sent: Tuesday, 23 February 2010 1:19 AM To: users@openjpa.apache.org; c...@cndavies.com Subject: Re: Query confusion Hi Chris, Which classloader issue are you referring to? Thanks, Kevin On Sat, Feb 20, 2010 at 5:49 AM, C N Davies

  1   2   3   >