Just to complete my findings from the earlier post... Here's a reference [1] to the previous, recent discussion on the detach vs clear processing. This particular customer problem ended up being a problem with Hessian serialization, but it still looks like our detachment processing is not the same between detach and clear.
I also found this unfinished discussion between Pinaki and myself about a similar situation [2]. I can understand the need to track changes in a detached state for efficiency reasons. But, this should be configurable. And, per the earlier comment, we need to be consistent. I searched for an existing JIRA Issue, and I couldn't find one. So, I created OPENJPA-1097 [3] to track this problem. Thanks, Kevin [1] http://n2.nabble.com/AutoDetach-td2868435.html#a2884042 [2] http://n2.nabble.com/Re%3A-Is-java.util.date-not-supported-by-remote-interface---td667769.html#a667769 [3] https://issues.apache.org/jira/browse/OPENJPA-1097 On Wed, May 20, 2009 at 2:46 PM, Michael Dick <michael.d.d...@gmail.com>wrote: > 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 <kwsut...@gmail.com> wrote: > > > 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). We need to be consistent and remove this dependency. I > thought > > we had a JIRA on this topic, but I can't find that either. Must be > getting > > old... > > > > Comments? > > Kevin > > > > On Wed, May 20, 2009 at 9:16 AM, Michael Dick <michael.d.d...@gmail.com > > >wrote: > > > > > 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. I don't see the answer in the > > > previous thread, but some additonal markmail or nabble searching may > find > > > it. > > > > > > [1] http://markmail.org/thread/2dmgcbnw6yo7b77n > > > > > > Hope this helps, > > > > > > -mike > > > > > > On Wed, May 20, 2009 at 7:18 AM, is_maximum <mnr...@gmail.com> wrote: > > > > > > > > > > > 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 pain to try > > to > > > > > work in Geronimo). Everything works fine except for Dates and > Times. > > > I > > > > > have an Embedded class that starts off like this: > > > > > > > > > > > > > > > @Embeddable > > > > > public class EntityChange implements Serializable { > > > > > > > > > > > > > > > private static final long serialVersionUID = 1L; > > > > > > > > > > @Column(name = "changedate" ) > > > > > @Temporal(DATE) > > > > > private Date changeDate; > > > > > > > > > > @Column(name = "changetime") > > > > > @Temporal(TIME) > > > > > private Time changeTime; > > > > > > > > > > @Column(name = "changeuser") > > > > > private String changeUser; > > > > > > > > > > > > > > > When I try to grab an object with these embedded values I get the > > > error: > > > > > > > > > > > > > > > > > > > > java.lang.AssertionError: javax.ejb.EJBException: Unknown Container > > > > > Exception: java.rmi.RemoteException: Cannot read the response from > > the > > > > > server. The class for an object being returned is not located in > > this > > > > > system:; nested exception is: > > > > > java.lang.ClassNotFoundException: > > > > > org.apache.openjpa.util.java$sql$Date$proxy > > > > > > > > > > I have tried multiple ways with adding and removing @Temporal etc. > > Oh > > > > one > > > > > more thing, this is a MySQL database that I am trying to access. > > > Please > > > > > give me any help you can. Thanks. > > > > > > > > > > > > > > > Russell Collins > > > > > > > > > > > > > > > > > > > > > > > -- > > > > View this message in context: > > > > http://n2.nabble.com/Date-Problem-tp2943310p2945766.html > > > > Sent from the OpenJPA Users mailing list archive at Nabble.com. > > > > > > > > > > > > > >