openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <kwsut...@gmail.com>
Subject Re: Date Problem
Date Wed, 20 May 2009 14:49:09 GMT
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.dick@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 <mnrz57@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.
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message