isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Haywood <...@haywood-associates.co.uk>
Subject Re: Unable to re-create a view model
Date Mon, 09 Feb 2015 14:20:44 GMT
Hi Martin,

I saw a commit from you on JdoObjectIdSerializer following on from this
mail, so did you sort out the issue (or do I need to take a look tonight?)

Cheers
Dan


On 9 February 2015 at 08:17, Martin Grigorov <mgrigorov@apache.org> wrote:

> Hi,
>
> What could be the reason a ViewModel cannot be recreated with the exception
> below ?
> Looking
> at
> org.apache.isis.objectstore.jdo.datanucleus.persistence.spi.JdoObjectIdSerializer#toJdoObjectId()
> it tries to find '_' separator and use the string before it to decide what
> class to load (byte, int, UUID, ...).
>
> In my case the ViewModel extends from an abstract ViewModel. The parent one
> is annotated with @ViewModel and the child one with @DomainObject(nature =
> Nature.VIEW_MODEL).
> I've tried different combinations with the annotations but it always leads
> to this exception.
>
> Caused by:
> org.apache.isis.core.runtime.persistence.PojoRecreationException: Could not
> recreate pojo for oid oid
>
> KIVM:PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPG1lbWVudG8-PGtpdC5ib29rbWFyaz5LSVRfOkxfMTwva2l0LmJvb2ttYXJrPjxpbnB1dEVsZW1lbnQuYm9va21hcms-SU5IRVJJVEVEX0NPTkRJVElPTjpMXzE0MzwvaW5wdXRFbGVtZW50LmJvb2ttYXJrPjwvbWVtZW50bz4=
> at
>
> org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:320)
> at
>
> org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:305)
> at
>
> org.apache.isis.core.runtime.persistence.container.DomainObjectContainerResolve.adapterFor(DomainObjectContainerResolve.java:104)
> at
>
> org.apache.isis.core.runtime.persistence.container.DomainObjectContainerResolve.lookup(DomainObjectContainerResolve.java:55)
> at
>
> org.apache.isis.core.runtime.persistence.internal.RuntimeContextFromSession$7.lookup(RuntimeContextFromSession.java:211)
> at
>
> org.apache.isis.core.metamodel.services.bookmarks.BookmarkServiceDefault.lookup(BookmarkServiceDefault.java:59)
> at
>
> org.apache.isis.core.metamodel.facets.object.recreatable.RecreatableObjectFacetDeclarativeAbstract.initialize(RecreatableObjectFacetDeclarativeAbstract.java:89)
> at
>
> org.apache.isis.core.runtime.persistence.adaptermanager.PojoRecreatorDefault.recreatePojo(PojoRecreatorDefault.java:49)
> at
>
> org.apache.isis.core.runtime.persistence.adaptermanager.PojoRecreatorForDataNucleus.recreatePojo(PojoRecreatorForDataNucleus.java:34)
> at
>
> org.apache.isis.core.runtime.persistence.adaptermanager.PojoRecreatorUnified.recreatePojo(PojoRecreatorUnified.java:38)
> at
>
> org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:317)
> ... 54 more
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
> range: -1
> at java.lang.String.substring(String.java:1958)
> at
>
> org.apache.isis.objectstore.jdo.datanucleus.persistence.spi.JdoObjectIdSerializer.toJdoObjectId(JdoObjectIdSerializer.java:112)
> at
>
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusObjectStore.loadPojo(DataNucleusObjectStore.java:410)
> at
>
> org.apache.isis.core.runtime.persistence.adaptermanager.PojoRecreatorForDataNucleus.recreatePojo(PojoRecreatorForDataNucleus.java:36)
> at
>
> org.apache.isis.core.runtime.persistence.adaptermanager.PojoRecreatorUnified.recreatePojo(PojoRecreatorUnified.java:38)
> at
>
> org.apache.isis.core.runtime.persistence.adaptermanager.AdapterManagerDefault.adapterFor(AdapterManagerDefault.java:317)
> ... 64 more
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>

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