You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Robert r. Sanders" <ro...@ipov.net> on 2004/07/19 16:47:20 UTC
OTM makePersistent Error.
Hi,
I've been following OJB for sometime now. I recently decided to
switch a small web-app from using the PersistanceBroker to using OTM (I
also updated from RC 6 to 1.0 final). After reading through the OTM
tutorial, I changed my code to use OTM; however I get the following
error when attempting to store new Objects. Is there some setting that
I need to change or something?
org.apache.ojb.otm.copy.ObjectCopyException:
java.io.NotSerializableException: net.ipov.timesheet.TimeEntry
at org.apache.ojb.otm.copy.SerializeObjectCopyStrategy.copy(Unknown
Source)
at
org.apache.ojb.otm.copy.ReflectiveObjectCopyStrategy.handleObjectWithNoArgsConstructor(Unknown
Source)
at
org.apache.ojb.otm.copy.ReflectiveObjectCopyStrategy.clone(Unknown Source)
at org.apache.ojb.otm.copy.ReflectiveObjectCopyStrategy.copy(Unknown
Source)
at org.apache.ojb.otm.copy.MetadataObjectCopyStrategy.clone(Unknown
Source)
at org.apache.ojb.otm.copy.MetadataObjectCopyStrategy.clone(Unknown
Source)
at org.apache.ojb.otm.copy.MetadataObjectCopyStrategy.copy(Unknown
Source)
at
org.apache.ojb.otm.core.ConcreteEditingContext.insertInternal(Unknown
Source)
at org.apache.ojb.otm.core.ConcreteEditingContext.insert(Unknown Source)
at org.apache.ojb.otm.core.BaseConnection.makePersistent(Unknown Source)
--
Robert r. Sanders
Chief Technologist
iPOV
www.ipov.net
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: OTM makePersistent Error.
Posted by Brian McCallister <mc...@forthillcompany.com>.
Yeah, I ran into this one a few times myself.
The OTM will attempt to shortcut some copying when it hits something it
doesn't know how to copy by serializing and deserializing it. I don't
much like this behavior, and in the end led to us not using the OTM for
a project in the end.
Unfortunately I cannot recall exactly when it was doing this, but it
became a bear to work around for me as well. I will dig back into when
it was happening and try to find our workaround. The right answer is to
fix the OTM, but that is a much more complex task at the moment =/
-Brian
On Jul 19, 2004, at 10:47 AM, Robert r. Sanders wrote:
> Hi,
> I've been following OJB for sometime now. I recently decided to
> switch a small web-app from using the PersistanceBroker to using OTM
> (I also updated from RC 6 to 1.0 final). After reading through the
> OTM tutorial, I changed my code to use OTM; however I get the
> following error when attempting to store new Objects. Is there some
> setting that I need to change or something?
> org.apache.ojb.otm.copy.ObjectCopyException:
> java.io.NotSerializableException: net.ipov.timesheet.TimeEntry
> at org.apache.ojb.otm.copy.SerializeObjectCopyStrategy.copy(Unknown
> Source)
> at
> org.apache.ojb.otm.copy.ReflectiveObjectCopyStrategy.handleObjectWithNo
> ArgsConstructor(Unknown Source)
> at
> org.apache.ojb.otm.copy.ReflectiveObjectCopyStrategy.clone(Unknown
> Source)
> at
> org.apache.ojb.otm.copy.ReflectiveObjectCopyStrategy.copy(Unknown
> Source)
> at org.apache.ojb.otm.copy.MetadataObjectCopyStrategy.clone(Unknown
> Source)
> at org.apache.ojb.otm.copy.MetadataObjectCopyStrategy.clone(Unknown
> Source)
> at org.apache.ojb.otm.copy.MetadataObjectCopyStrategy.copy(Unknown
> Source)
> at
> org.apache.ojb.otm.core.ConcreteEditingContext.insertInternal(Unknown
> Source)
> at org.apache.ojb.otm.core.ConcreteEditingContext.insert(Unknown
> Source)
> at org.apache.ojb.otm.core.BaseConnection.makePersistent(Unknown
> Source)
>
> --
> Robert r. Sanders
> Chief Technologist
> iPOV
> www.ipov.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org