Well with the property you provided I event cant load the persistence
provider while getting an
org.apache.openjpa.persistence.ArgumentException: The configuration
disallows runtime optimizations, but the following listed types were
not enhanced at build time or at class load time with a javaagent: ...
2008/1/1, Pinaki Poddar <[EMAIL PROTECTED]>:
>
> Looks like enhancement of entity classes are taking place at runtime. Will it
> be possible to verify if the behavior differs for build-time enhancement?
>
> Runtime enhancement can be switched off with
> <property name="openjpa.RuntimeUnenhancedClasses" value="unsupported"/>
>
>
> Stefan Handschuh wrote:
> >
> > Assume there is a class MyObject with an java.lang.Integer constructor
> > and a method "public java.lang.Integer getCode()".
> > Also there is a second class, which will be persistet an which contains a
> > field
> >
> > @Persistent
> > @Externalizer("getCode")
> > private MyObject myObject;
> >
> > If I try to persist a instance of this second class, the following error
> > occurs:
> >
> > Caused by: java.lang.ClassCastException: some.package.MyObject cannot
> > be cast to java.lang.Integer
> > at
> > org.apache.openjpa.enhance.ReflectingPersistenceCapable.pcProvideField(ReflectingPersistenceCapable.java:98)
> > at
> > org.apache.openjpa.kernel.StateManagerImpl.provideField(StateManagerImpl.java:2959)
> > at
> > org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2774)
> > at
> > org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:39)
> > at
> > org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:940)
> > at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1892)
> > at
> > org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
> > at
> > org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
> > ... 38 more
> >
> >
> > The same is reproducable with the code of the documentation (types:
> > URL, Class) concerning externalizers.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/%40Externalizer-in-1.0.1-does-not-work-on-persist-tp14567517p14568581.html
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>
>