Re: OpenJPA for write more read less scenario

2009-09-08 Thread Pinaki Poddar
> I think openJPA only suits when we have read more and write less kind of applications. OpenJPA is used for many purposes. It will not be fair to reduce its applicability as narrowly as you suggest. But if an application is not challenged by object-relational mapping, ACID transaction integrity

Re: Cannot enhance at build time - strange ZipException

2009-09-08 Thread Pinaki Poddar
I have seen this. Had no definite closure. Seemingly occurs with certain version of Ant, JDK, Maven etc... The error stopped me for several days -- and disappeared as mysteriously as it appeared when I tweaked with different version of Ant. jack.terranova wrote: > > Sounds like this poster had

Re: Eclipse project Build Time Enhancement

2009-09-08 Thread Pinaki Poddar
> I installed the OpenJPA plug-in Did you mean the eclipse plug-in as available in [1] http://people.apache.org/~ppoddar/eclipse/ > used and this is so buggy and memory hungry that it's not practical to > use for any reasonable sized > project. What is the specific bug anyway that seems to ir

Re: Parameters must be managed?

2009-09-08 Thread Pinaki Poddar
I remember fixing an issue when query parameter is an entity (manged, detached or unmanaged). But can not recollect when (which version), where (which code) or which JIRA issue. If memory serves me right, the fix effectively translates query parameter bound to an entity to the primary key values

Re: Parameters must be managed?

2009-09-08 Thread Kevin Sutter
Hi Daryl, All that I can say is that the posting you referenced is almost two years old and it may have been resolved in the release that you ran against. What version of OpenJPA did you try to reproduce the problem with? I did a quick search of our JIRA's to see if this has been resolved, but I

Re: Unhelpful exception message

2009-09-08 Thread Kevin Sutter
Thanks, Daryl. From your description, I would agree with your assessment. :-) Could you open a JIRA issue [1] with information from this posting? If you don't have JIRA access, let me know and I can create it for you. Thanks, Kevin [1] https://issues.apache.org/jira/browse/OPENJPA On Tue, Sep

Re: Cannot enhance at build time - strange ZipException

2009-09-08 Thread Kevin Sutter
Hmmm... The information for your Ant task may be old... I don't remember that we highlighted the need for commons-lang-2.4 like that... Here's a blog post [1] that helps explain the various mechanisms for dynamic and static enhancement processing. Maybe that will help with diagnosing the proble

Re: Eclipse project Build Time Enhancement

2009-09-08 Thread Kevin Sutter
Is this the plugin [1] you are referring to? If so, this extra menu item is supposed to be used to indicate that you want the Enhancer build step to be configured for your project. You indicate that you are using 1.2.x. The last time I used this plugin, it worked for me. I'll copy the originato

Re: [NEWBIE] OpenJPA Cannot get id field returned

2009-09-08 Thread Kevin Sutter
Here's another idea... When did these entities get persisted to the database? And, are they still part of the persistence context that is being used for the query? Generated identity fields are not available in the Entity objects until they are retrieved from the database. But, if the Entities

RE: [NEWBIE] OpenJPA Cannot get id field returned

2009-09-08 Thread C N Davies
Yes I just turn on trace logging and then test the query in my SQL tool to work our what the issue is. -Original Message- From: ashish paliwal [mailto:ashishpaliwal@gmail.com] Sent: Wednesday, 9 September 2009 2:25 AM To: users@openjpa.apache.org; c...@cndavies.com Subject: Re: [NEWBI

Re: [NEWBIE] OpenJPA Cannot get id field returned

2009-09-08 Thread ashish paliwal
Yes, id I too believe should be without quotes. In any case the query generated should provide with sufficient information about what is going wrong. On Tue, Sep 8, 2009 at 11:16 PM, C N Davies wrote: > Seems like id is an int and your quoting it, so that shouldn't work. > > > > Try turning on S

RE: [NEWBIE] OpenJPA Cannot get id field returned

2009-09-08 Thread C N Davies
Seems like id is an int and your quoting it, so that shouldn't work. > Try turning on SQL trace to see what SQL is being generated from your > JPQL. > > Rick > > > > On Sep 8, 2009, at 3:54 AM, "B.L. Zeebub" > wrote: > > > > > > > > > Jean-Baptiste BRIAUD -- Novlog wrote: > >> > >> Did

RE: Eclipse project Build Time Enhancement

2009-09-08 Thread C N Davies
When I say "eclipse project" I mean I am creating a project in Eclipse, I am not using Ant and I don't want to use Ant. I tried the OpenJPA plug-in but it doesn't do anything except add a menu item, I still need to use runtime enhancement which is a pig of a thing. -Original Message- From

Re: [NEWBIE] OpenJPA Cannot get id field returned

2009-09-08 Thread Miłosz Tylenda
Also, you could try removing single quotes from your JPQL string: "Select c from Platform c where c.id = 8" Regards, Milosz > Try turning on SQL trace to see what SQL is being generated from your > JPQL. > > Rick > > > > On Sep 8, 2009, at 3:54 AM, "B.L. Zeebub" > wrote: > > > > > > >

Re: Eclipse project Build Time Enhancement

2009-09-08 Thread Daryl Stultz
On Tue, Sep 8, 2009 at 11:34 AM, Rick Curtis wrote: > What do you mean by eclipse project? It sounds like you may have already > tried the Eclipse OpenJPA plugin and ran into problems? I know I tried it and it didn't do anything. > Normally I setup an ant builder[1] when running in Eclipse. >

Re: Eclipse project Build Time Enhancement

2009-09-08 Thread Rick Curtis
What do you mean by eclipse project? It sounds like you may have already tried the Eclipse OpenJPA plugin and ran into problems? Normally I setup an ant builder[1] when running in Eclipse. Rick [1] http://webspherepersistence.blogspot.com/2009/04/openjpa-enhancement-eclipse-builder.html

Re: [NEWBIE] OpenJPA Cannot get id field returned

2009-09-08 Thread Rick Curtis
Try turning on SQL trace to see what SQL is being generated from your JPQL. Rick On Sep 8, 2009, at 3:54 AM, "B.L. Zeebub" wrote: Jean-Baptiste BRIAUD -- Novlog wrote: Did you try GenerationType.IDENTITY ? @GeneratedValue(strategy = GenerationType.IDENTITY) I think it should work

Re: openjpac lots of questions

2009-09-08 Thread Tedman Leung
> 1. .java or .class files ? > > that openjpac enhancer works on .java files. > > I thought it works on .class files ... can one clarify that point ? > > In other words, should I have .java (source folder) or .class (dest > folder after compile) here ? > > > it can at leas

Unhelpful exception message

2009-09-08 Thread Daryl Stultz
Hi all, I wrote this query here. select o from User as o where o.id in ( select valueInteger from UserPersistentParameter as o ) but I got org.apache.openjpa.persistence.ArgumentException: null at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:814) at org.apache.openjpa.kernel.QueryI

Parameters must be managed?

2009-09-08 Thread Daryl Stultz
Hey, Through some wacky querying I came across this: http://n2.nabble.com/Persistent-entities-pass-as-params-to-JPQL-queries-MUST-be-attached-Query-getSingleResult-bug-or-exp-td209033.html I tried to verify this but could not. Here's a simple attempt: User user = new User(); user.setId(userId);

Re: [NEWBIE] OpenJPA Cannot get id field returned

2009-09-08 Thread B.L. Zeebub
Jean-Baptiste BRIAUD -- Novlog wrote: > > Did you try GenerationType.IDENTITY ? > @GeneratedValue(strategy = GenerationType.IDENTITY) > > I think it should work with int but I prefer long instead. > GenerationType.IDENTITY appears to make no difference. However, suprisingly (to me anyway) @

Re: [NEWBIE] OpenJPA Cannot get id field returned

2009-09-08 Thread ashish paliwal
Hi, How is it dependent upon GenerationType ? As per the doc, "IDENTITY" means value generated by database upon insertion and "AUTO" means openjpa will decide the value. Someone please throw some light . thanks On Tue, Sep 8, 2009 at 2:54 PM, Jean-Baptiste BRIAUD -- Novlog < j-b.bri...@novlog.c

Re: [NEWBIE] OpenJPA Cannot get id field returned

2009-09-08 Thread Jean-Baptiste BRIAUD -- Novlog
Did you try GenerationType.IDENTITY ? @GeneratedValue(strategy = GenerationType.IDENTITY) I think it should work with int but I prefer long instead. On Sep 8, 2009, at 10:56 , B.L. Zeebub wrote: Hi I have attached my entity definition below. This was created over a pre-existing database. I c

openjpac lots of questions

2009-09-08 Thread Jean-Baptiste BRIAUD -- Novlog
Hi, I read here http://openjpa.apache.org/builds/1.0.2/apache-openjpa-1.0.2/docs/manual/ref_guide_integration.html more precisely in that paragraphs : Example 12.6. Invoking the Enhancer from Ant Example 12.7. Invoking the Application Identity Tool from Ant This doesn't seem to have changed i

[NEWBIE] OpenJPA Cannot get id field returned

2009-09-08 Thread B.L. Zeebub
Hi I have attached my entity definition below. This was created over a pre-existing database. I create the EntityManagerFactory to obtain the entitymanager (em) as normal and execute the code; String jpql = "select c from Platform c"; em.getTransaction().begin();

Re: java.lang.StackOverflowError Exception after enabling cach

2009-09-08 Thread javadia...@gmail.com
Hi Excuse me for the late reply Thanks for your replies and helps My problem was solved . I have an embeddable class that I use it as embedded property in some entity class and we forgot to list it on the persistence.xml file and then enhancer didn’t enhance it .I think this embeddable class w