You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Chuangyu <zh...@gmail.com> on 2016/02/01 12:44:52 UTC

Re: why a GET method would store value to database?

Hi, Dan,

I replay the error with simpleapp.

There is one new class called IdEntity, and modify SimpleObject to extends
IdEntity.

public class IdEntity {
protected String id;
@javax.jdo.annotations.Persistent(primaryKey="true",valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
@javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
@Property(hidden=Where.ANYWHERE)
public String getId(){
return this.id;
}
public void setId(String id){
this.id=id;
}
private Long createdAt;
@Property(hidden=Where.EVERYWHERE)
@javax.jdo.annotations.Column(name="created_at",allowsNull="true")
public Long getCreatedAt(){
return this.createdAt;
}
public void setCreatedAt(Long time){
this.createdAt=time;
}
private Long updatedAt;
@Property(hidden=Where.EVERYWHERE)
@javax.jdo.annotations.Column(name="updated_at",allowsNull="true")
public Long getUpdatedAt(){
return this.updatedAt;
}
public void setUpdatedAt(Long time){
this.updatedAt=time;
}

public void persisting(){
this.createdAt=clockService.nowAsMillis();
}
@javax.inject.Inject
protected ClockService clockService;
}


@javax.jdo.annotations.PersistenceCapable(
        table = "SimpleObject",
        identityType=IdentityType.APPLICATION
)
//@javax.jdo.annotations.DatastoreIdentity(
//        strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY,
//         column="id")
//@javax.jdo.annotations.Version(
//        strategy=VersionStrategy.VERSION_NUMBER,
//        strategy= VersionStrategy.DATE_TIME,
//        column="version")
@javax.jdo.annotations.Queries({
        @javax.jdo.annotations.Query(
                name = "find", language = "JDOQL",
                value = "SELECT "
                        + "FROM domainapp.dom.simple.SimpleObject "),
        @javax.jdo.annotations.Query(
                name = "findByName", language = "JDOQL",
                value = "SELECT "
                        + "FROM domainapp.dom.simple.SimpleObject "
                        + "WHERE name.indexOf(:name) >= 0 ")
})
@javax.jdo.annotations.Unique(name="SimpleObject_name_UNQ", members =
{"name"})
@DomainObject
@DomainObjectLayout(
        bookmarking = BookmarkPolicy.AS_ROOT
)
public class SimpleObject extends IdEntity implements
Comparable<SimpleObject> {

    public static final int NAME_LENGTH = 40;


    public TranslatableString title() {
        return TranslatableString.tr("Object: {name}", "name", getName());
    }

    public static class NameDomainEvent extends
PropertyDomainEvent<SimpleObject,String> {}
    @javax.jdo.annotations.Column(
            allowsNull="false",
            length = NAME_LENGTH
    )
    @Property(
            editing = Editing.DISABLED
    )
    @PropertyLayout(
            namedEscaped = false
    )
    private String name;
    public String getName() {
        return name;
    }
    public void setName(final String name) {
        this.name = name;
    }



    public static class UpdateNameDomainEvent extends
ActionDomainEvent<SimpleObject> {}
    @Action(
            domainEvent = UpdateNameDomainEvent.class,
            semantics = SemanticsOf.IDEMPOTENT
    )
    public SimpleObject updateName(
            @Parameter(maxLength = NAME_LENGTH)
            @ParameterLayout(named = "New name")
            final String name) {
        setName(name);
        return this;
    }
    public String default0UpdateName() {
        return getName();
    }
    public TranslatableString validateUpdateName(final String name) {
        return name.contains("!")? TranslatableString.tr("Exclamation mark
is not allowed"): null;
    }



    public static class DeleteDomainEvent extends
ActionDomainEvent<SimpleObject> {}
    @Action(
            domainEvent = DeleteDomainEvent.class,
            semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE
    )
    public void delete() {
        container.removeIfNotAlready(this);
    }


    /**
     * version (derived property)
     */
    public Integer getVersionSequence() {
        return (Integer) JDOHelper.getVersion(this);
    }


    @Override
    public int compareTo(final SimpleObject other) {
        return ObjectContracts.compare(this, other, "name");
    }


    @javax.inject.Inject
    @SuppressWarnings("unused")
    private DomainObjectContainer container;

}

The error message is same as "Attempt to store value...".

Regards,
James

2016-01-25 19:18 GMT+08:00 Dan Haywood <da...@haywood-associates.co.uk>:

> As Martin says, the DN error is perhaps a bit misleading ... I believe the
> "store" action here is DN repopulating the pojo with data from the
> database, rather than the other way around.
>
> In Isis the JdoObjectIdSerializer class [1] is responsible for converting
> between the Isis RootOid and the DN ObjectId; the format "
> 4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device" is a
> valid value for the OID,
>
> Could you provide a test example based on simpleapp that demonstrates the
> problem?  It might be to do with the particular annotations/mappings that
> you have on your Device class.
>
> Thanks
> Dan
>
>
>
> [1]
>
> https://github.com/apache/isis/blob/rel/isis-1.11.1/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializer.java
>
> On 25 January 2016 at 08:04, Martin Grigorov <mg...@apache.org> wrote:
>
> > Hi,
> >
> > I believe there are two issues here:
> >
> > 1) Isis doesn't extract the primary key
> (4028dd814d2213d8014d2213d8610000)
> > from "4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device"
> > before passing it to DataNucleus
> > 2) DataNucleus uses misleading exception message. The method call is
> > #getObjectById().
> > I guess it uses something like JDOQL with template object, e.g.
> > Device device = new Device();
> >
> >
> device.setId("4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device");
> >  // 1
> > SELECT * FROM Device dev WHERE dev.getId() = device.getId();
> >
> > and it fails at [1].
> >
> > I have no experience with DataNucleus so this is just a guess. And the
> > given JDOQL above is most probably very wrong, but you get the idea.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Mon, Jan 25, 2016 at 2:39 AM, Chuangyu <zh...@gmail.com>
> wrote:
> >
> > > Hi,
> > >
> > > I met an error when try a GET method with Swagger UI.
> > >
> > > The url is below:
> > >
> > >
> > >
> >
> http://localhost:8080/restful/objects/tm.dom.modules.assets.Device/4028dd814d2213d8014d2213d8610000
> > >
> > >
> > > "4028dd814d2213d8014d2213d8610000" is a uuid string which length is 32.
> > >
> > >  curl command as below:
> > >
> > > curl -X GET --header "Accept:
> > > application/json;profile=urn:org.apache.isis/v1" --header
> > > "Authorization: Basic c3lzdGVtLWFkbWluOmdvb2dmcmllbmc="
> > > "
> > >
> >
> http://localhost:8080/restful/objects/tm.dom.modules.assets.Device/4028dd814d2213d8014d2213d8610000
> > > "
> > >
> > >
> > > error message sa below:
> > >
> > > { "className": "javax.jdo.JDOFatalUserException", "message": "Attempt
> to
> > > store value
> > > \"4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device\"
> in
> > > column \"id\" that has maximum length of 32. Please correct your
> data!",
> > "
> > > stackTrace": [
> > >
> > >
> >
> "org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:616)",
> > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1728)",
> > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1741)",
> > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadPojo(PersistenceSession.java:885)",
> > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:866)",
> > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:859)",
> > >
> > >
> >
> "org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)",
> > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadObjectInTransaction(PersistenceSession.java:858)",
> > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.adapterForAny(PersistenceSession.java:1507)",
> > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapter(OidUtils.java:60)",
> > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapterElseNull(OidUtils.java:40)",
> > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseNull(ResourceAbstract.java:151)",
> > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseThrowNotFound(ResourceAbstract.java:141)",
> > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside.object(DomainObjectResourceServerside.java:123)",
> > > "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > >
> > >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
> > >
> > >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> > > "java.lang.reflect.Method.invoke(Method.java:497)",
> > >
> > >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)",
> > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)",
> > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)",
> > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)",
> > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)",
> > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)",
> > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)",
> > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)",
> > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)",
> > > "javax.servlet.http.HttpServlet.service(HttpServlet.java:790)",
> > >
> "org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)",
> > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)",
> > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects.doFilter(IsisTransactionFilterForRestfulObjects.java:46)",
> > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > >
> > >
> >
> "org.apache.isis.core.webapp.IsisSessionFilter.doFilter(IsisSessionFilter.java:338)",
> > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > >
> > >
> >
> "org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)",
> > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)",
> > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)",
> > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)",
> > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)",
> > >
> > >
> >
> "org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)",
> > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)",
> > >
> > >
> >
> "org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)",
> > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)",
> > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
> > >
> > >
> >
> "org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)",
> > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)",
> > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)",
> > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)",
> > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)",
> > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)",
> > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
> > >
> > >
> >
> "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)",
> > > "org.eclipse.jetty.server.Server.handle(Server.java:499)",
> > > "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)",
> > >
> > >
> >
> "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)",
> > >
> > >
> >
> "org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)",
> > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)",
> > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)",
> > > "java.lang.Thread.run(Thread.java:745)" ], "causedBy": { "className":
> > > "org.datanucleus.exceptions.NucleusUserException", "message": "Attempt
> to
> > > store value
> > > \"4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device\"
> in
> > > column \"id\" that has maximum length of 32. Please correct your
> data!",
> > "
> > > stackTrace": [
> > >
> > >
> >
> "org.datanucleus.store.rdbms.mapping.datastore.CharRDBMSMapping.setString(CharRDBMSMapping.java:254)",
> > >
> > >
> >
> "org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping.setString(SingleFieldMapping.java:180)",
> > >
> > >
> >
> "org.datanucleus.store.rdbms.fieldmanager.ParameterSetter.storeStringField(ParameterSetter.java:158)",
> > >
> > >
> >
> "org.datanucleus.state.AbstractStateManager.providedStringField(AbstractStateManager.java:1448)",
> > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.providedStringField(StateManagerImpl.java:120)",
> > > "tm.dom.modules.IdEntity.dnProvideField(IdEntity.java)",
> > > "tm.dom.modules.assets.Device.dnProvideField(Device.java)",
> > > "tm.dom.modules.IdEntity.dnProvideFields(IdEntity.java)",
> > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.provideFields(StateManagerImpl.java:1170)",
> > >
> > >
> >
> "org.datanucleus.store.rdbms.request.FetchRequest.execute(FetchRequest.java:333)",
> > >
> > >
> >
> "org.datanucleus.store.rdbms.RDBMSPersistenceHandler.fetchObject(RDBMSPersistenceHandler.java:319)",
> > >
> > >
> >
> "org.datanucleus.state.AbstractStateManager.loadFieldsFromDatastore(AbstractStateManager.java:1147)",
> > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.validate(StateManagerImpl.java:4289)",
> > >
> > >
> >
> "org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3608)",
> > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1723)",
> > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1741)",
> > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadPojo(PersistenceSession.java:885)",
> > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:866)",
> > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:859)",
> > >
> > >
> >
> "org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)",
> > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadObjectInTransaction(PersistenceSession.java:858)",
> > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.adapterForAny(PersistenceSession.java:1507)",
> > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapter(OidUtils.java:60)",
> > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapterElseNull(OidUtils.java:40)",
> > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseNull(ResourceAbstract.java:151)",
> > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseThrowNotFound(ResourceAbstract.java:141)",
> > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside.object(DomainObjectResourceServerside.java:123)",
> > > "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > >
> > >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
> > >
> > >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> > > "java.lang.reflect.Method.invoke(Method.java:497)",
> > >
> > >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)",
> > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)",
> > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)",
> > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)",
> > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)",
> > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)",
> > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)",
> > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)",
> > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)",
> > > "javax.servlet.http.HttpServlet.service(HttpServlet.java:790)",
> > >
> "org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)",
> > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)",
> > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects.doFilter(IsisTransactionFilterForRestfulObjects.java:46)",
> > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > >
> > >
> >
> "org.apache.isis.core.webapp.IsisSessionFilter.doFilter(IsisSessionFilter.java:338)",
> > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > >
> > >
> >
> "org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)",
> > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)",
> > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)",
> > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)",
> > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)",
> > >
> > >
> >
> "org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)",
> > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)",
> > >
> > >
> >
> "org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)",
> > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)",
> > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
> > >
> > >
> >
> "org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)",
> > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)",
> > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)",
> > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)",
> > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)",
> > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)",
> > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
> > >
> > >
> >
> "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)",
> > > "org.eclipse.jetty.server.Server.handle(Server.java:499)",
> > > "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)",
> > >
> > >
> >
> "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)",
> > >
> > >
> >
> "org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)",
> > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)",
> > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)",
> > > "java.lang.Thread.run(Thread.java:745)" ], "causedBy": null } }
> > >
> > > I don't know why a GET method lead to a store action ?
> > >
> >
>

Re: why a GET method would store value to database?

Posted by Chuangyu <zh...@gmail.com>.
OK, I will try to do it.


2016-02-18 15:48 GMT+08:00 Dan Haywood <da...@haywood-associates.co.uk>:

> How about a pull request, James?  Process documented here [1] and details
> on the Asciidoc here [2].  Suggest add to the hints-n-tips section of the
> RO viewer's guide [3]; the actual file to change would be [4]
>
> Cheers
> Dan
>
>
> [1] http://isis.apache.org/guides/cgcon.html#_cgcon_contributing
> [2] http://isis.apache.org/guides/cgcon.html#_cgcon_asciidoc
> [3] http://isis.apache.org/guides/ugvro.html#_ugvro_hints-and-tips
> [4]
>
> https://github.com/apache/isis/blob/master/adocs/documentation/src/main/asciidoc/guides/_ugvro_hints-and-tips.adoc
>
>
> On 18 February 2016 at 02:31, Chuangyu <zh...@gmail.com> wrote:
>
> > Hi, Dan,
> >
> > Thank you for your work.
> >
> > You are right , I call GET method without prefix "s_" originally. Now it
> > works fine with "s_" + id.
> >
> > But this information doesn't documented, would you please put this into
> > document ?
> >
> > Thanks again,
> > James.
> >
> > 2016-02-17 16:41 GMT+08:00 Dan Haywood <da...@haywood-associates.co.uk>:
> >
> > > Hi James,
> > >
> > > OK, so I took a look at this yesterday; thanks for the example code.  I
> > > don't believe there's an issue, but I can see how one might make a
> > mistake
> > > to get the behaviour you are seeing.
> > >
> > > The IdEntity you introduced (which SimpleObject subclases) is defined
> to
> > > use application-defined identity, with an IdGenerator strategy of
> > UUIDHEX:
> > >
> > > @javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.
> > > APPLICATION)
> > > @javax.jdo.annotations.Inheritance(strategy=javax.jdo.annotations.
> > > InheritanceStrategy.SUBCLASS_TABLE)
> > > public class IdEntity {
> > >
> > >    @javax.jdo.annotations.Persistent(primaryKey="true",
> > > valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
> > >    @javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
> > >    protected String id;
> > >
> > > }
> > >
> > > So, in the database, the SimpleObject.id column will have a value
> > something
> > > like "1234567890abcdef1234567890abcdef"
> > >
> > > If you invoke "SimpleObjects/listAll/invoke" in the swagger-ui, then
> > you'll
> > > see links for the SimpleObject objects, in the form:
> > >
> > >
> > >
> > >
> >
> http://localhost:8080/objects/simple.SimpleObject:s_1234567890abcdef1234567890abcdef
> > > .
> > >
> > > What's important to note here is that hex id has a "s_" prefix.  This
> is
> > > Isis adding some type encoding so that it knows how to correctly
> recreate
> > > the identifier for the object.
> > >
> > > If in the Swagger UI you use the "s_1234567890abcdef1234567890abcdef"
> as
> > > the Id when you GET the SimpleObject instance, it all works fine.
> > >
> > > If, however, you miss out the "s_" prefix (easy to do), then you'll get
> > the
> > > exception you reported.
> > >
> > > Hope that makes sense?
> > >
> > > Thx
> > > Dan
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On 15 February 2016 at 02:28, Chuangyu <zh...@gmail.com> wrote:
> > >
> > > > Hi, Dan,
> > > >
> > > > Did you found the reason of issue ?
> > > >
> > > > Thanks,
> > > >
> > > > James
> > > >
> > > > ps: update class IdEntity
> > > >
> > > >
> > > >
> > >
> >
> @javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.APPLICATION)
> > > >
> > > >
> > >
> >
> @javax.jdo.annotations.Inheritance(strategy=javax.jdo.annotations.InheritanceStrategy.SUBCLASS_TABLE)
> > > > @javax.jdo.annotations.Version(
> > > >         strategy=VersionStrategy.VERSION_NUMBER,
> > > >         column="version")
> > > > public class IdEntity {
> > > > protected String id;
> > > >
> > > >
> > >
> >
> @javax.jdo.annotations.Persistent(primaryKey="true",valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
> > > > @javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
> > > > @Property(hidden=Where.ANYWHERE)
> > > > public String getId(){
> > > > return this.id;
> > > > }
> > > > public void setId(String id){
> > > > this.id=id;
> > > > }
> > > > private Long createdAt;
> > > > @Property(hidden=Where.EVERYWHERE)
> > > > @javax.jdo.annotations.Column(name="created_at",allowsNull="true")
> > > > public Long getCreatedAt(){
> > > > return this.createdAt;
> > > > }
> > > > public void setCreatedAt(Long time){
> > > > this.createdAt=time;
> > > > }
> > > > private Long updatedAt;
> > > > @Property(hidden=Where.EVERYWHERE)
> > > > @javax.jdo.annotations.Column(name="updated_at",allowsNull="true")
> > > > public Long getUpdatedAt(){
> > > > return this.updatedAt;
> > > > }
> > > > public void setUpdatedAt(Long time){
> > > > this.updatedAt=time;
> > > > }
> > > >
> > > > public void persisting(){
> > > > this.createdAt=clockService.nowAsMillis();
> > > > }
> > > > @javax.inject.Inject
> > > > protected ClockService clockService;
> > > > }
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > 2016-02-01 20:04 GMT+08:00 Dan Haywood <dan@haywood-associates.co.uk
> >:
> > > >
> > > > > Ok, James, thanks for taking the time to look into.
> > > > > Will take a look later this week,try to get to the bottom of it .
> > > > > Thx, Dan
> > > > > On 1 Feb 2016 12:45, "Chuangyu" <zh...@gmail.com> wrote:
> > > > >
> > > > > > Hi, Dan,
> > > > > >
> > > > > > I replay the error with simpleapp.
> > > > > >
> > > > > > There is one new class called IdEntity, and modify SimpleObject
> to
> > > > > extends
> > > > > > IdEntity.
> > > > > >
> > > > > > public class IdEntity {
> > > > > > protected String id;
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> @javax.jdo.annotations.Persistent(primaryKey="true",valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
> > > > > > @javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
> > > > > > @Property(hidden=Where.ANYWHERE)
> > > > > > public String getId(){
> > > > > > return this.id;
> > > > > > }
> > > > > > public void setId(String id){
> > > > > > this.id=id;
> > > > > > }
> > > > > > private Long createdAt;
> > > > > > @Property(hidden=Where.EVERYWHERE)
> > > > > >
> @javax.jdo.annotations.Column(name="created_at",allowsNull="true")
> > > > > > public Long getCreatedAt(){
> > > > > > return this.createdAt;
> > > > > > }
> > > > > > public void setCreatedAt(Long time){
> > > > > > this.createdAt=time;
> > > > > > }
> > > > > > private Long updatedAt;
> > > > > > @Property(hidden=Where.EVERYWHERE)
> > > > > >
> @javax.jdo.annotations.Column(name="updated_at",allowsNull="true")
> > > > > > public Long getUpdatedAt(){
> > > > > > return this.updatedAt;
> > > > > > }
> > > > > > public void setUpdatedAt(Long time){
> > > > > > this.updatedAt=time;
> > > > > > }
> > > > > >
> > > > > > public void persisting(){
> > > > > > this.createdAt=clockService.nowAsMillis();
> > > > > > }
> > > > > > @javax.inject.Inject
> > > > > > protected ClockService clockService;
> > > > > > }
> > > > > >
> > > > > >
> > > > > > @javax.jdo.annotations.PersistenceCapable(
> > > > > >         table = "SimpleObject",
> > > > > >         identityType=IdentityType.APPLICATION
> > > > > > )
> > > > > > //@javax.jdo.annotations.DatastoreIdentity(
> > > > > > //
> > > strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY,
> > > > > > //         column="id")
> > > > > > //@javax.jdo.annotations.Version(
> > > > > > //        strategy=VersionStrategy.VERSION_NUMBER,
> > > > > > //        strategy= VersionStrategy.DATE_TIME,
> > > > > > //        column="version")
> > > > > > @javax.jdo.annotations.Queries({
> > > > > >         @javax.jdo.annotations.Query(
> > > > > >                 name = "find", language = "JDOQL",
> > > > > >                 value = "SELECT "
> > > > > >                         + "FROM domainapp.dom.simple.SimpleObject
> > "),
> > > > > >         @javax.jdo.annotations.Query(
> > > > > >                 name = "findByName", language = "JDOQL",
> > > > > >                 value = "SELECT "
> > > > > >                         + "FROM
> domainapp.dom.simple.SimpleObject "
> > > > > >                         + "WHERE name.indexOf(:name) >= 0 ")
> > > > > > })
> > > > > > @javax.jdo.annotations.Unique(name="SimpleObject_name_UNQ",
> > members =
> > > > > > {"name"})
> > > > > > @DomainObject
> > > > > > @DomainObjectLayout(
> > > > > >         bookmarking = BookmarkPolicy.AS_ROOT
> > > > > > )
> > > > > > public class SimpleObject extends IdEntity implements
> > > > > > Comparable<SimpleObject> {
> > > > > >
> > > > > >     public static final int NAME_LENGTH = 40;
> > > > > >
> > > > > >
> > > > > >     public TranslatableString title() {
> > > > > >         return TranslatableString.tr("Object: {name}", "name",
> > > > > getName());
> > > > > >     }
> > > > > >
> > > > > >     public static class NameDomainEvent extends
> > > > > > PropertyDomainEvent<SimpleObject,String> {}
> > > > > >     @javax.jdo.annotations.Column(
> > > > > >             allowsNull="false",
> > > > > >             length = NAME_LENGTH
> > > > > >     )
> > > > > >     @Property(
> > > > > >             editing = Editing.DISABLED
> > > > > >     )
> > > > > >     @PropertyLayout(
> > > > > >             namedEscaped = false
> > > > > >     )
> > > > > >     private String name;
> > > > > >     public String getName() {
> > > > > >         return name;
> > > > > >     }
> > > > > >     public void setName(final String name) {
> > > > > >         this.name = name;
> > > > > >     }
> > > > > >
> > > > > >
> > > > > >
> > > > > >     public static class UpdateNameDomainEvent extends
> > > > > > ActionDomainEvent<SimpleObject> {}
> > > > > >     @Action(
> > > > > >             domainEvent = UpdateNameDomainEvent.class,
> > > > > >             semantics = SemanticsOf.IDEMPOTENT
> > > > > >     )
> > > > > >     public SimpleObject updateName(
> > > > > >             @Parameter(maxLength = NAME_LENGTH)
> > > > > >             @ParameterLayout(named = "New name")
> > > > > >             final String name) {
> > > > > >         setName(name);
> > > > > >         return this;
> > > > > >     }
> > > > > >     public String default0UpdateName() {
> > > > > >         return getName();
> > > > > >     }
> > > > > >     public TranslatableString validateUpdateName(final String
> > name) {
> > > > > >         return name.contains("!")?
> > TranslatableString.tr("Exclamation
> > > > > mark
> > > > > > is not allowed"): null;
> > > > > >     }
> > > > > >
> > > > > >
> > > > > >
> > > > > >     public static class DeleteDomainEvent extends
> > > > > > ActionDomainEvent<SimpleObject> {}
> > > > > >     @Action(
> > > > > >             domainEvent = DeleteDomainEvent.class,
> > > > > >             semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE
> > > > > >     )
> > > > > >     public void delete() {
> > > > > >         container.removeIfNotAlready(this);
> > > > > >     }
> > > > > >
> > > > > >
> > > > > >     /**
> > > > > >      * version (derived property)
> > > > > >      */
> > > > > >     public Integer getVersionSequence() {
> > > > > >         return (Integer) JDOHelper.getVersion(this);
> > > > > >     }
> > > > > >
> > > > > >
> > > > > >     @Override
> > > > > >     public int compareTo(final SimpleObject other) {
> > > > > >         return ObjectContracts.compare(this, other, "name");
> > > > > >     }
> > > > > >
> > > > > >
> > > > > >     @javax.inject.Inject
> > > > > >     @SuppressWarnings("unused")
> > > > > >     private DomainObjectContainer container;
> > > > > >
> > > > > > }
> > > > > >
> > > > > > The error message is same as "Attempt to store value...".
> > > > > >
> > > > > > Regards,
> > > > > > James
> > > > > >
> > > > > > 2016-01-25 19:18 GMT+08:00 Dan Haywood <
> > dan@haywood-associates.co.uk
> > > >:
> > > > > >
> > > > > > > As Martin says, the DN error is perhaps a bit misleading ... I
> > > > believe
> > > > > > the
> > > > > > > "store" action here is DN repopulating the pojo with data from
> > the
> > > > > > > database, rather than the other way around.
> > > > > > >
> > > > > > > In Isis the JdoObjectIdSerializer class [1] is responsible for
> > > > > converting
> > > > > > > between the Isis RootOid and the DN ObjectId; the format "
> > > > > > >
> > 4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device"
> > > > is a
> > > > > > > valid value for the OID,
> > > > > > >
> > > > > > > Could you provide a test example based on simpleapp that
> > > demonstrates
> > > > > the
> > > > > > > problem?  It might be to do with the particular
> > > annotations/mappings
> > > > > that
> > > > > > > you have on your Device class.
> > > > > > >
> > > > > > > Thanks
> > > > > > > Dan
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > [1]
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/apache/isis/blob/rel/isis-1.11.1/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializer.java
> > > > > > >
> > > > > > > On 25 January 2016 at 08:04, Martin Grigorov <
> > mgrigorov@apache.org
> > > >
> > > > > > wrote:
> > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I believe there are two issues here:
> > > > > > > >
> > > > > > > > 1) Isis doesn't extract the primary key
> > > > > > > (4028dd814d2213d8014d2213d8610000)
> > > > > > > > from
> > > > > >
> "4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device"
> > > > > > > > before passing it to DataNucleus
> > > > > > > > 2) DataNucleus uses misleading exception message. The method
> > call
> > > > is
> > > > > > > > #getObjectById().
> > > > > > > > I guess it uses something like JDOQL with template object,
> e.g.
> > > > > > > > Device device = new Device();
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> device.setId("4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device");
> > > > > > > >  // 1
> > > > > > > > SELECT * FROM Device dev WHERE dev.getId() = device.getId();
> > > > > > > >
> > > > > > > > and it fails at [1].
> > > > > > > >
> > > > > > > > I have no experience with DataNucleus so this is just a
> guess.
> > > And
> > > > > the
> > > > > > > > given JDOQL above is most probably very wrong, but you get
> the
> > > > idea.
> > > > > > > >
> > > > > > > > Martin Grigorov
> > > > > > > > Wicket Training and Consulting
> > > > > > > > https://twitter.com/mtgrigorov
> > > > > > > >
> > > > > > > > On Mon, Jan 25, 2016 at 2:39 AM, Chuangyu <
> > > zhu.chuangyu@gmail.com>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > I met an error when try a GET method with Swagger UI.
> > > > > > > > >
> > > > > > > > > The url is below:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://localhost:8080/restful/objects/tm.dom.modules.assets.Device/4028dd814d2213d8014d2213d8610000
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > "4028dd814d2213d8014d2213d8610000" is a uuid string which
> > > length
> > > > is
> > > > > > 32.
> > > > > > > > >
> > > > > > > > >  curl command as below:
> > > > > > > > >
> > > > > > > > > curl -X GET --header "Accept:
> > > > > > > > > application/json;profile=urn:org.apache.isis/v1" --header
> > > > > > > > > "Authorization: Basic c3lzdGVtLWFkbWluOmdvb2dmcmllbmc="
> > > > > > > > > "
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://localhost:8080/restful/objects/tm.dom.modules.assets.Device/4028dd814d2213d8014d2213d8610000
> > > > > > > > > "
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > error message sa below:
> > > > > > > > >
> > > > > > > > > { "className": "javax.jdo.JDOFatalUserException",
> "message":
> > > > > "Attempt
> > > > > > > to
> > > > > > > > > store value
> > > > > > > > >
> > > > >
> \"4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device\"
> > > > > > > in
> > > > > > > > > column \"id\" that has maximum length of 32. Please correct
> > > your
> > > > > > > data!",
> > > > > > > > "
> > > > > > > > > stackTrace": [
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:616)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1728)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1741)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadPojo(PersistenceSession.java:885)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:866)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:859)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadObjectInTransaction(PersistenceSession.java:858)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.adapterForAny(PersistenceSession.java:1507)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapter(OidUtils.java:60)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapterElseNull(OidUtils.java:40)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseNull(ResourceAbstract.java:151)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseThrowNotFound(ResourceAbstract.java:141)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside.object(DomainObjectResourceServerside.java:123)",
> > > > > > > > > "sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> > > > > > > > > "java.lang.reflect.Method.invoke(Method.java:497)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)",
> > > > > > > > >
> > "javax.servlet.http.HttpServlet.service(HttpServlet.java:790)",
> > > > > > > > >
> > > > > > >
> > > > >
> > >
> "org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects.doFilter(IsisTransactionFilterForRestfulObjects.java:46)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.IsisSessionFilter.doFilter(IsisSessionFilter.java:338)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)",
> > > > > > > > > "org.eclipse.jetty.server.Server.handle(Server.java:499)",
> > > > > > > > >
> > > > >
> "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)",
> > > > > > > > > "java.lang.Thread.run(Thread.java:745)" ], "causedBy": {
> > > > > "className":
> > > > > > > > > "org.datanucleus.exceptions.NucleusUserException",
> "message":
> > > > > > "Attempt
> > > > > > > to
> > > > > > > > > store value
> > > > > > > > >
> > > > >
> \"4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device\"
> > > > > > > in
> > > > > > > > > column \"id\" that has maximum length of 32. Please correct
> > > your
> > > > > > > data!",
> > > > > > > > "
> > > > > > > > > stackTrace": [
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.mapping.datastore.CharRDBMSMapping.setString(CharRDBMSMapping.java:254)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping.setString(SingleFieldMapping.java:180)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.fieldmanager.ParameterSetter.storeStringField(ParameterSetter.java:158)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.AbstractStateManager.providedStringField(AbstractStateManager.java:1448)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.providedStringField(StateManagerImpl.java:120)",
> > > > > > > > > "tm.dom.modules.IdEntity.dnProvideField(IdEntity.java)",
> > > > > > > > > "tm.dom.modules.assets.Device.dnProvideField(Device.java)",
> > > > > > > > > "tm.dom.modules.IdEntity.dnProvideFields(IdEntity.java)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.provideFields(StateManagerImpl.java:1170)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.request.FetchRequest.execute(FetchRequest.java:333)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.RDBMSPersistenceHandler.fetchObject(RDBMSPersistenceHandler.java:319)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.AbstractStateManager.loadFieldsFromDatastore(AbstractStateManager.java:1147)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.validate(StateManagerImpl.java:4289)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3608)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1723)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1741)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadPojo(PersistenceSession.java:885)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:866)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:859)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadObjectInTransaction(PersistenceSession.java:858)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.adapterForAny(PersistenceSession.java:1507)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapter(OidUtils.java:60)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapterElseNull(OidUtils.java:40)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseNull(ResourceAbstract.java:151)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseThrowNotFound(ResourceAbstract.java:141)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside.object(DomainObjectResourceServerside.java:123)",
> > > > > > > > > "sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> > > > > > > > > "java.lang.reflect.Method.invoke(Method.java:497)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)",
> > > > > > > > >
> > "javax.servlet.http.HttpServlet.service(HttpServlet.java:790)",
> > > > > > > > >
> > > > > > >
> > > > >
> > >
> "org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects.doFilter(IsisTransactionFilterForRestfulObjects.java:46)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.IsisSessionFilter.doFilter(IsisSessionFilter.java:338)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)",
> > > > > > > > > "org.eclipse.jetty.server.Server.handle(Server.java:499)",
> > > > > > > > >
> > > > >
> "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)",
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)",
> > > > > > > > > "java.lang.Thread.run(Thread.java:745)" ], "causedBy": null
> > } }
> > > > > > > > >
> > > > > > > > > I don't know why a GET method lead to a store action ?
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: why a GET method would store value to database?

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
How about a pull request, James?  Process documented here [1] and details
on the Asciidoc here [2].  Suggest add to the hints-n-tips section of the
RO viewer's guide [3]; the actual file to change would be [4]

Cheers
Dan


[1] http://isis.apache.org/guides/cgcon.html#_cgcon_contributing
[2] http://isis.apache.org/guides/cgcon.html#_cgcon_asciidoc
[3] http://isis.apache.org/guides/ugvro.html#_ugvro_hints-and-tips
[4]
https://github.com/apache/isis/blob/master/adocs/documentation/src/main/asciidoc/guides/_ugvro_hints-and-tips.adoc


On 18 February 2016 at 02:31, Chuangyu <zh...@gmail.com> wrote:

> Hi, Dan,
>
> Thank you for your work.
>
> You are right , I call GET method without prefix "s_" originally. Now it
> works fine with "s_" + id.
>
> But this information doesn't documented, would you please put this into
> document ?
>
> Thanks again,
> James.
>
> 2016-02-17 16:41 GMT+08:00 Dan Haywood <da...@haywood-associates.co.uk>:
>
> > Hi James,
> >
> > OK, so I took a look at this yesterday; thanks for the example code.  I
> > don't believe there's an issue, but I can see how one might make a
> mistake
> > to get the behaviour you are seeing.
> >
> > The IdEntity you introduced (which SimpleObject subclases) is defined to
> > use application-defined identity, with an IdGenerator strategy of
> UUIDHEX:
> >
> > @javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.
> > APPLICATION)
> > @javax.jdo.annotations.Inheritance(strategy=javax.jdo.annotations.
> > InheritanceStrategy.SUBCLASS_TABLE)
> > public class IdEntity {
> >
> >    @javax.jdo.annotations.Persistent(primaryKey="true",
> > valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
> >    @javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
> >    protected String id;
> >
> > }
> >
> > So, in the database, the SimpleObject.id column will have a value
> something
> > like "1234567890abcdef1234567890abcdef"
> >
> > If you invoke "SimpleObjects/listAll/invoke" in the swagger-ui, then
> you'll
> > see links for the SimpleObject objects, in the form:
> >
> >
> >
> >
> http://localhost:8080/objects/simple.SimpleObject:s_1234567890abcdef1234567890abcdef
> > .
> >
> > What's important to note here is that hex id has a "s_" prefix.  This is
> > Isis adding some type encoding so that it knows how to correctly recreate
> > the identifier for the object.
> >
> > If in the Swagger UI you use the "s_1234567890abcdef1234567890abcdef" as
> > the Id when you GET the SimpleObject instance, it all works fine.
> >
> > If, however, you miss out the "s_" prefix (easy to do), then you'll get
> the
> > exception you reported.
> >
> > Hope that makes sense?
> >
> > Thx
> > Dan
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On 15 February 2016 at 02:28, Chuangyu <zh...@gmail.com> wrote:
> >
> > > Hi, Dan,
> > >
> > > Did you found the reason of issue ?
> > >
> > > Thanks,
> > >
> > > James
> > >
> > > ps: update class IdEntity
> > >
> > >
> > >
> >
> @javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.APPLICATION)
> > >
> > >
> >
> @javax.jdo.annotations.Inheritance(strategy=javax.jdo.annotations.InheritanceStrategy.SUBCLASS_TABLE)
> > > @javax.jdo.annotations.Version(
> > >         strategy=VersionStrategy.VERSION_NUMBER,
> > >         column="version")
> > > public class IdEntity {
> > > protected String id;
> > >
> > >
> >
> @javax.jdo.annotations.Persistent(primaryKey="true",valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
> > > @javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
> > > @Property(hidden=Where.ANYWHERE)
> > > public String getId(){
> > > return this.id;
> > > }
> > > public void setId(String id){
> > > this.id=id;
> > > }
> > > private Long createdAt;
> > > @Property(hidden=Where.EVERYWHERE)
> > > @javax.jdo.annotations.Column(name="created_at",allowsNull="true")
> > > public Long getCreatedAt(){
> > > return this.createdAt;
> > > }
> > > public void setCreatedAt(Long time){
> > > this.createdAt=time;
> > > }
> > > private Long updatedAt;
> > > @Property(hidden=Where.EVERYWHERE)
> > > @javax.jdo.annotations.Column(name="updated_at",allowsNull="true")
> > > public Long getUpdatedAt(){
> > > return this.updatedAt;
> > > }
> > > public void setUpdatedAt(Long time){
> > > this.updatedAt=time;
> > > }
> > >
> > > public void persisting(){
> > > this.createdAt=clockService.nowAsMillis();
> > > }
> > > @javax.inject.Inject
> > > protected ClockService clockService;
> > > }
> > >
> > >
> > >
> > >
> > >
> > > 2016-02-01 20:04 GMT+08:00 Dan Haywood <da...@haywood-associates.co.uk>:
> > >
> > > > Ok, James, thanks for taking the time to look into.
> > > > Will take a look later this week,try to get to the bottom of it .
> > > > Thx, Dan
> > > > On 1 Feb 2016 12:45, "Chuangyu" <zh...@gmail.com> wrote:
> > > >
> > > > > Hi, Dan,
> > > > >
> > > > > I replay the error with simpleapp.
> > > > >
> > > > > There is one new class called IdEntity, and modify SimpleObject to
> > > > extends
> > > > > IdEntity.
> > > > >
> > > > > public class IdEntity {
> > > > > protected String id;
> > > > >
> > > > >
> > > >
> > >
> >
> @javax.jdo.annotations.Persistent(primaryKey="true",valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
> > > > > @javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
> > > > > @Property(hidden=Where.ANYWHERE)
> > > > > public String getId(){
> > > > > return this.id;
> > > > > }
> > > > > public void setId(String id){
> > > > > this.id=id;
> > > > > }
> > > > > private Long createdAt;
> > > > > @Property(hidden=Where.EVERYWHERE)
> > > > > @javax.jdo.annotations.Column(name="created_at",allowsNull="true")
> > > > > public Long getCreatedAt(){
> > > > > return this.createdAt;
> > > > > }
> > > > > public void setCreatedAt(Long time){
> > > > > this.createdAt=time;
> > > > > }
> > > > > private Long updatedAt;
> > > > > @Property(hidden=Where.EVERYWHERE)
> > > > > @javax.jdo.annotations.Column(name="updated_at",allowsNull="true")
> > > > > public Long getUpdatedAt(){
> > > > > return this.updatedAt;
> > > > > }
> > > > > public void setUpdatedAt(Long time){
> > > > > this.updatedAt=time;
> > > > > }
> > > > >
> > > > > public void persisting(){
> > > > > this.createdAt=clockService.nowAsMillis();
> > > > > }
> > > > > @javax.inject.Inject
> > > > > protected ClockService clockService;
> > > > > }
> > > > >
> > > > >
> > > > > @javax.jdo.annotations.PersistenceCapable(
> > > > >         table = "SimpleObject",
> > > > >         identityType=IdentityType.APPLICATION
> > > > > )
> > > > > //@javax.jdo.annotations.DatastoreIdentity(
> > > > > //
> > strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY,
> > > > > //         column="id")
> > > > > //@javax.jdo.annotations.Version(
> > > > > //        strategy=VersionStrategy.VERSION_NUMBER,
> > > > > //        strategy= VersionStrategy.DATE_TIME,
> > > > > //        column="version")
> > > > > @javax.jdo.annotations.Queries({
> > > > >         @javax.jdo.annotations.Query(
> > > > >                 name = "find", language = "JDOQL",
> > > > >                 value = "SELECT "
> > > > >                         + "FROM domainapp.dom.simple.SimpleObject
> "),
> > > > >         @javax.jdo.annotations.Query(
> > > > >                 name = "findByName", language = "JDOQL",
> > > > >                 value = "SELECT "
> > > > >                         + "FROM domainapp.dom.simple.SimpleObject "
> > > > >                         + "WHERE name.indexOf(:name) >= 0 ")
> > > > > })
> > > > > @javax.jdo.annotations.Unique(name="SimpleObject_name_UNQ",
> members =
> > > > > {"name"})
> > > > > @DomainObject
> > > > > @DomainObjectLayout(
> > > > >         bookmarking = BookmarkPolicy.AS_ROOT
> > > > > )
> > > > > public class SimpleObject extends IdEntity implements
> > > > > Comparable<SimpleObject> {
> > > > >
> > > > >     public static final int NAME_LENGTH = 40;
> > > > >
> > > > >
> > > > >     public TranslatableString title() {
> > > > >         return TranslatableString.tr("Object: {name}", "name",
> > > > getName());
> > > > >     }
> > > > >
> > > > >     public static class NameDomainEvent extends
> > > > > PropertyDomainEvent<SimpleObject,String> {}
> > > > >     @javax.jdo.annotations.Column(
> > > > >             allowsNull="false",
> > > > >             length = NAME_LENGTH
> > > > >     )
> > > > >     @Property(
> > > > >             editing = Editing.DISABLED
> > > > >     )
> > > > >     @PropertyLayout(
> > > > >             namedEscaped = false
> > > > >     )
> > > > >     private String name;
> > > > >     public String getName() {
> > > > >         return name;
> > > > >     }
> > > > >     public void setName(final String name) {
> > > > >         this.name = name;
> > > > >     }
> > > > >
> > > > >
> > > > >
> > > > >     public static class UpdateNameDomainEvent extends
> > > > > ActionDomainEvent<SimpleObject> {}
> > > > >     @Action(
> > > > >             domainEvent = UpdateNameDomainEvent.class,
> > > > >             semantics = SemanticsOf.IDEMPOTENT
> > > > >     )
> > > > >     public SimpleObject updateName(
> > > > >             @Parameter(maxLength = NAME_LENGTH)
> > > > >             @ParameterLayout(named = "New name")
> > > > >             final String name) {
> > > > >         setName(name);
> > > > >         return this;
> > > > >     }
> > > > >     public String default0UpdateName() {
> > > > >         return getName();
> > > > >     }
> > > > >     public TranslatableString validateUpdateName(final String
> name) {
> > > > >         return name.contains("!")?
> TranslatableString.tr("Exclamation
> > > > mark
> > > > > is not allowed"): null;
> > > > >     }
> > > > >
> > > > >
> > > > >
> > > > >     public static class DeleteDomainEvent extends
> > > > > ActionDomainEvent<SimpleObject> {}
> > > > >     @Action(
> > > > >             domainEvent = DeleteDomainEvent.class,
> > > > >             semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE
> > > > >     )
> > > > >     public void delete() {
> > > > >         container.removeIfNotAlready(this);
> > > > >     }
> > > > >
> > > > >
> > > > >     /**
> > > > >      * version (derived property)
> > > > >      */
> > > > >     public Integer getVersionSequence() {
> > > > >         return (Integer) JDOHelper.getVersion(this);
> > > > >     }
> > > > >
> > > > >
> > > > >     @Override
> > > > >     public int compareTo(final SimpleObject other) {
> > > > >         return ObjectContracts.compare(this, other, "name");
> > > > >     }
> > > > >
> > > > >
> > > > >     @javax.inject.Inject
> > > > >     @SuppressWarnings("unused")
> > > > >     private DomainObjectContainer container;
> > > > >
> > > > > }
> > > > >
> > > > > The error message is same as "Attempt to store value...".
> > > > >
> > > > > Regards,
> > > > > James
> > > > >
> > > > > 2016-01-25 19:18 GMT+08:00 Dan Haywood <
> dan@haywood-associates.co.uk
> > >:
> > > > >
> > > > > > As Martin says, the DN error is perhaps a bit misleading ... I
> > > believe
> > > > > the
> > > > > > "store" action here is DN repopulating the pojo with data from
> the
> > > > > > database, rather than the other way around.
> > > > > >
> > > > > > In Isis the JdoObjectIdSerializer class [1] is responsible for
> > > > converting
> > > > > > between the Isis RootOid and the DN ObjectId; the format "
> > > > > >
> 4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device"
> > > is a
> > > > > > valid value for the OID,
> > > > > >
> > > > > > Could you provide a test example based on simpleapp that
> > demonstrates
> > > > the
> > > > > > problem?  It might be to do with the particular
> > annotations/mappings
> > > > that
> > > > > > you have on your Device class.
> > > > > >
> > > > > > Thanks
> > > > > > Dan
> > > > > >
> > > > > >
> > > > > >
> > > > > > [1]
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/apache/isis/blob/rel/isis-1.11.1/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializer.java
> > > > > >
> > > > > > On 25 January 2016 at 08:04, Martin Grigorov <
> mgrigorov@apache.org
> > >
> > > > > wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > I believe there are two issues here:
> > > > > > >
> > > > > > > 1) Isis doesn't extract the primary key
> > > > > > (4028dd814d2213d8014d2213d8610000)
> > > > > > > from
> > > > > "4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device"
> > > > > > > before passing it to DataNucleus
> > > > > > > 2) DataNucleus uses misleading exception message. The method
> call
> > > is
> > > > > > > #getObjectById().
> > > > > > > I guess it uses something like JDOQL with template object, e.g.
> > > > > > > Device device = new Device();
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> device.setId("4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device");
> > > > > > >  // 1
> > > > > > > SELECT * FROM Device dev WHERE dev.getId() = device.getId();
> > > > > > >
> > > > > > > and it fails at [1].
> > > > > > >
> > > > > > > I have no experience with DataNucleus so this is just a guess.
> > And
> > > > the
> > > > > > > given JDOQL above is most probably very wrong, but you get the
> > > idea.
> > > > > > >
> > > > > > > Martin Grigorov
> > > > > > > Wicket Training and Consulting
> > > > > > > https://twitter.com/mtgrigorov
> > > > > > >
> > > > > > > On Mon, Jan 25, 2016 at 2:39 AM, Chuangyu <
> > zhu.chuangyu@gmail.com>
> > > > > > wrote:
> > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I met an error when try a GET method with Swagger UI.
> > > > > > > >
> > > > > > > > The url is below:
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://localhost:8080/restful/objects/tm.dom.modules.assets.Device/4028dd814d2213d8014d2213d8610000
> > > > > > > >
> > > > > > > >
> > > > > > > > "4028dd814d2213d8014d2213d8610000" is a uuid string which
> > length
> > > is
> > > > > 32.
> > > > > > > >
> > > > > > > >  curl command as below:
> > > > > > > >
> > > > > > > > curl -X GET --header "Accept:
> > > > > > > > application/json;profile=urn:org.apache.isis/v1" --header
> > > > > > > > "Authorization: Basic c3lzdGVtLWFkbWluOmdvb2dmcmllbmc="
> > > > > > > > "
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://localhost:8080/restful/objects/tm.dom.modules.assets.Device/4028dd814d2213d8014d2213d8610000
> > > > > > > > "
> > > > > > > >
> > > > > > > >
> > > > > > > > error message sa below:
> > > > > > > >
> > > > > > > > { "className": "javax.jdo.JDOFatalUserException", "message":
> > > > "Attempt
> > > > > > to
> > > > > > > > store value
> > > > > > > >
> > > > \"4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device\"
> > > > > > in
> > > > > > > > column \"id\" that has maximum length of 32. Please correct
> > your
> > > > > > data!",
> > > > > > > "
> > > > > > > > stackTrace": [
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:616)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1728)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1741)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadPojo(PersistenceSession.java:885)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:866)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:859)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadObjectInTransaction(PersistenceSession.java:858)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.adapterForAny(PersistenceSession.java:1507)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapter(OidUtils.java:60)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapterElseNull(OidUtils.java:40)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseNull(ResourceAbstract.java:151)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseThrowNotFound(ResourceAbstract.java:141)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside.object(DomainObjectResourceServerside.java:123)",
> > > > > > > > "sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> > > > > > > > "java.lang.reflect.Method.invoke(Method.java:497)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)",
> > > > > > > >
> "javax.servlet.http.HttpServlet.service(HttpServlet.java:790)",
> > > > > > > >
> > > > > >
> > > >
> > "org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects.doFilter(IsisTransactionFilterForRestfulObjects.java:46)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.IsisSessionFilter.doFilter(IsisSessionFilter.java:338)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)",
> > > > > > > > "org.eclipse.jetty.server.Server.handle(Server.java:499)",
> > > > > > > >
> > > > "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)",
> > > > > > > > "java.lang.Thread.run(Thread.java:745)" ], "causedBy": {
> > > > "className":
> > > > > > > > "org.datanucleus.exceptions.NucleusUserException", "message":
> > > > > "Attempt
> > > > > > to
> > > > > > > > store value
> > > > > > > >
> > > > \"4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device\"
> > > > > > in
> > > > > > > > column \"id\" that has maximum length of 32. Please correct
> > your
> > > > > > data!",
> > > > > > > "
> > > > > > > > stackTrace": [
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.mapping.datastore.CharRDBMSMapping.setString(CharRDBMSMapping.java:254)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping.setString(SingleFieldMapping.java:180)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.fieldmanager.ParameterSetter.storeStringField(ParameterSetter.java:158)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.AbstractStateManager.providedStringField(AbstractStateManager.java:1448)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.providedStringField(StateManagerImpl.java:120)",
> > > > > > > > "tm.dom.modules.IdEntity.dnProvideField(IdEntity.java)",
> > > > > > > > "tm.dom.modules.assets.Device.dnProvideField(Device.java)",
> > > > > > > > "tm.dom.modules.IdEntity.dnProvideFields(IdEntity.java)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.provideFields(StateManagerImpl.java:1170)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.request.FetchRequest.execute(FetchRequest.java:333)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.RDBMSPersistenceHandler.fetchObject(RDBMSPersistenceHandler.java:319)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.AbstractStateManager.loadFieldsFromDatastore(AbstractStateManager.java:1147)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.validate(StateManagerImpl.java:4289)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3608)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1723)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1741)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadPojo(PersistenceSession.java:885)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:866)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:859)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadObjectInTransaction(PersistenceSession.java:858)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.adapterForAny(PersistenceSession.java:1507)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapter(OidUtils.java:60)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapterElseNull(OidUtils.java:40)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseNull(ResourceAbstract.java:151)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseThrowNotFound(ResourceAbstract.java:141)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside.object(DomainObjectResourceServerside.java:123)",
> > > > > > > > "sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> > > > > > > > "java.lang.reflect.Method.invoke(Method.java:497)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)",
> > > > > > > >
> "javax.servlet.http.HttpServlet.service(HttpServlet.java:790)",
> > > > > > > >
> > > > > >
> > > >
> > "org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects.doFilter(IsisTransactionFilterForRestfulObjects.java:46)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.IsisSessionFilter.doFilter(IsisSessionFilter.java:338)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)",
> > > > > > > > "org.eclipse.jetty.server.Server.handle(Server.java:499)",
> > > > > > > >
> > > > "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)",
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)",
> > > > > > > > "java.lang.Thread.run(Thread.java:745)" ], "causedBy": null
> } }
> > > > > > > >
> > > > > > > > I don't know why a GET method lead to a store action ?
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: why a GET method would store value to database?

Posted by Chuangyu <zh...@gmail.com>.
Hi, Dan,

Thank you for your work.

You are right , I call GET method without prefix "s_" originally. Now it
works fine with "s_" + id.

But this information doesn't documented, would you please put this into
document ?

Thanks again,
James.

2016-02-17 16:41 GMT+08:00 Dan Haywood <da...@haywood-associates.co.uk>:

> Hi James,
>
> OK, so I took a look at this yesterday; thanks for the example code.  I
> don't believe there's an issue, but I can see how one might make a mistake
> to get the behaviour you are seeing.
>
> The IdEntity you introduced (which SimpleObject subclases) is defined to
> use application-defined identity, with an IdGenerator strategy of UUIDHEX:
>
> @javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.
> APPLICATION)
> @javax.jdo.annotations.Inheritance(strategy=javax.jdo.annotations.
> InheritanceStrategy.SUBCLASS_TABLE)
> public class IdEntity {
>
>    @javax.jdo.annotations.Persistent(primaryKey="true",
> valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
>    @javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
>    protected String id;
>
> }
>
> So, in the database, the SimpleObject.id column will have a value something
> like "1234567890abcdef1234567890abcdef"
>
> If you invoke "SimpleObjects/listAll/invoke" in the swagger-ui, then you'll
> see links for the SimpleObject objects, in the form:
>
>
>
> http://localhost:8080/objects/simple.SimpleObject:s_1234567890abcdef1234567890abcdef
> .
>
> What's important to note here is that hex id has a "s_" prefix.  This is
> Isis adding some type encoding so that it knows how to correctly recreate
> the identifier for the object.
>
> If in the Swagger UI you use the "s_1234567890abcdef1234567890abcdef" as
> the Id when you GET the SimpleObject instance, it all works fine.
>
> If, however, you miss out the "s_" prefix (easy to do), then you'll get the
> exception you reported.
>
> Hope that makes sense?
>
> Thx
> Dan
>
>
>
>
>
>
>
>
>
> On 15 February 2016 at 02:28, Chuangyu <zh...@gmail.com> wrote:
>
> > Hi, Dan,
> >
> > Did you found the reason of issue ?
> >
> > Thanks,
> >
> > James
> >
> > ps: update class IdEntity
> >
> >
> >
> @javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.APPLICATION)
> >
> >
> @javax.jdo.annotations.Inheritance(strategy=javax.jdo.annotations.InheritanceStrategy.SUBCLASS_TABLE)
> > @javax.jdo.annotations.Version(
> >         strategy=VersionStrategy.VERSION_NUMBER,
> >         column="version")
> > public class IdEntity {
> > protected String id;
> >
> >
> @javax.jdo.annotations.Persistent(primaryKey="true",valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
> > @javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
> > @Property(hidden=Where.ANYWHERE)
> > public String getId(){
> > return this.id;
> > }
> > public void setId(String id){
> > this.id=id;
> > }
> > private Long createdAt;
> > @Property(hidden=Where.EVERYWHERE)
> > @javax.jdo.annotations.Column(name="created_at",allowsNull="true")
> > public Long getCreatedAt(){
> > return this.createdAt;
> > }
> > public void setCreatedAt(Long time){
> > this.createdAt=time;
> > }
> > private Long updatedAt;
> > @Property(hidden=Where.EVERYWHERE)
> > @javax.jdo.annotations.Column(name="updated_at",allowsNull="true")
> > public Long getUpdatedAt(){
> > return this.updatedAt;
> > }
> > public void setUpdatedAt(Long time){
> > this.updatedAt=time;
> > }
> >
> > public void persisting(){
> > this.createdAt=clockService.nowAsMillis();
> > }
> > @javax.inject.Inject
> > protected ClockService clockService;
> > }
> >
> >
> >
> >
> >
> > 2016-02-01 20:04 GMT+08:00 Dan Haywood <da...@haywood-associates.co.uk>:
> >
> > > Ok, James, thanks for taking the time to look into.
> > > Will take a look later this week,try to get to the bottom of it .
> > > Thx, Dan
> > > On 1 Feb 2016 12:45, "Chuangyu" <zh...@gmail.com> wrote:
> > >
> > > > Hi, Dan,
> > > >
> > > > I replay the error with simpleapp.
> > > >
> > > > There is one new class called IdEntity, and modify SimpleObject to
> > > extends
> > > > IdEntity.
> > > >
> > > > public class IdEntity {
> > > > protected String id;
> > > >
> > > >
> > >
> >
> @javax.jdo.annotations.Persistent(primaryKey="true",valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
> > > > @javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
> > > > @Property(hidden=Where.ANYWHERE)
> > > > public String getId(){
> > > > return this.id;
> > > > }
> > > > public void setId(String id){
> > > > this.id=id;
> > > > }
> > > > private Long createdAt;
> > > > @Property(hidden=Where.EVERYWHERE)
> > > > @javax.jdo.annotations.Column(name="created_at",allowsNull="true")
> > > > public Long getCreatedAt(){
> > > > return this.createdAt;
> > > > }
> > > > public void setCreatedAt(Long time){
> > > > this.createdAt=time;
> > > > }
> > > > private Long updatedAt;
> > > > @Property(hidden=Where.EVERYWHERE)
> > > > @javax.jdo.annotations.Column(name="updated_at",allowsNull="true")
> > > > public Long getUpdatedAt(){
> > > > return this.updatedAt;
> > > > }
> > > > public void setUpdatedAt(Long time){
> > > > this.updatedAt=time;
> > > > }
> > > >
> > > > public void persisting(){
> > > > this.createdAt=clockService.nowAsMillis();
> > > > }
> > > > @javax.inject.Inject
> > > > protected ClockService clockService;
> > > > }
> > > >
> > > >
> > > > @javax.jdo.annotations.PersistenceCapable(
> > > >         table = "SimpleObject",
> > > >         identityType=IdentityType.APPLICATION
> > > > )
> > > > //@javax.jdo.annotations.DatastoreIdentity(
> > > > //
> strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY,
> > > > //         column="id")
> > > > //@javax.jdo.annotations.Version(
> > > > //        strategy=VersionStrategy.VERSION_NUMBER,
> > > > //        strategy= VersionStrategy.DATE_TIME,
> > > > //        column="version")
> > > > @javax.jdo.annotations.Queries({
> > > >         @javax.jdo.annotations.Query(
> > > >                 name = "find", language = "JDOQL",
> > > >                 value = "SELECT "
> > > >                         + "FROM domainapp.dom.simple.SimpleObject "),
> > > >         @javax.jdo.annotations.Query(
> > > >                 name = "findByName", language = "JDOQL",
> > > >                 value = "SELECT "
> > > >                         + "FROM domainapp.dom.simple.SimpleObject "
> > > >                         + "WHERE name.indexOf(:name) >= 0 ")
> > > > })
> > > > @javax.jdo.annotations.Unique(name="SimpleObject_name_UNQ", members =
> > > > {"name"})
> > > > @DomainObject
> > > > @DomainObjectLayout(
> > > >         bookmarking = BookmarkPolicy.AS_ROOT
> > > > )
> > > > public class SimpleObject extends IdEntity implements
> > > > Comparable<SimpleObject> {
> > > >
> > > >     public static final int NAME_LENGTH = 40;
> > > >
> > > >
> > > >     public TranslatableString title() {
> > > >         return TranslatableString.tr("Object: {name}", "name",
> > > getName());
> > > >     }
> > > >
> > > >     public static class NameDomainEvent extends
> > > > PropertyDomainEvent<SimpleObject,String> {}
> > > >     @javax.jdo.annotations.Column(
> > > >             allowsNull="false",
> > > >             length = NAME_LENGTH
> > > >     )
> > > >     @Property(
> > > >             editing = Editing.DISABLED
> > > >     )
> > > >     @PropertyLayout(
> > > >             namedEscaped = false
> > > >     )
> > > >     private String name;
> > > >     public String getName() {
> > > >         return name;
> > > >     }
> > > >     public void setName(final String name) {
> > > >         this.name = name;
> > > >     }
> > > >
> > > >
> > > >
> > > >     public static class UpdateNameDomainEvent extends
> > > > ActionDomainEvent<SimpleObject> {}
> > > >     @Action(
> > > >             domainEvent = UpdateNameDomainEvent.class,
> > > >             semantics = SemanticsOf.IDEMPOTENT
> > > >     )
> > > >     public SimpleObject updateName(
> > > >             @Parameter(maxLength = NAME_LENGTH)
> > > >             @ParameterLayout(named = "New name")
> > > >             final String name) {
> > > >         setName(name);
> > > >         return this;
> > > >     }
> > > >     public String default0UpdateName() {
> > > >         return getName();
> > > >     }
> > > >     public TranslatableString validateUpdateName(final String name) {
> > > >         return name.contains("!")? TranslatableString.tr("Exclamation
> > > mark
> > > > is not allowed"): null;
> > > >     }
> > > >
> > > >
> > > >
> > > >     public static class DeleteDomainEvent extends
> > > > ActionDomainEvent<SimpleObject> {}
> > > >     @Action(
> > > >             domainEvent = DeleteDomainEvent.class,
> > > >             semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE
> > > >     )
> > > >     public void delete() {
> > > >         container.removeIfNotAlready(this);
> > > >     }
> > > >
> > > >
> > > >     /**
> > > >      * version (derived property)
> > > >      */
> > > >     public Integer getVersionSequence() {
> > > >         return (Integer) JDOHelper.getVersion(this);
> > > >     }
> > > >
> > > >
> > > >     @Override
> > > >     public int compareTo(final SimpleObject other) {
> > > >         return ObjectContracts.compare(this, other, "name");
> > > >     }
> > > >
> > > >
> > > >     @javax.inject.Inject
> > > >     @SuppressWarnings("unused")
> > > >     private DomainObjectContainer container;
> > > >
> > > > }
> > > >
> > > > The error message is same as "Attempt to store value...".
> > > >
> > > > Regards,
> > > > James
> > > >
> > > > 2016-01-25 19:18 GMT+08:00 Dan Haywood <dan@haywood-associates.co.uk
> >:
> > > >
> > > > > As Martin says, the DN error is perhaps a bit misleading ... I
> > believe
> > > > the
> > > > > "store" action here is DN repopulating the pojo with data from the
> > > > > database, rather than the other way around.
> > > > >
> > > > > In Isis the JdoObjectIdSerializer class [1] is responsible for
> > > converting
> > > > > between the Isis RootOid and the DN ObjectId; the format "
> > > > > 4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device"
> > is a
> > > > > valid value for the OID,
> > > > >
> > > > > Could you provide a test example based on simpleapp that
> demonstrates
> > > the
> > > > > problem?  It might be to do with the particular
> annotations/mappings
> > > that
> > > > > you have on your Device class.
> > > > >
> > > > > Thanks
> > > > > Dan
> > > > >
> > > > >
> > > > >
> > > > > [1]
> > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/apache/isis/blob/rel/isis-1.11.1/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializer.java
> > > > >
> > > > > On 25 January 2016 at 08:04, Martin Grigorov <mgrigorov@apache.org
> >
> > > > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I believe there are two issues here:
> > > > > >
> > > > > > 1) Isis doesn't extract the primary key
> > > > > (4028dd814d2213d8014d2213d8610000)
> > > > > > from
> > > > "4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device"
> > > > > > before passing it to DataNucleus
> > > > > > 2) DataNucleus uses misleading exception message. The method call
> > is
> > > > > > #getObjectById().
> > > > > > I guess it uses something like JDOQL with template object, e.g.
> > > > > > Device device = new Device();
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> device.setId("4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device");
> > > > > >  // 1
> > > > > > SELECT * FROM Device dev WHERE dev.getId() = device.getId();
> > > > > >
> > > > > > and it fails at [1].
> > > > > >
> > > > > > I have no experience with DataNucleus so this is just a guess.
> And
> > > the
> > > > > > given JDOQL above is most probably very wrong, but you get the
> > idea.
> > > > > >
> > > > > > Martin Grigorov
> > > > > > Wicket Training and Consulting
> > > > > > https://twitter.com/mtgrigorov
> > > > > >
> > > > > > On Mon, Jan 25, 2016 at 2:39 AM, Chuangyu <
> zhu.chuangyu@gmail.com>
> > > > > wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > I met an error when try a GET method with Swagger UI.
> > > > > > >
> > > > > > > The url is below:
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://localhost:8080/restful/objects/tm.dom.modules.assets.Device/4028dd814d2213d8014d2213d8610000
> > > > > > >
> > > > > > >
> > > > > > > "4028dd814d2213d8014d2213d8610000" is a uuid string which
> length
> > is
> > > > 32.
> > > > > > >
> > > > > > >  curl command as below:
> > > > > > >
> > > > > > > curl -X GET --header "Accept:
> > > > > > > application/json;profile=urn:org.apache.isis/v1" --header
> > > > > > > "Authorization: Basic c3lzdGVtLWFkbWluOmdvb2dmcmllbmc="
> > > > > > > "
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://localhost:8080/restful/objects/tm.dom.modules.assets.Device/4028dd814d2213d8014d2213d8610000
> > > > > > > "
> > > > > > >
> > > > > > >
> > > > > > > error message sa below:
> > > > > > >
> > > > > > > { "className": "javax.jdo.JDOFatalUserException", "message":
> > > "Attempt
> > > > > to
> > > > > > > store value
> > > > > > >
> > > \"4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device\"
> > > > > in
> > > > > > > column \"id\" that has maximum length of 32. Please correct
> your
> > > > > data!",
> > > > > > "
> > > > > > > stackTrace": [
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:616)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1728)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1741)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadPojo(PersistenceSession.java:885)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:866)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:859)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadObjectInTransaction(PersistenceSession.java:858)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.adapterForAny(PersistenceSession.java:1507)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapter(OidUtils.java:60)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapterElseNull(OidUtils.java:40)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseNull(ResourceAbstract.java:151)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseThrowNotFound(ResourceAbstract.java:141)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside.object(DomainObjectResourceServerside.java:123)",
> > > > > > > "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> > > > > > > "java.lang.reflect.Method.invoke(Method.java:497)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)",
> > > > > > > "javax.servlet.http.HttpServlet.service(HttpServlet.java:790)",
> > > > > > >
> > > > >
> > >
> "org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects.doFilter(IsisTransactionFilterForRestfulObjects.java:46)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.IsisSessionFilter.doFilter(IsisSessionFilter.java:338)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)",
> > > > > > > "org.eclipse.jetty.server.Server.handle(Server.java:499)",
> > > > > > >
> > > "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)",
> > > > > > > "java.lang.Thread.run(Thread.java:745)" ], "causedBy": {
> > > "className":
> > > > > > > "org.datanucleus.exceptions.NucleusUserException", "message":
> > > > "Attempt
> > > > > to
> > > > > > > store value
> > > > > > >
> > > \"4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device\"
> > > > > in
> > > > > > > column \"id\" that has maximum length of 32. Please correct
> your
> > > > > data!",
> > > > > > "
> > > > > > > stackTrace": [
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.mapping.datastore.CharRDBMSMapping.setString(CharRDBMSMapping.java:254)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping.setString(SingleFieldMapping.java:180)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.fieldmanager.ParameterSetter.storeStringField(ParameterSetter.java:158)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.AbstractStateManager.providedStringField(AbstractStateManager.java:1448)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.providedStringField(StateManagerImpl.java:120)",
> > > > > > > "tm.dom.modules.IdEntity.dnProvideField(IdEntity.java)",
> > > > > > > "tm.dom.modules.assets.Device.dnProvideField(Device.java)",
> > > > > > > "tm.dom.modules.IdEntity.dnProvideFields(IdEntity.java)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.provideFields(StateManagerImpl.java:1170)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.request.FetchRequest.execute(FetchRequest.java:333)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.RDBMSPersistenceHandler.fetchObject(RDBMSPersistenceHandler.java:319)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.AbstractStateManager.loadFieldsFromDatastore(AbstractStateManager.java:1147)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.validate(StateManagerImpl.java:4289)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3608)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1723)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1741)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadPojo(PersistenceSession.java:885)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:866)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:859)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadObjectInTransaction(PersistenceSession.java:858)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.adapterForAny(PersistenceSession.java:1507)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapter(OidUtils.java:60)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapterElseNull(OidUtils.java:40)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseNull(ResourceAbstract.java:151)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseThrowNotFound(ResourceAbstract.java:141)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside.object(DomainObjectResourceServerside.java:123)",
> > > > > > > "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> > > > > > > "java.lang.reflect.Method.invoke(Method.java:497)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)",
> > > > > > > "javax.servlet.http.HttpServlet.service(HttpServlet.java:790)",
> > > > > > >
> > > > >
> > >
> "org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects.doFilter(IsisTransactionFilterForRestfulObjects.java:46)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.IsisSessionFilter.doFilter(IsisSessionFilter.java:338)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)",
> > > > > > > "org.eclipse.jetty.server.Server.handle(Server.java:499)",
> > > > > > >
> > > "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)",
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)",
> > > > > > > "java.lang.Thread.run(Thread.java:745)" ], "causedBy": null } }
> > > > > > >
> > > > > > > I don't know why a GET method lead to a store action ?
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: why a GET method would store value to database?

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi James,

OK, so I took a look at this yesterday; thanks for the example code.  I
don't believe there's an issue, but I can see how one might make a mistake
to get the behaviour you are seeing.

The IdEntity you introduced (which SimpleObject subclases) is defined to
use application-defined identity, with an IdGenerator strategy of UUIDHEX:

@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.
APPLICATION)
@javax.jdo.annotations.Inheritance(strategy=javax.jdo.annotations.
InheritanceStrategy.SUBCLASS_TABLE)
public class IdEntity {

   @javax.jdo.annotations.Persistent(primaryKey="true",
valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
   @javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
   protected String id;

}

So, in the database, the SimpleObject.id column will have a value something
like "1234567890abcdef1234567890abcdef"

If you invoke "SimpleObjects/listAll/invoke" in the swagger-ui, then you'll
see links for the SimpleObject objects, in the form:


http://localhost:8080/objects/simple.SimpleObject:s_1234567890abcdef1234567890abcdef
.

What's important to note here is that hex id has a "s_" prefix.  This is
Isis adding some type encoding so that it knows how to correctly recreate
the identifier for the object.

If in the Swagger UI you use the "s_1234567890abcdef1234567890abcdef" as
the Id when you GET the SimpleObject instance, it all works fine.

If, however, you miss out the "s_" prefix (easy to do), then you'll get the
exception you reported.

Hope that makes sense?

Thx
Dan









On 15 February 2016 at 02:28, Chuangyu <zh...@gmail.com> wrote:

> Hi, Dan,
>
> Did you found the reason of issue ?
>
> Thanks,
>
> James
>
> ps: update class IdEntity
>
>
> @javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.APPLICATION)
>
> @javax.jdo.annotations.Inheritance(strategy=javax.jdo.annotations.InheritanceStrategy.SUBCLASS_TABLE)
> @javax.jdo.annotations.Version(
>         strategy=VersionStrategy.VERSION_NUMBER,
>         column="version")
> public class IdEntity {
> protected String id;
>
> @javax.jdo.annotations.Persistent(primaryKey="true",valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
> @javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
> @Property(hidden=Where.ANYWHERE)
> public String getId(){
> return this.id;
> }
> public void setId(String id){
> this.id=id;
> }
> private Long createdAt;
> @Property(hidden=Where.EVERYWHERE)
> @javax.jdo.annotations.Column(name="created_at",allowsNull="true")
> public Long getCreatedAt(){
> return this.createdAt;
> }
> public void setCreatedAt(Long time){
> this.createdAt=time;
> }
> private Long updatedAt;
> @Property(hidden=Where.EVERYWHERE)
> @javax.jdo.annotations.Column(name="updated_at",allowsNull="true")
> public Long getUpdatedAt(){
> return this.updatedAt;
> }
> public void setUpdatedAt(Long time){
> this.updatedAt=time;
> }
>
> public void persisting(){
> this.createdAt=clockService.nowAsMillis();
> }
> @javax.inject.Inject
> protected ClockService clockService;
> }
>
>
>
>
>
> 2016-02-01 20:04 GMT+08:00 Dan Haywood <da...@haywood-associates.co.uk>:
>
> > Ok, James, thanks for taking the time to look into.
> > Will take a look later this week,try to get to the bottom of it .
> > Thx, Dan
> > On 1 Feb 2016 12:45, "Chuangyu" <zh...@gmail.com> wrote:
> >
> > > Hi, Dan,
> > >
> > > I replay the error with simpleapp.
> > >
> > > There is one new class called IdEntity, and modify SimpleObject to
> > extends
> > > IdEntity.
> > >
> > > public class IdEntity {
> > > protected String id;
> > >
> > >
> >
> @javax.jdo.annotations.Persistent(primaryKey="true",valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
> > > @javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
> > > @Property(hidden=Where.ANYWHERE)
> > > public String getId(){
> > > return this.id;
> > > }
> > > public void setId(String id){
> > > this.id=id;
> > > }
> > > private Long createdAt;
> > > @Property(hidden=Where.EVERYWHERE)
> > > @javax.jdo.annotations.Column(name="created_at",allowsNull="true")
> > > public Long getCreatedAt(){
> > > return this.createdAt;
> > > }
> > > public void setCreatedAt(Long time){
> > > this.createdAt=time;
> > > }
> > > private Long updatedAt;
> > > @Property(hidden=Where.EVERYWHERE)
> > > @javax.jdo.annotations.Column(name="updated_at",allowsNull="true")
> > > public Long getUpdatedAt(){
> > > return this.updatedAt;
> > > }
> > > public void setUpdatedAt(Long time){
> > > this.updatedAt=time;
> > > }
> > >
> > > public void persisting(){
> > > this.createdAt=clockService.nowAsMillis();
> > > }
> > > @javax.inject.Inject
> > > protected ClockService clockService;
> > > }
> > >
> > >
> > > @javax.jdo.annotations.PersistenceCapable(
> > >         table = "SimpleObject",
> > >         identityType=IdentityType.APPLICATION
> > > )
> > > //@javax.jdo.annotations.DatastoreIdentity(
> > > //        strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY,
> > > //         column="id")
> > > //@javax.jdo.annotations.Version(
> > > //        strategy=VersionStrategy.VERSION_NUMBER,
> > > //        strategy= VersionStrategy.DATE_TIME,
> > > //        column="version")
> > > @javax.jdo.annotations.Queries({
> > >         @javax.jdo.annotations.Query(
> > >                 name = "find", language = "JDOQL",
> > >                 value = "SELECT "
> > >                         + "FROM domainapp.dom.simple.SimpleObject "),
> > >         @javax.jdo.annotations.Query(
> > >                 name = "findByName", language = "JDOQL",
> > >                 value = "SELECT "
> > >                         + "FROM domainapp.dom.simple.SimpleObject "
> > >                         + "WHERE name.indexOf(:name) >= 0 ")
> > > })
> > > @javax.jdo.annotations.Unique(name="SimpleObject_name_UNQ", members =
> > > {"name"})
> > > @DomainObject
> > > @DomainObjectLayout(
> > >         bookmarking = BookmarkPolicy.AS_ROOT
> > > )
> > > public class SimpleObject extends IdEntity implements
> > > Comparable<SimpleObject> {
> > >
> > >     public static final int NAME_LENGTH = 40;
> > >
> > >
> > >     public TranslatableString title() {
> > >         return TranslatableString.tr("Object: {name}", "name",
> > getName());
> > >     }
> > >
> > >     public static class NameDomainEvent extends
> > > PropertyDomainEvent<SimpleObject,String> {}
> > >     @javax.jdo.annotations.Column(
> > >             allowsNull="false",
> > >             length = NAME_LENGTH
> > >     )
> > >     @Property(
> > >             editing = Editing.DISABLED
> > >     )
> > >     @PropertyLayout(
> > >             namedEscaped = false
> > >     )
> > >     private String name;
> > >     public String getName() {
> > >         return name;
> > >     }
> > >     public void setName(final String name) {
> > >         this.name = name;
> > >     }
> > >
> > >
> > >
> > >     public static class UpdateNameDomainEvent extends
> > > ActionDomainEvent<SimpleObject> {}
> > >     @Action(
> > >             domainEvent = UpdateNameDomainEvent.class,
> > >             semantics = SemanticsOf.IDEMPOTENT
> > >     )
> > >     public SimpleObject updateName(
> > >             @Parameter(maxLength = NAME_LENGTH)
> > >             @ParameterLayout(named = "New name")
> > >             final String name) {
> > >         setName(name);
> > >         return this;
> > >     }
> > >     public String default0UpdateName() {
> > >         return getName();
> > >     }
> > >     public TranslatableString validateUpdateName(final String name) {
> > >         return name.contains("!")? TranslatableString.tr("Exclamation
> > mark
> > > is not allowed"): null;
> > >     }
> > >
> > >
> > >
> > >     public static class DeleteDomainEvent extends
> > > ActionDomainEvent<SimpleObject> {}
> > >     @Action(
> > >             domainEvent = DeleteDomainEvent.class,
> > >             semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE
> > >     )
> > >     public void delete() {
> > >         container.removeIfNotAlready(this);
> > >     }
> > >
> > >
> > >     /**
> > >      * version (derived property)
> > >      */
> > >     public Integer getVersionSequence() {
> > >         return (Integer) JDOHelper.getVersion(this);
> > >     }
> > >
> > >
> > >     @Override
> > >     public int compareTo(final SimpleObject other) {
> > >         return ObjectContracts.compare(this, other, "name");
> > >     }
> > >
> > >
> > >     @javax.inject.Inject
> > >     @SuppressWarnings("unused")
> > >     private DomainObjectContainer container;
> > >
> > > }
> > >
> > > The error message is same as "Attempt to store value...".
> > >
> > > Regards,
> > > James
> > >
> > > 2016-01-25 19:18 GMT+08:00 Dan Haywood <da...@haywood-associates.co.uk>:
> > >
> > > > As Martin says, the DN error is perhaps a bit misleading ... I
> believe
> > > the
> > > > "store" action here is DN repopulating the pojo with data from the
> > > > database, rather than the other way around.
> > > >
> > > > In Isis the JdoObjectIdSerializer class [1] is responsible for
> > converting
> > > > between the Isis RootOid and the DN ObjectId; the format "
> > > > 4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device"
> is a
> > > > valid value for the OID,
> > > >
> > > > Could you provide a test example based on simpleapp that demonstrates
> > the
> > > > problem?  It might be to do with the particular annotations/mappings
> > that
> > > > you have on your Device class.
> > > >
> > > > Thanks
> > > > Dan
> > > >
> > > >
> > > >
> > > > [1]
> > > >
> > > >
> > >
> >
> https://github.com/apache/isis/blob/rel/isis-1.11.1/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializer.java
> > > >
> > > > On 25 January 2016 at 08:04, Martin Grigorov <mg...@apache.org>
> > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I believe there are two issues here:
> > > > >
> > > > > 1) Isis doesn't extract the primary key
> > > > (4028dd814d2213d8014d2213d8610000)
> > > > > from
> > > "4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device"
> > > > > before passing it to DataNucleus
> > > > > 2) DataNucleus uses misleading exception message. The method call
> is
> > > > > #getObjectById().
> > > > > I guess it uses something like JDOQL with template object, e.g.
> > > > > Device device = new Device();
> > > > >
> > > > >
> > > >
> > >
> >
> device.setId("4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device");
> > > > >  // 1
> > > > > SELECT * FROM Device dev WHERE dev.getId() = device.getId();
> > > > >
> > > > > and it fails at [1].
> > > > >
> > > > > I have no experience with DataNucleus so this is just a guess. And
> > the
> > > > > given JDOQL above is most probably very wrong, but you get the
> idea.
> > > > >
> > > > > Martin Grigorov
> > > > > Wicket Training and Consulting
> > > > > https://twitter.com/mtgrigorov
> > > > >
> > > > > On Mon, Jan 25, 2016 at 2:39 AM, Chuangyu <zh...@gmail.com>
> > > > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I met an error when try a GET method with Swagger UI.
> > > > > >
> > > > > > The url is below:
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://localhost:8080/restful/objects/tm.dom.modules.assets.Device/4028dd814d2213d8014d2213d8610000
> > > > > >
> > > > > >
> > > > > > "4028dd814d2213d8014d2213d8610000" is a uuid string which length
> is
> > > 32.
> > > > > >
> > > > > >  curl command as below:
> > > > > >
> > > > > > curl -X GET --header "Accept:
> > > > > > application/json;profile=urn:org.apache.isis/v1" --header
> > > > > > "Authorization: Basic c3lzdGVtLWFkbWluOmdvb2dmcmllbmc="
> > > > > > "
> > > > > >
> > > > >
> > > >
> > >
> >
> http://localhost:8080/restful/objects/tm.dom.modules.assets.Device/4028dd814d2213d8014d2213d8610000
> > > > > > "
> > > > > >
> > > > > >
> > > > > > error message sa below:
> > > > > >
> > > > > > { "className": "javax.jdo.JDOFatalUserException", "message":
> > "Attempt
> > > > to
> > > > > > store value
> > > > > >
> > \"4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device\"
> > > > in
> > > > > > column \"id\" that has maximum length of 32. Please correct your
> > > > data!",
> > > > > "
> > > > > > stackTrace": [
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:616)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1728)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1741)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadPojo(PersistenceSession.java:885)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:866)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:859)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadObjectInTransaction(PersistenceSession.java:858)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.adapterForAny(PersistenceSession.java:1507)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapter(OidUtils.java:60)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapterElseNull(OidUtils.java:40)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseNull(ResourceAbstract.java:151)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseThrowNotFound(ResourceAbstract.java:141)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside.object(DomainObjectResourceServerside.java:123)",
> > > > > > "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> > > > > > "java.lang.reflect.Method.invoke(Method.java:497)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)",
> > > > > > "javax.servlet.http.HttpServlet.service(HttpServlet.java:790)",
> > > > > >
> > > >
> > "org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects.doFilter(IsisTransactionFilterForRestfulObjects.java:46)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.IsisSessionFilter.doFilter(IsisSessionFilter.java:338)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)",
> > > > > > "org.eclipse.jetty.server.Server.handle(Server.java:499)",
> > > > > >
> > "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)",
> > > > > > "java.lang.Thread.run(Thread.java:745)" ], "causedBy": {
> > "className":
> > > > > > "org.datanucleus.exceptions.NucleusUserException", "message":
> > > "Attempt
> > > > to
> > > > > > store value
> > > > > >
> > \"4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device\"
> > > > in
> > > > > > column \"id\" that has maximum length of 32. Please correct your
> > > > data!",
> > > > > "
> > > > > > stackTrace": [
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.mapping.datastore.CharRDBMSMapping.setString(CharRDBMSMapping.java:254)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping.setString(SingleFieldMapping.java:180)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.fieldmanager.ParameterSetter.storeStringField(ParameterSetter.java:158)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.AbstractStateManager.providedStringField(AbstractStateManager.java:1448)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.providedStringField(StateManagerImpl.java:120)",
> > > > > > "tm.dom.modules.IdEntity.dnProvideField(IdEntity.java)",
> > > > > > "tm.dom.modules.assets.Device.dnProvideField(Device.java)",
> > > > > > "tm.dom.modules.IdEntity.dnProvideFields(IdEntity.java)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.provideFields(StateManagerImpl.java:1170)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.request.FetchRequest.execute(FetchRequest.java:333)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.RDBMSPersistenceHandler.fetchObject(RDBMSPersistenceHandler.java:319)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.AbstractStateManager.loadFieldsFromDatastore(AbstractStateManager.java:1147)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.validate(StateManagerImpl.java:4289)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3608)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1723)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1741)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadPojo(PersistenceSession.java:885)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:866)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:859)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadObjectInTransaction(PersistenceSession.java:858)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.adapterForAny(PersistenceSession.java:1507)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapter(OidUtils.java:60)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapterElseNull(OidUtils.java:40)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseNull(ResourceAbstract.java:151)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseThrowNotFound(ResourceAbstract.java:141)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside.object(DomainObjectResourceServerside.java:123)",
> > > > > > "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> > > > > > "java.lang.reflect.Method.invoke(Method.java:497)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)",
> > > > > > "javax.servlet.http.HttpServlet.service(HttpServlet.java:790)",
> > > > > >
> > > >
> > "org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects.doFilter(IsisTransactionFilterForRestfulObjects.java:46)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.IsisSessionFilter.doFilter(IsisSessionFilter.java:338)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)",
> > > > > > "org.eclipse.jetty.server.Server.handle(Server.java:499)",
> > > > > >
> > "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)",
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)",
> > > > > > "java.lang.Thread.run(Thread.java:745)" ], "causedBy": null } }
> > > > > >
> > > > > > I don't know why a GET method lead to a store action ?
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: why a GET method would store value to database?

Posted by Chuangyu <zh...@gmail.com>.
Hi, Dan,

Did you found the reason of issue ?

Thanks,

James

ps: update class IdEntity

@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.APPLICATION)
@javax.jdo.annotations.Inheritance(strategy=javax.jdo.annotations.InheritanceStrategy.SUBCLASS_TABLE)
@javax.jdo.annotations.Version(
        strategy=VersionStrategy.VERSION_NUMBER,
        column="version")
public class IdEntity {
protected String id;
@javax.jdo.annotations.Persistent(primaryKey="true",valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
@javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
@Property(hidden=Where.ANYWHERE)
public String getId(){
return this.id;
}
public void setId(String id){
this.id=id;
}
private Long createdAt;
@Property(hidden=Where.EVERYWHERE)
@javax.jdo.annotations.Column(name="created_at",allowsNull="true")
public Long getCreatedAt(){
return this.createdAt;
}
public void setCreatedAt(Long time){
this.createdAt=time;
}
private Long updatedAt;
@Property(hidden=Where.EVERYWHERE)
@javax.jdo.annotations.Column(name="updated_at",allowsNull="true")
public Long getUpdatedAt(){
return this.updatedAt;
}
public void setUpdatedAt(Long time){
this.updatedAt=time;
}

public void persisting(){
this.createdAt=clockService.nowAsMillis();
}
@javax.inject.Inject
protected ClockService clockService;
}





2016-02-01 20:04 GMT+08:00 Dan Haywood <da...@haywood-associates.co.uk>:

> Ok, James, thanks for taking the time to look into.
> Will take a look later this week,try to get to the bottom of it .
> Thx, Dan
> On 1 Feb 2016 12:45, "Chuangyu" <zh...@gmail.com> wrote:
>
> > Hi, Dan,
> >
> > I replay the error with simpleapp.
> >
> > There is one new class called IdEntity, and modify SimpleObject to
> extends
> > IdEntity.
> >
> > public class IdEntity {
> > protected String id;
> >
> >
> @javax.jdo.annotations.Persistent(primaryKey="true",valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
> > @javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
> > @Property(hidden=Where.ANYWHERE)
> > public String getId(){
> > return this.id;
> > }
> > public void setId(String id){
> > this.id=id;
> > }
> > private Long createdAt;
> > @Property(hidden=Where.EVERYWHERE)
> > @javax.jdo.annotations.Column(name="created_at",allowsNull="true")
> > public Long getCreatedAt(){
> > return this.createdAt;
> > }
> > public void setCreatedAt(Long time){
> > this.createdAt=time;
> > }
> > private Long updatedAt;
> > @Property(hidden=Where.EVERYWHERE)
> > @javax.jdo.annotations.Column(name="updated_at",allowsNull="true")
> > public Long getUpdatedAt(){
> > return this.updatedAt;
> > }
> > public void setUpdatedAt(Long time){
> > this.updatedAt=time;
> > }
> >
> > public void persisting(){
> > this.createdAt=clockService.nowAsMillis();
> > }
> > @javax.inject.Inject
> > protected ClockService clockService;
> > }
> >
> >
> > @javax.jdo.annotations.PersistenceCapable(
> >         table = "SimpleObject",
> >         identityType=IdentityType.APPLICATION
> > )
> > //@javax.jdo.annotations.DatastoreIdentity(
> > //        strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY,
> > //         column="id")
> > //@javax.jdo.annotations.Version(
> > //        strategy=VersionStrategy.VERSION_NUMBER,
> > //        strategy= VersionStrategy.DATE_TIME,
> > //        column="version")
> > @javax.jdo.annotations.Queries({
> >         @javax.jdo.annotations.Query(
> >                 name = "find", language = "JDOQL",
> >                 value = "SELECT "
> >                         + "FROM domainapp.dom.simple.SimpleObject "),
> >         @javax.jdo.annotations.Query(
> >                 name = "findByName", language = "JDOQL",
> >                 value = "SELECT "
> >                         + "FROM domainapp.dom.simple.SimpleObject "
> >                         + "WHERE name.indexOf(:name) >= 0 ")
> > })
> > @javax.jdo.annotations.Unique(name="SimpleObject_name_UNQ", members =
> > {"name"})
> > @DomainObject
> > @DomainObjectLayout(
> >         bookmarking = BookmarkPolicy.AS_ROOT
> > )
> > public class SimpleObject extends IdEntity implements
> > Comparable<SimpleObject> {
> >
> >     public static final int NAME_LENGTH = 40;
> >
> >
> >     public TranslatableString title() {
> >         return TranslatableString.tr("Object: {name}", "name",
> getName());
> >     }
> >
> >     public static class NameDomainEvent extends
> > PropertyDomainEvent<SimpleObject,String> {}
> >     @javax.jdo.annotations.Column(
> >             allowsNull="false",
> >             length = NAME_LENGTH
> >     )
> >     @Property(
> >             editing = Editing.DISABLED
> >     )
> >     @PropertyLayout(
> >             namedEscaped = false
> >     )
> >     private String name;
> >     public String getName() {
> >         return name;
> >     }
> >     public void setName(final String name) {
> >         this.name = name;
> >     }
> >
> >
> >
> >     public static class UpdateNameDomainEvent extends
> > ActionDomainEvent<SimpleObject> {}
> >     @Action(
> >             domainEvent = UpdateNameDomainEvent.class,
> >             semantics = SemanticsOf.IDEMPOTENT
> >     )
> >     public SimpleObject updateName(
> >             @Parameter(maxLength = NAME_LENGTH)
> >             @ParameterLayout(named = "New name")
> >             final String name) {
> >         setName(name);
> >         return this;
> >     }
> >     public String default0UpdateName() {
> >         return getName();
> >     }
> >     public TranslatableString validateUpdateName(final String name) {
> >         return name.contains("!")? TranslatableString.tr("Exclamation
> mark
> > is not allowed"): null;
> >     }
> >
> >
> >
> >     public static class DeleteDomainEvent extends
> > ActionDomainEvent<SimpleObject> {}
> >     @Action(
> >             domainEvent = DeleteDomainEvent.class,
> >             semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE
> >     )
> >     public void delete() {
> >         container.removeIfNotAlready(this);
> >     }
> >
> >
> >     /**
> >      * version (derived property)
> >      */
> >     public Integer getVersionSequence() {
> >         return (Integer) JDOHelper.getVersion(this);
> >     }
> >
> >
> >     @Override
> >     public int compareTo(final SimpleObject other) {
> >         return ObjectContracts.compare(this, other, "name");
> >     }
> >
> >
> >     @javax.inject.Inject
> >     @SuppressWarnings("unused")
> >     private DomainObjectContainer container;
> >
> > }
> >
> > The error message is same as "Attempt to store value...".
> >
> > Regards,
> > James
> >
> > 2016-01-25 19:18 GMT+08:00 Dan Haywood <da...@haywood-associates.co.uk>:
> >
> > > As Martin says, the DN error is perhaps a bit misleading ... I believe
> > the
> > > "store" action here is DN repopulating the pojo with data from the
> > > database, rather than the other way around.
> > >
> > > In Isis the JdoObjectIdSerializer class [1] is responsible for
> converting
> > > between the Isis RootOid and the DN ObjectId; the format "
> > > 4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device" is a
> > > valid value for the OID,
> > >
> > > Could you provide a test example based on simpleapp that demonstrates
> the
> > > problem?  It might be to do with the particular annotations/mappings
> that
> > > you have on your Device class.
> > >
> > > Thanks
> > > Dan
> > >
> > >
> > >
> > > [1]
> > >
> > >
> >
> https://github.com/apache/isis/blob/rel/isis-1.11.1/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializer.java
> > >
> > > On 25 January 2016 at 08:04, Martin Grigorov <mg...@apache.org>
> > wrote:
> > >
> > > > Hi,
> > > >
> > > > I believe there are two issues here:
> > > >
> > > > 1) Isis doesn't extract the primary key
> > > (4028dd814d2213d8014d2213d8610000)
> > > > from
> > "4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device"
> > > > before passing it to DataNucleus
> > > > 2) DataNucleus uses misleading exception message. The method call is
> > > > #getObjectById().
> > > > I guess it uses something like JDOQL with template object, e.g.
> > > > Device device = new Device();
> > > >
> > > >
> > >
> >
> device.setId("4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device");
> > > >  // 1
> > > > SELECT * FROM Device dev WHERE dev.getId() = device.getId();
> > > >
> > > > and it fails at [1].
> > > >
> > > > I have no experience with DataNucleus so this is just a guess. And
> the
> > > > given JDOQL above is most probably very wrong, but you get the idea.
> > > >
> > > > Martin Grigorov
> > > > Wicket Training and Consulting
> > > > https://twitter.com/mtgrigorov
> > > >
> > > > On Mon, Jan 25, 2016 at 2:39 AM, Chuangyu <zh...@gmail.com>
> > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I met an error when try a GET method with Swagger UI.
> > > > >
> > > > > The url is below:
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> http://localhost:8080/restful/objects/tm.dom.modules.assets.Device/4028dd814d2213d8014d2213d8610000
> > > > >
> > > > >
> > > > > "4028dd814d2213d8014d2213d8610000" is a uuid string which length is
> > 32.
> > > > >
> > > > >  curl command as below:
> > > > >
> > > > > curl -X GET --header "Accept:
> > > > > application/json;profile=urn:org.apache.isis/v1" --header
> > > > > "Authorization: Basic c3lzdGVtLWFkbWluOmdvb2dmcmllbmc="
> > > > > "
> > > > >
> > > >
> > >
> >
> http://localhost:8080/restful/objects/tm.dom.modules.assets.Device/4028dd814d2213d8014d2213d8610000
> > > > > "
> > > > >
> > > > >
> > > > > error message sa below:
> > > > >
> > > > > { "className": "javax.jdo.JDOFatalUserException", "message":
> "Attempt
> > > to
> > > > > store value
> > > > >
> \"4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device\"
> > > in
> > > > > column \"id\" that has maximum length of 32. Please correct your
> > > data!",
> > > > "
> > > > > stackTrace": [
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:616)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1728)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1741)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadPojo(PersistenceSession.java:885)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:866)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:859)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadObjectInTransaction(PersistenceSession.java:858)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.adapterForAny(PersistenceSession.java:1507)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapter(OidUtils.java:60)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapterElseNull(OidUtils.java:40)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseNull(ResourceAbstract.java:151)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseThrowNotFound(ResourceAbstract.java:141)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside.object(DomainObjectResourceServerside.java:123)",
> > > > > "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
> > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> > > > > "java.lang.reflect.Method.invoke(Method.java:497)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)",
> > > > > "javax.servlet.http.HttpServlet.service(HttpServlet.java:790)",
> > > > >
> > >
> "org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects.doFilter(IsisTransactionFilterForRestfulObjects.java:46)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.IsisSessionFilter.doFilter(IsisSessionFilter.java:338)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)",
> > > > > "org.eclipse.jetty.server.Server.handle(Server.java:499)",
> > > > >
> "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)",
> > > > > "java.lang.Thread.run(Thread.java:745)" ], "causedBy": {
> "className":
> > > > > "org.datanucleus.exceptions.NucleusUserException", "message":
> > "Attempt
> > > to
> > > > > store value
> > > > >
> \"4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device\"
> > > in
> > > > > column \"id\" that has maximum length of 32. Please correct your
> > > data!",
> > > > "
> > > > > stackTrace": [
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.mapping.datastore.CharRDBMSMapping.setString(CharRDBMSMapping.java:254)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping.setString(SingleFieldMapping.java:180)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.fieldmanager.ParameterSetter.storeStringField(ParameterSetter.java:158)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.AbstractStateManager.providedStringField(AbstractStateManager.java:1448)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.providedStringField(StateManagerImpl.java:120)",
> > > > > "tm.dom.modules.IdEntity.dnProvideField(IdEntity.java)",
> > > > > "tm.dom.modules.assets.Device.dnProvideField(Device.java)",
> > > > > "tm.dom.modules.IdEntity.dnProvideFields(IdEntity.java)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.provideFields(StateManagerImpl.java:1170)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.request.FetchRequest.execute(FetchRequest.java:333)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.RDBMSPersistenceHandler.fetchObject(RDBMSPersistenceHandler.java:319)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.AbstractStateManager.loadFieldsFromDatastore(AbstractStateManager.java:1147)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.validate(StateManagerImpl.java:4289)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3608)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1723)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1741)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadPojo(PersistenceSession.java:885)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:866)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:859)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadObjectInTransaction(PersistenceSession.java:858)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.adapterForAny(PersistenceSession.java:1507)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapter(OidUtils.java:60)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapterElseNull(OidUtils.java:40)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseNull(ResourceAbstract.java:151)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseThrowNotFound(ResourceAbstract.java:141)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside.object(DomainObjectResourceServerside.java:123)",
> > > > > "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
> > > > >
> > > > >
> > > >
> > >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> > > > > "java.lang.reflect.Method.invoke(Method.java:497)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)",
> > > > > "javax.servlet.http.HttpServlet.service(HttpServlet.java:790)",
> > > > >
> > >
> "org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects.doFilter(IsisTransactionFilterForRestfulObjects.java:46)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.IsisSessionFilter.doFilter(IsisSessionFilter.java:338)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)",
> > > > > "org.eclipse.jetty.server.Server.handle(Server.java:499)",
> > > > >
> "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)",
> > > > >
> > > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)",
> > > > > "java.lang.Thread.run(Thread.java:745)" ], "causedBy": null } }
> > > > >
> > > > > I don't know why a GET method lead to a store action ?
> > > > >
> > > >
> > >
> >
>

Re: why a GET method would store value to database?

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Ok, James, thanks for taking the time to look into.
Will take a look later this week,try to get to the bottom of it .
Thx, Dan
On 1 Feb 2016 12:45, "Chuangyu" <zh...@gmail.com> wrote:

> Hi, Dan,
>
> I replay the error with simpleapp.
>
> There is one new class called IdEntity, and modify SimpleObject to extends
> IdEntity.
>
> public class IdEntity {
> protected String id;
>
> @javax.jdo.annotations.Persistent(primaryKey="true",valueStrategy=javax.jdo.annotations.IdGeneratorStrategy.UUIDHEX)
> @javax.jdo.annotations.Column(jdbcType="CHAR",length=32)
> @Property(hidden=Where.ANYWHERE)
> public String getId(){
> return this.id;
> }
> public void setId(String id){
> this.id=id;
> }
> private Long createdAt;
> @Property(hidden=Where.EVERYWHERE)
> @javax.jdo.annotations.Column(name="created_at",allowsNull="true")
> public Long getCreatedAt(){
> return this.createdAt;
> }
> public void setCreatedAt(Long time){
> this.createdAt=time;
> }
> private Long updatedAt;
> @Property(hidden=Where.EVERYWHERE)
> @javax.jdo.annotations.Column(name="updated_at",allowsNull="true")
> public Long getUpdatedAt(){
> return this.updatedAt;
> }
> public void setUpdatedAt(Long time){
> this.updatedAt=time;
> }
>
> public void persisting(){
> this.createdAt=clockService.nowAsMillis();
> }
> @javax.inject.Inject
> protected ClockService clockService;
> }
>
>
> @javax.jdo.annotations.PersistenceCapable(
>         table = "SimpleObject",
>         identityType=IdentityType.APPLICATION
> )
> //@javax.jdo.annotations.DatastoreIdentity(
> //        strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY,
> //         column="id")
> //@javax.jdo.annotations.Version(
> //        strategy=VersionStrategy.VERSION_NUMBER,
> //        strategy= VersionStrategy.DATE_TIME,
> //        column="version")
> @javax.jdo.annotations.Queries({
>         @javax.jdo.annotations.Query(
>                 name = "find", language = "JDOQL",
>                 value = "SELECT "
>                         + "FROM domainapp.dom.simple.SimpleObject "),
>         @javax.jdo.annotations.Query(
>                 name = "findByName", language = "JDOQL",
>                 value = "SELECT "
>                         + "FROM domainapp.dom.simple.SimpleObject "
>                         + "WHERE name.indexOf(:name) >= 0 ")
> })
> @javax.jdo.annotations.Unique(name="SimpleObject_name_UNQ", members =
> {"name"})
> @DomainObject
> @DomainObjectLayout(
>         bookmarking = BookmarkPolicy.AS_ROOT
> )
> public class SimpleObject extends IdEntity implements
> Comparable<SimpleObject> {
>
>     public static final int NAME_LENGTH = 40;
>
>
>     public TranslatableString title() {
>         return TranslatableString.tr("Object: {name}", "name", getName());
>     }
>
>     public static class NameDomainEvent extends
> PropertyDomainEvent<SimpleObject,String> {}
>     @javax.jdo.annotations.Column(
>             allowsNull="false",
>             length = NAME_LENGTH
>     )
>     @Property(
>             editing = Editing.DISABLED
>     )
>     @PropertyLayout(
>             namedEscaped = false
>     )
>     private String name;
>     public String getName() {
>         return name;
>     }
>     public void setName(final String name) {
>         this.name = name;
>     }
>
>
>
>     public static class UpdateNameDomainEvent extends
> ActionDomainEvent<SimpleObject> {}
>     @Action(
>             domainEvent = UpdateNameDomainEvent.class,
>             semantics = SemanticsOf.IDEMPOTENT
>     )
>     public SimpleObject updateName(
>             @Parameter(maxLength = NAME_LENGTH)
>             @ParameterLayout(named = "New name")
>             final String name) {
>         setName(name);
>         return this;
>     }
>     public String default0UpdateName() {
>         return getName();
>     }
>     public TranslatableString validateUpdateName(final String name) {
>         return name.contains("!")? TranslatableString.tr("Exclamation mark
> is not allowed"): null;
>     }
>
>
>
>     public static class DeleteDomainEvent extends
> ActionDomainEvent<SimpleObject> {}
>     @Action(
>             domainEvent = DeleteDomainEvent.class,
>             semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE
>     )
>     public void delete() {
>         container.removeIfNotAlready(this);
>     }
>
>
>     /**
>      * version (derived property)
>      */
>     public Integer getVersionSequence() {
>         return (Integer) JDOHelper.getVersion(this);
>     }
>
>
>     @Override
>     public int compareTo(final SimpleObject other) {
>         return ObjectContracts.compare(this, other, "name");
>     }
>
>
>     @javax.inject.Inject
>     @SuppressWarnings("unused")
>     private DomainObjectContainer container;
>
> }
>
> The error message is same as "Attempt to store value...".
>
> Regards,
> James
>
> 2016-01-25 19:18 GMT+08:00 Dan Haywood <da...@haywood-associates.co.uk>:
>
> > As Martin says, the DN error is perhaps a bit misleading ... I believe
> the
> > "store" action here is DN repopulating the pojo with data from the
> > database, rather than the other way around.
> >
> > In Isis the JdoObjectIdSerializer class [1] is responsible for converting
> > between the Isis RootOid and the DN ObjectId; the format "
> > 4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device" is a
> > valid value for the OID,
> >
> > Could you provide a test example based on simpleapp that demonstrates the
> > problem?  It might be to do with the particular annotations/mappings that
> > you have on your Device class.
> >
> > Thanks
> > Dan
> >
> >
> >
> > [1]
> >
> >
> https://github.com/apache/isis/blob/rel/isis-1.11.1/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializer.java
> >
> > On 25 January 2016 at 08:04, Martin Grigorov <mg...@apache.org>
> wrote:
> >
> > > Hi,
> > >
> > > I believe there are two issues here:
> > >
> > > 1) Isis doesn't extract the primary key
> > (4028dd814d2213d8014d2213d8610000)
> > > from
> "4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device"
> > > before passing it to DataNucleus
> > > 2) DataNucleus uses misleading exception message. The method call is
> > > #getObjectById().
> > > I guess it uses something like JDOQL with template object, e.g.
> > > Device device = new Device();
> > >
> > >
> >
> device.setId("4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device");
> > >  // 1
> > > SELECT * FROM Device dev WHERE dev.getId() = device.getId();
> > >
> > > and it fails at [1].
> > >
> > > I have no experience with DataNucleus so this is just a guess. And the
> > > given JDOQL above is most probably very wrong, but you get the idea.
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Mon, Jan 25, 2016 at 2:39 AM, Chuangyu <zh...@gmail.com>
> > wrote:
> > >
> > > > Hi,
> > > >
> > > > I met an error when try a GET method with Swagger UI.
> > > >
> > > > The url is below:
> > > >
> > > >
> > > >
> > >
> >
> http://localhost:8080/restful/objects/tm.dom.modules.assets.Device/4028dd814d2213d8014d2213d8610000
> > > >
> > > >
> > > > "4028dd814d2213d8014d2213d8610000" is a uuid string which length is
> 32.
> > > >
> > > >  curl command as below:
> > > >
> > > > curl -X GET --header "Accept:
> > > > application/json;profile=urn:org.apache.isis/v1" --header
> > > > "Authorization: Basic c3lzdGVtLWFkbWluOmdvb2dmcmllbmc="
> > > > "
> > > >
> > >
> >
> http://localhost:8080/restful/objects/tm.dom.modules.assets.Device/4028dd814d2213d8014d2213d8610000
> > > > "
> > > >
> > > >
> > > > error message sa below:
> > > >
> > > > { "className": "javax.jdo.JDOFatalUserException", "message": "Attempt
> > to
> > > > store value
> > > > \"4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device\"
> > in
> > > > column \"id\" that has maximum length of 32. Please correct your
> > data!",
> > > "
> > > > stackTrace": [
> > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:616)",
> > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1728)",
> > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1741)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadPojo(PersistenceSession.java:885)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:866)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:859)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadObjectInTransaction(PersistenceSession.java:858)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.adapterForAny(PersistenceSession.java:1507)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapter(OidUtils.java:60)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapterElseNull(OidUtils.java:40)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseNull(ResourceAbstract.java:151)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseThrowNotFound(ResourceAbstract.java:141)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside.object(DomainObjectResourceServerside.java:123)",
> > > > "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > > >
> > > >
> > >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
> > > >
> > > >
> > >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> > > > "java.lang.reflect.Method.invoke(Method.java:497)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)",
> > > > "javax.servlet.http.HttpServlet.service(HttpServlet.java:790)",
> > > >
> > "org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects.doFilter(IsisTransactionFilterForRestfulObjects.java:46)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.IsisSessionFilter.doFilter(IsisSessionFilter.java:338)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)",
> > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)",
> > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)",
> > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)",
> > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)",
> > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)",
> > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)",
> > > > "org.eclipse.jetty.server.Server.handle(Server.java:499)",
> > > > "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)",
> > > > "java.lang.Thread.run(Thread.java:745)" ], "causedBy": { "className":
> > > > "org.datanucleus.exceptions.NucleusUserException", "message":
> "Attempt
> > to
> > > > store value
> > > > \"4028dd814d2213d8014d2213d8610000[OID]tm.dom.modules.assets.Device\"
> > in
> > > > column \"id\" that has maximum length of 32. Please correct your
> > data!",
> > > "
> > > > stackTrace": [
> > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.mapping.datastore.CharRDBMSMapping.setString(CharRDBMSMapping.java:254)",
> > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.mapping.java.SingleFieldMapping.setString(SingleFieldMapping.java:180)",
> > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.fieldmanager.ParameterSetter.storeStringField(ParameterSetter.java:158)",
> > > >
> > > >
> > >
> >
> "org.datanucleus.state.AbstractStateManager.providedStringField(AbstractStateManager.java:1448)",
> > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.providedStringField(StateManagerImpl.java:120)",
> > > > "tm.dom.modules.IdEntity.dnProvideField(IdEntity.java)",
> > > > "tm.dom.modules.assets.Device.dnProvideField(Device.java)",
> > > > "tm.dom.modules.IdEntity.dnProvideFields(IdEntity.java)",
> > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.provideFields(StateManagerImpl.java:1170)",
> > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.request.FetchRequest.execute(FetchRequest.java:333)",
> > > >
> > > >
> > >
> >
> "org.datanucleus.store.rdbms.RDBMSPersistenceHandler.fetchObject(RDBMSPersistenceHandler.java:319)",
> > > >
> > > >
> > >
> >
> "org.datanucleus.state.AbstractStateManager.loadFieldsFromDatastore(AbstractStateManager.java:1147)",
> > > >
> > > >
> > >
> >
> "org.datanucleus.state.StateManagerImpl.validate(StateManagerImpl.java:4289)",
> > > >
> > > >
> > >
> >
> "org.datanucleus.ExecutionContextImpl.findObject(ExecutionContextImpl.java:3608)",
> > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1723)",
> > > >
> > > >
> > >
> >
> "org.datanucleus.api.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1741)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadPojo(PersistenceSession.java:885)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:866)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession$2.execute(PersistenceSession.java:859)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.transaction.IsisTransactionManager.executeWithinTransaction(IsisTransactionManager.java:216)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.loadObjectInTransaction(PersistenceSession.java:858)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.runtime.system.persistence.PersistenceSession.adapterForAny(PersistenceSession.java:1507)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapter(OidUtils.java:60)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.util.OidUtils.getObjectAdapterElseNull(OidUtils.java:40)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseNull(ResourceAbstract.java:151)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.ResourceAbstract.getObjectAdapterElseThrowNotFound(ResourceAbstract.java:141)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.resources.DomainObjectResourceServerside.object(DomainObjectResourceServerside.java:123)",
> > > > "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > > >
> > > >
> > >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)",
> > > >
> > > >
> > >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> > > > "java.lang.reflect.Method.invoke(Method.java:497)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)",
> > > >
> > > >
> > >
> >
> "org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)",
> > > > "javax.servlet.http.HttpServlet.service(HttpServlet.java:790)",
> > > >
> > "org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects.doFilter(IsisTransactionFilterForRestfulObjects.java:46)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.IsisSessionFilter.doFilter(IsisSessionFilter.java:338)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > >
> > > >
> > >
> >
> "org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter.doFilter(IsisLogOnExceptionFilter.java:52)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)",
> > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)",
> > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)",
> > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)",
> > > >
> > > >
> > >
> >
> "org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)",
> > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)",
> > > >
> > > >
> > >
> >
> "org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)",
> > > > "org.eclipse.jetty.server.Server.handle(Server.java:499)",
> > > > "org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)",
> > > >
> > > >
> > >
> >
> "org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)",
> > > > "java.lang.Thread.run(Thread.java:745)" ], "causedBy": null } }
> > > >
> > > > I don't know why a GET method lead to a store action ?
> > > >
> > >
> >
>