Re: Enhancing entities: getting desperate

2009-05-20 Thread Michael Dick
Enabling trace when you run the enhancer should print a list of the classes as they are enhanced. Try adding the following to persistence.xml : -mike On Wed, May 20, 2009 at 9:20 AM, Prodoc wrote: > > > > Kevin Sutter wrote: > > > > The doPrivileged call is used for Java2 Security permission

Re: TABLE_PER_CLASS does not work as described in JSR-220 (JPA-1.0)

2009-05-20 Thread Jody Grassel
Looking at your data model, you're intending the class AbstractFoo to define new persistent types without AbstractFoo having a table mapping. Instead of annotating the abstract class with the @Entity annotation, I think you should use the @MappedSuperclass annotation. What I think should be determ

Re: TABLE_PER_CLASS does not work as described in JSR-220 (JPA-1.0)

2009-05-20 Thread Serge Bogatyrev
I've created an issue: OPENJPA-1096 Craig L Russell wrote: Hi Serge, Could you please open a JIRA so we can track this issue? Thanks, Craig On May 11, 2009, at 11:03 AM, Serge Bogatyrev wrote: This mixed strategy can be very usefull. But

Re: strange JPA Enhance stack

2009-05-20 Thread Donald Woods
Which Linux platform and level of OpenJDK 6 are you using? Are you using Fedora 10 and the OpenJDK it provides...? Are you running x86 or x86_64 Linux? -Donald Marc Logemann wrote: Hi, today we installed our Continous build system (TeamCity) and we tried to run our first automated build

Re: Date Problem

2009-05-20 Thread Michael Dick
In general I agree, I just sent on the reply from earlier to help Russell get going. Opening a JIRA is a good idea, I think this warrants some further investigation and I hadn't noticed the discrepancy between detach() and clear().. -mike On Wed, May 20, 2009 at 9:49 AM, Kevin Sutter wrote: >

Re: Can we have an entity with no @Id?

2009-05-20 Thread Craig L Russell
Hi, Tables without primary keys is one of the features of JDO that was not adopted by JPA. Maybe you should look at JDO implementations. Craig On May 20, 2009, at 8:12 AM, is_maximum wrote: Hello To Andrei I want to say that because it is simple to create an object and send it to be

Re: @Version annotated Field not included in SELECT (prepstmnt)

2009-05-20 Thread Craig L Russell
Hi Heiko, The following types are supported for version properties: int, Integer, short, Short, long, Long, Timestamp. Try changing the type of the version field and see if that helps. If so, please file a JIRA to give an error message instead of a silent fail. Thanks, Craig On May 2

Re: Runtime Enhancement: Problems with Ant Task in Eclipse

2009-05-20 Thread Naomi-san
Hi, okay, this really makes sense. Even the Spring documentation says: "Not all JPA providers impose the need of a JVM agent (Hibernate being an example). If your provider does not require an agent or you have other alternatives (for example applying enhancements at build time through a custom

Re: Can we have an entity with no @Id?

2009-05-20 Thread is_maximum
Hello To Andrei I want to say that because it is simple to create an object and send it to be persisted however this could be a good idea. And to Kevin, if in secondary table we have only a foreign key to distinct records that would be enough because the id for the secondary table is not used a

Re: Date Problem

2009-05-20 Thread Kevin Sutter
Mike, I think that our detached entities should remove any dependencies on OpenJPA binaries. From one of the recent forum postings, it sounds like the detachment works on an individual detach() invocation and not with the clear() invocation (or vice versa -- my memory isn't very good this morning)

Re: Enhancing entities: getting desperate

2009-05-20 Thread Prodoc
Kevin Sutter wrote: > > The doPrivileged call is used for Java2 Security permission checking. If > you are not running with Java2 Security enabled, then this turns into > "noise". I'm assuming you are not running with Java2 Security. > You are right, I'm not running with Java2 Security.

RE: Date Problem

2009-05-20 Thread Russell Collins
Thanks Mike. I included openjpa-1.2.1.jar in my client app and everything works great. Russell Collins Sr. Software Engineer McLane Advanced Technology "Do or do not, there is no try." - Yoda -Original Message- From: Michael Dick [mailto:michael.d.d...@gmail.com] Sent: Wednesday, May

Re: Date Problem

2009-05-20 Thread Michael Dick
Hi Russell, I think you're hitting the same problem mentioned here [1]. The short answer is that the client needs to have access to openjpa-1.2.1.jar so it can load the proxy classes. The larger question is whether OpenJPA should (or could) serialize to a non-proxy type to prevent this problem.

Re: Can we have an entity with no @Id?

2009-05-20 Thread Kevin Sutter
Hi is_maximum, I'm still a little confused by your scenario. Following your described scenario... Your master table would have an Id field, but your secondary table would not have an explicit Id field. The foreign key from your master to secondary would just be some arbitrary column from the sec

Re: Runtime Enhancement: Problems with Ant Task in Eclipse

2009-05-20 Thread Rick Curtis
Naomi- I was thinking about this problem some more this morning and since you're enhancing your Entities at build time, there isn't any reason to have a Spring weaver configured. I did some digging around and found a forum post regarding this very issue [1]. -Rick [1] http://forum.springsource

Re: Can we have an entity with no @Id?

2009-05-20 Thread Andrei Tchijov
Why do you need to use JPA at all in this scenario? If you concern about performance, just use simple JDBC. Keeping in mind that id is the only way to distinct one Entity from another, I am fairly sure that it is impossible to define Entity without ID. -- View this message in context: http://n

Re: Can we have an entity with no @Id?

2009-05-20 Thread Andrei Tchijov
Why do you need to use JPA at all in this scenario? If you concern about performance, just use simple JDBC. Keeping in mind that id is the only way to distinct one Entity from another, I am fairly sure that it is impossible to define Entity without ID. -- View this message in context: http://n

Re: Enhancing entities: getting desperate

2009-05-20 Thread Kevin Sutter
Hi Prodoc, The call stack indicates that we are attempting to process the Access Type for a Method (Field or Property). enhance: java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(

Re: Enhancing entities: getting desperate

2009-05-20 Thread Rick Curtis
It would appear that the class org.w3c.dom.svg.SVGDocument isn't on the classpath when you run the enhancer. -Rick Prodoc wrote: > > Fixed now. A simple later calling of the enhance target did the trick. > I'm now back at the 'NoClassDefFoundError' error. Any idea what the cause > of this cou

Re: Date Problem

2009-05-20 Thread is_maximum
Have you tried java.util.Date instead of java.sql.Date ? Russell Collins wrote: > > Hello, I am new to OpenJPA and the entire persistence objects so bear with > me a little. First of all, I am using Apache Geronimo which has OpenJPA > version1.2.1 and I am moving from Hibernate (which is a pai

Can we have an entity with no @Id?

2009-05-20 Thread is_maximum
Hi We have some tables in which id is not important and actually it is useless. For example we have two logging tables, one is master and the other is keeping details. The only foreign key from the master table is enough and the second table has no relationship with other tables so if we remove it

Re: id and @GeneratedValue

2009-05-20 Thread is_maximum
Ok guys This is a big application for a banking systems and as you know the Oracle's sequences have some problem. The sequences take up cache and this ends up with lacking of cache places and finally the whole performance will be downgraded. There are lots of tables and each has its own sequence s

Re: Runtime Enhancement: Problems with Ant Task in Eclipse

2009-05-20 Thread Naomi-san
Hi Rick, thank you so much for your time you spent! Aww, I knew, that there was a time I did not have that enhance-message, but I thought I just imagined it ;) I already used the InstrumentationLoadTimeWeaver some time before (that is why it was commented out in db.xml), but got warning message

@Version annotated Field not included in SELECT (prepstmnt)

2009-05-20 Thread it-media . kopp
Hello, I'm having an issue in openJPA 1.2.1 with a entity model as follows: @Entity @Table(name = "PARTNER", schema = "PART") @NamedQuery(name = "getPartner", query = "SELECT p FROM Partner p where p.partKey = :partKey") public class Partner { @Id @Column(name = "PART_KEY") private B

Re: Enhancing entities: getting desperate

2009-05-20 Thread Prodoc
Prodoc wrote: > I just performed a clean and with the same build config as mentioned in my > last post I now get presented with a different error: > > java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: > mpsf.entities.EngagementRange > Fixed now. A simple later calling of th