Date Problem

2009-05-19 Thread Russell Collins
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 pain to try to work in Geronimo). Everything works fine except for Dates and Times. I have

Re: strange JPA Enhance stack

2009-05-19 Thread Marc Logemann
Craig, my intention was not to rant against SERP :-) I already filed a JIRA. I will report things there if i see something new during my tests... --- regards Marc Logemann http://www.logemann.org http://www.logentis.de Am 19.05.2009 um 21:57 schrieb Craig L Russell: Hi Marc, As Mike

Re: @MappedSuperClass Cause Null Pointer Exception in Class With IdClass

2009-05-19 Thread Fay Wang
Hi, Your test case has been checked into svn in JIRA-873 in package: org.apache.openjpa.persistence.inheritance.mappedsuperclass: TestMappedSuperClass BaseEntity CashBaseEntity SharedName1 SituationDA ValuableItemDA This test case works fine. Could you please double check if this test ca

Re: strange JPA Enhance stack

2009-05-19 Thread Craig L Russell
Hi Marc, As Mike says, we could be a bit more friendly. By the way, SERP has been very reliable so this hasn't been much of an issue to date. Could you please file a JIRA so we don't forget about it? Thanks, Craig On May 19, 2009, at 5:53 AM, Michael Dick wrote: Hi Marc, Sounds like an

Re: Runtime Enhancement: Problems with Ant Task in Eclipse

2009-05-19 Thread Rick Curtis
Naomi -- I've spent the better part of my morning trying to figure out what was going on and I finally have an answer for you. Please don't ask me to explain why I did what I did, because honestly I'm not entirely sure what the problem is. Through debugging I found that there was some class defin

way to get FieldMetaData for transient field

2009-05-19 Thread Heather Sterling
Hi, I was wondering if there was a way to retrieve FieldMetaData for a non-persistent field. I know that the majority of the APIs in ClassMetaData, such as getFields(), only return persistent fields. I tried using getDeclaredUnmanagedFields(). That did not work and I am not sure I grasp the i

Re: Enhancing entities: getting desperate

2009-05-19 Thread Prodoc
Darn, I shouted too soon... 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 It appears to have worked before becaus

Re: Enhancing entities: getting desperate

2009-05-19 Thread Prodoc
Michael Dick wrote: > > Do you have all your entities listed in persistence.xml? The exceptions > below look like the list is either missing, or doesn't have a complete > list > of your entities. > Thanks for your reply Michael. Yes, I do have all the entities included in persistence.xml exce

Re: strange JPA Enhance stack

2009-05-19 Thread Marc Logemann
Mike, i am using: conf="default->default,sources,javadoc"/> I am 80% sure its OpenJDK related because the rest of the story is absolutely the same compared what our people do on their dev machines but nobody uses OpenJDK 6 on the dev machines. So thats why we never had problems with that

Re: strange JPA Enhance stack

2009-05-19 Thread Michael Dick
Hi Marc, Sounds like an unchecked exception thrown by Serp and we could be a bit friendlier about how we handle it. At least dumping the classname that we're trying to load would help. Adding a try / catch might be helpful. Which version of OpenJPA are you using? My guess is that it is OpenJDK re

Re: Enhancing entities: getting desperate

2009-05-19 Thread Michael Dick
Hi, Do you have all your entities listed in persistence.xml? The exceptions below look like the list is either missing, or doesn't have a complete list of your entities. -mike On Tue, May 19, 2009 at 2:23 AM, Prodoc wrote: > > Hi, > > I don't know what I'm doing wrong but I can't seem to get O

Re: id and @GeneratedValue

2009-05-19 Thread Wes Wannemacher
Yeah... I've seen stored procs like this on more than one occasion - DECLARE @newId INT SELECT @newId = MAX(idCol) FROM IdTable INSERT INTO IdTable (IdTable, ... ) VALUES ( @newId +1, ... ) RETURN @newId + 1 (or SELECT @newId + 1 as OUTPUT) *untested of course, trying to remember off the top of m

RE: isPersistent()

2009-05-19 Thread Ravi Palacherla
Hi Michael, Please check OpenJPAEntityManager interface in javadoc. You can use OpenJPAEntityManager.isPersistent(object); Regards, Ravi. -Original Message- From: Michael Simons [mailto:michael.sim...@optitool.de] Sent: Tuesday, May 19, 2009 6:20 AM To: users@openjpa.apache.org Subject

Re: Enhancer problem, using ant

2009-05-19 Thread Michael Simons
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks Rick, Michael Rick Curtis schrieb: > Michael - > > When you define your openjpac task, you're missing some of the required > classes. You could change your > openjpac taskdef to something like: > > classpath="${jpa.lib}/openjpa-1.2.1.jar;$

isPersistent()

2009-05-19 Thread Michael Simons
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, We're porting a JOD-based application to OpenJPA 1.2.1. Is there anything like the JDOHelper.isPersistent, isDeleted() methods? How can I check whether an Entity is persitent? kind regards, Michael -BEGIN PGP SIGNATURE- Version: GnuPG

Re: id and @GeneratedValue

2009-05-19 Thread Daryl Stultz
On Sun, May 17, 2009 at 1:30 PM, Wes Wannemacher wrote: > That is generally a bad idea. Select max(row) will generally initiate > a full index scan or, even worse, a full table scan. > Isn't it a greater problem that this approach is a race condition? 2 threads call max(id) about the same time a

Re: id and @GeneratedValue

2009-05-19 Thread Miłosz Tylenda
Hello! I don't think OpenJPA has an id generator suitable for your need but you could try creating a custom one by extending AbstractJDBCSeq or one of its subclasses. Jeremy has recently posted a sample [1] in another thread. Regards, Milosz [1] http://n2.nabble.com/correct-way-to-load-persis

Re: @MappedSuperClass Cause Null Pointer Exception in Class With IdClass

2009-05-19 Thread is_maximum
Hello I am using OpenJPA 2.0 SNAPSHOT but it seems that the problem still exists Here is the stack trace of exception thrown. The test case succeeded without IdClass and using Embedded id but IdClass has problem. javax.ejb.EJBException: The bean encountered a non-application exception.; nested e

Re: @MappedSuperClass Cause Null Pointer Exception in Class With IdClass

2009-05-19 Thread is_maximum
Hello I am using OpenJPA 2.0 SNAPSHOT but it seems that the problem still exists Here is the stack trace of exception thrown. The test case succeeded without IdClass and using Embedded id but IdClass has problem. javax.ejb.EJBException: The bean encountered a non-application exception.; nested e

Re: strange JPA Enhance stack

2009-05-19 Thread Marc Logemann
David, no, have not done this. Its quite a hughe effort to create a project from scratch and deploy it to SCM and configure TeamCity to "compile/ test" it. I still think its not a library issue because i use ivy within ANT and the build system resolves libs the same way as its done on each

Enhancing entities: getting desperate

2009-05-19 Thread Prodoc
Hi, I don't know what I'm doing wrong but I can't seem to get OpenJPA to work in my project. I keep running into entity enhancement issues. The more methods I try, to more problem it seems to be causing. *Using* - NetBeans 6.5.1 - Java jdk1.5.0_16 - OpenJPA 1.2.1 - Derby 10.5.1.1 *Structure* -

Re: How to encrypt DB password in persistence.xml

2009-05-19 Thread wang yu
Kevin, Thanks for your patient answer. I'll try to resolve it in dbcp community. Cheers, Yu Wang On Mon, May 18, 2009 at 9:03 PM, Kevin Sutter wrote: > Hi Yu Wang, > My apologies, but I'm not an expert with DBCP.  I just thought I would do a > quick Google search to see what's out there and I fo