Re: OpenJPA 2.0 and Glassfish 3.1 issue

2011-04-11 Thread chuongpham
Thank you, Michael, you're a life saver! I have been stuck on this issue for the last four days while your solution below only took a few seconds to implement. Wow! Hi, I think you're hitting OPENJPA-1410;. There's a lot of comments to read thr

Re: OpenJPA 2.0 and Glassfish 3.1 issue

2011-04-11 Thread Michael Dick
Hi, I think you're hitting OPENJPA-1410. There's a lot of comments to read through, but I think it boils down to adding these two properties

Re: Can't get hellopjpa from examples working.

2011-04-11 Thread Michael Dick
Hi Joep, You're posting to the right forum. The stack indicates that there's a problem with a connection. Have you changed anything in the sample related to the database? I just downloaded a fresh copy and I wasn't able to reproduce the problem (Oracle Java 1.6.0_24 on Linux). -mike On Mon, Apr

OpenJPA 2.0 and Glassfish 3.1 issue

2011-04-11 Thread chuongpham
I get an error when running OpenJPA 2.0 within Glassfish 3.1 server. The full stacktrace of the error is: WARNING: A system exception occurred during an invocation on EJB BookService method public com.ckd.model.BookModel com.ckd.business.BookService.find(java.lang.Long) javax.ejb.EJBException

Re: Issues with GeneratedValue and SequenceGenerator

2011-04-11 Thread Rick Curtis
1.2. Final Entity classes may not be final. No method of an entity class can be final. Note OpenJPA supports final classes and final methods. Confusing? Perhaps. It seems pretty clear that we don't support final Entities or final Entity methods. I'm not sure what the "Note" is referring to thoug

Re: Issues with GeneratedValue and SequenceGenerator

2011-04-11 Thread realdepp
I'm not sure about that - the final modifier seems to be the cause for the problem. The JPA spec sais: "Entity classes may not be final. No method of an entity class can be final." BUT the OpenJPA docs say: "OpenJPA supports final classes and final methods." http://openjpa.apache.org/builds/2.1.0

Can't get hellopjpa from examples working.

2011-04-11 Thread Joep Simons
Hello, I downloaded apache-openjpa-2.1.0 in order to try it out, starting with a simple example. Unfortunately I cannot get the simple hellojpa example from the examples working. I use apple snow-leopard (java 1.6.0_24) I am not sure if I am posting in the right forum since I am totally new to

Re: Help Persisting a List

2011-04-11 Thread Heath Thomann
In addition to Mike's question, I'd like to know what version of OpenJPA you are using. I've seen this issue before and fixed it with JIRA OJ-1665. I did notice your BorderPoint class uses an '@GeneratedValue' so it appears you are using auto generated values as described in OJ-1665. This JIRA w

Re: OpenJPA and GWT Serialization

2011-04-11 Thread Jason Ferguson
It looks like I have 1.0. I'll try switching over to 2.0 tonight and let you know. Jason On Mon, Apr 11, 2011 at 9:58 AM, Michael Dick wrote: > I took another look at the proxy code again and realized that my > persistence.xml file was using version 1.0 as the schema version. > > Changing it to

Re: OpenJPA and GWT Serialization

2011-04-11 Thread Michael Dick
I took another look at the proxy code again and realized that my persistence.xml file was using version 1.0 as the schema version. Changing it to version 2.0 lead to results more like what you're looking for. Proxies still remain in the entities after the entity is detached, but will be removed wh

Re: OpenJPA and GWT Serialization

2011-04-11 Thread Michael Dick
Hi Jason, Detachment and proxy classes are fairly complicated in OpenJPA. Like Rick mentioned I've started looking at what it'd take to remove the proxies and it's turned into a more sizable effort than I'd hoped. OpenJPA was originally designed with JEE application servers in mind and it answers