You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Mark Wood-Patrick <mw...@nvidia.com> on 2013/01/24 18:16:56 UTC

problem using firefox REST tool with archetype

I was trying to post:

{
    "description": "Eat Seaweed",
    "category": "OTHER",
    "dueBy": "Jan 23, 2013"
}

To an instance of the archetype using URL:

        http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoItemsJdo:1/actions/newToDo/invoke

using the Firefox REST tool with current archetype

And I got:

{
  "message": "Unknown enum constant 'OTHER'",
  "stackTrace": [
    "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueSemanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
    "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueSemanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
    "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueSemanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
    "org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFacetAbstract.java:261)",
    "org.apache.isis.core.progmodel.facets.object.encodeable.EncodableFacetUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderDecoder.java:60)",
    "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
    "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:332)",
    "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)",
    "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)",
    "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.java:270)",
    "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
    "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainObjectResourceServerside.invokeAction(DomainObjectResourceServerside.java:407)",
    "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
    "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)",
    "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
    "java.lang.reflect.Method.invoke(Method.java:601)",
    "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)",
    "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)",
    "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)",
    "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)",
    "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)",
    "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)",
    "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)",
    "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)",

Anyone know what I'm doing wrong?

Mark Wood-Patrick
Performance Infrastructure Lead
e-mail: mwoodpatrick@nvidia.com<ma...@nvidia.com>
Building/Cube: SC B31.3084
Primary Office: please use cell # below (+1 408 486-2757)
Cell:    408-627-5025
Fax: 408 486-4757
Mailstop/Mailbox: MS-10 / B307

 (\__/)
 (='.'=)
 (")_(")




-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

Re: problem using firefox REST tool with archetype

Posted by Jeroen van der Wal <je...@stromboli.it>.
The next issue you'll probably encounter is the parsing of the date.
Try "20130123T000000000"
when that occurs.


On Thu, Jan 24, 2013 at 6:55 PM, Dan Haywood
<da...@haywood-associates.co.uk>wrote:

> Hi Mark,
>
> Just looking at the code, the Category enum is defined as:
>
>     public static enum Category {
>         Professional, Domestic, Other;
>     }
>
> So try "Other" instead of "OTHER".
>
> Did you get a 400 response code (you should have)?
>
> Let me know...
> Dan
>
> On 24 January 2013 17:16, Mark Wood-Patrick <mw...@nvidia.com>
> wrote:
>
> > I was trying to post:
> >
> > {
> >     "description": "Eat Seaweed",
> >     "category": "OTHER",
> >     "dueBy": "Jan 23, 2013"
> > }
> >
> > To an instance of the archetype using URL:
> >
> >
> >
> http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoItemsJdo:1/actions/newToDo/invoke
> >
> > using the Firefox REST tool with current archetype
> >
> > And I got:
> >
> > {
> >   "message": "Unknown enum constant 'OTHER'",
> >   "stackTrace": [
> >
> >
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueSemanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
> >
> >
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueSemanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
> >
> >
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueSemanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
> >
> >
> "org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFacetAbstract.java:261)",
> >
> >
> "org.apache.isis.core.progmodel.facets.object.encodeable.EncodableFacetUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderDecoder.java:60)",
> >
> >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
> >
> >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:332)",
> >
> >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)",
> >
> >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)",
> >
> >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.java:270)",
> >
> >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
> >
> >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainObjectResourceServerside.invokeAction(DomainObjectResourceServerside.java:407)",
> >     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> >
> >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)",
> >
> >
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
> >     "java.lang.reflect.Method.invoke(Method.java:601)",
> >
> >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)",
> >
> >
> "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)",
> >
> > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)",
> >
> > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)",
> >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)",
> >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)",
> >
> >
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)",
> >
> >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)",
> >
> > Anyone know what I'm doing wrong?
> >
> > Mark Wood-Patrick
> > Performance Infrastructure Lead
> > e-mail: mwoodpatrick@nvidia.com<ma...@nvidia.com>
> > Building/Cube: SC B31.3084
> > Primary Office: please use cell # below (+1 408 486-2757)
> > Cell:    408-627-5025
> > Fax: 408 486-4757
> > Mailstop/Mailbox: MS-10 / B307
> >
> >  (\__/)
> >  (='.'=)
> >  (")_(")
> >
> >
> >
> >
> >
> >
> -----------------------------------------------------------------------------------
> > This email message is for the sole use of the intended recipient(s) and
> > may contain
> > confidential information.  Any unauthorized review, use, disclosure or
> > distribution
> > is prohibited.  If you are not the intended recipient, please contact the
> > sender by
> > reply email and destroy all copies of the original message.
> >
> >
> -----------------------------------------------------------------------------------
> >
>

Re: problem using firefox REST tool with archetype

Posted by Jeroen van der Wal <je...@stromboli.it>.
I don'n know exactly what you're aiming for but you could make that action
that you call idempotent.

This is a snippet of an api that we use to update and create using a single
method:

@Hidden
public class Api extends AbstractFactoryAndRepository {

    ...

    @ActionSemantics(Of.IDEMPOTENT)
    public void putPerson(
            @Named("reference") String reference,
            @Named("initials") @Optional String initials,
            @Named("firstName") String firstName,
            @Named("lastName") String lastName) {
        Person person = (Person) parties.findPartyByReference(reference);
        if (person == null) {
            person = parties.newPerson(initials, firstName, lastName);
            person.setReference(reference);
        }
        person.setFirstName(firstName)
        person.setLastName(lastName);
    }

   ...

    private Parties parties;

public void setPartyRepository(final Parties parties) {

        this.parties = parties;

    }

}


On Sat, Jan 26, 2013 at 6:14 PM, Mark Wood-Patrick
<mw...@gmail.com>wrote:

> Are there any plans for the Restful Objects API to support the patch http
> verb (aka upsert) there by saving a round trip?
>
> Mark
>
> -----Original Message-----
> From: Mark Wood-Patrick [mailto:mwoodpatrick@gmail.com]
> Sent: Friday, January 25, 2013 9:57 PM
> To: 'users@isis.apache.org'
> Cc: 'dev'
> Subject: RE: problem using firefox REST tool with archetype
>
> Many thanks, very much appreciated.
>
> Mark
>
> -----Original Message-----
> From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
> Sent: Friday, January 25, 2013 9:16 AM
> To: users@isis.apache.org
> Cc: dev
> Subject: Re: problem using firefox REST tool with archetype
>
> Glad you are now going, Mark.
>
> Nevertheless, I've raised ISIS-318 because this should have returned a 400,
> not a 500.
>
> fyi, although we've put out RO Viewer 1.0.0, do note that it doesn't yet
> implement Restful Objects spec 1.0.0.  And it's new code, so there are
> bound
> to be some rough issues.
>
> Jeroen is probably the expert in terms of using it from a client-side
> perspective; on the project we're working on together, he's using the RO
> API
> as a way to migrate all the data from an old system onto the new app.
>  So it is getting a good workout, but in a fairly narrow way.
>
> To your question about regression tests, there aren't really any.  Which
> isn't good enough, I know; but when I was writing that code I was also
> trying to keep up with Richard and Stef who were doing the .NET impl, as
> well as write the RO spec at the same time... I took some corners.  One or
> two people on the dev mailing list have offered to backfill these tests,
> but
> that was a while ago and there's been no contributions, so I suspect I may
> need to get round to it myself.
>
> In the meantime, if you do hit any showstoppers, I'll certainly do my best
> to resolve them, though you may need to build the code from source for
> expediency's sake.
>
> Cheers
> Dan
>
> On 25 January 2013 16:52, Mark Wood-Patrick <mw...@gmail.com>
> wrote:
>
> > Actually that content worked,
> >
> > Many thanks
> >
> > Very much appreciated
> >
> > Mark
> >
> > -----Original Message-----
> > From: Jeroen van der Wal [mailto:jeroen@stromboli.it]
> > Sent: Friday, January 25, 2013 8:01 AM
> > To: users@isis.apache.org
> > Subject: Re: problem using firefox REST tool with archetype
> >
> > Hi Mark, perhaps you could share the raw respones body which shows the
> > stacktrace.
> >
> > Futhermore, I've tested with
> >
> > {
> >     "description": "Eat Seaweed",
> >     "category": "Other",
> >     "dueBy": "20130123T000000000"
> > }
> >
> > and that works fine.
> >
> >
> >
> >
> >
> > On Fri, Jan 25, 2013 at 4:46 PM, Mark Wood-Patrick
> > <mw...@gmail.com>wrote:
> >
> > > Anyone know what's going on here?
> > >
> > > This is currently blocking for me. Does this work for other folks?
> > >
> > > What regression tests do we have to verify that this should work?
> > >
> > > Mark
> > >
> > > -----Original Message-----
> > > From: Mark Wood-Patrick [mailto:mwoodpatrick@gmail.com]
> > > Sent: Thursday, January 24, 2013 11:53 AM
> > > To: users@isis.apache.org
> > > Subject: RE: problem using firefox REST tool with archetype
> > >
> > > No I got a Status Code: 500 Server Error
> > >
> > > Changing the capitalization as you suggested did not help
> > >
> > > Are you able to repro the issue or does it work for you?
> > >
> > > Mark
> > >
> > > -----Original Message-----
> > > From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
> > > Sent: Thursday, January 24, 2013 9:55 AM
> > > To: users@isis.apache.org
> > > Subject: Re: problem using firefox REST tool with archetype
> > >
> > > Hi Mark,
> > >
> > > Just looking at the code, the Category enum is defined as:
> > >
> > >     public static enum Category {
> > >         Professional, Domestic, Other;
> > >     }
> > >
> > > So try "Other" instead of "OTHER".
> > >
> > > Did you get a 400 response code (you should have)?
> > >
> > > Let me know...
> > > Dan
> > >
> > > On 24 January 2013 17:16, Mark Wood-Patrick
> > > <mw...@nvidia.com>
> > > wrote:
> > >
> > > > I was trying to post:
> > > >
> > > > {
> > > >     "description": "Eat Seaweed",
> > > >     "category": "OTHER",
> > > >     "dueBy": "Jan 23, 2013"
> > > > }
> > > >
> > > > To an instance of the archetype using URL:
> > > >
> > > >
> > > > http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoIte
> > > > ms
> > > > Jd
> > > > o:1/actions/newToDo/invoke
> > > >
> > > > using the Firefox REST tool with current archetype
> > > >
> > > > And I got:
> > > >
> > > > {
> > > >   "message": "Unknown enum constant 'OTHER'",
> > > >   "stackTrace": [
> > > >
> > > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > > lu eS
> > > > emanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
> > > >
> > > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > > lu eS
> > > > emanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
> > > >
> > > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > > lu eS
> > > > emanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
> > > >
> > > > "org.apache.isis.core.progmodel.facets.object.value.ValueSemantics
> > > > Pr
> > > > ov
> > > > iderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFa
> > > > ce
> > > > tA
> > > > bstract.java:261)",
> > > >
> > > > "org.apache.isis.core.progmodel.facets.object.encodeable.Encodable
> > > > Fa
> > > > ce
> > > > tUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderD
> > > > ec
> > > > od
> > > > er.java:60)",
> > > >
> > > >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > > JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
> > > >
> > > >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > > DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:33
> > > > 2)
> > > > ",
> > > >
> > > >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > > DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)
> > > > ",
> > > >
> > > >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > > DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)
> > > > ",
> > > >
> > > >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > > DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.
> > > > ja
> > > > va:270)",
> > > >
> > > >
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > > DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
> > > >
> > > >
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > Domain
> > >
> > > ObjectResourceServerside.invokeAction(DomainObjectResourceServerside
> > > .j
> > > ava:40
> > > 7)",
> > > >     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > > >
> > > >
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > > java:57)",
> > > >
> > > >
> > >
> > > "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc
> > > es
> > > sorImp
> > > l.java:43)",
> > > >     "java.lang.reflect.Method.invoke(Method.java:601)",
> > > >
> > > >
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
> > > > java:155)",
> > > >
> > > >
> "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
> > > > java:257)",
> > > >
> > > > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java
> > > > :2
> > > > 22
> > > > )",
> > > >
> > > > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java
> > > > :2
> > > > 11
> > > > )",
> > > >
> > > > "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(Synchro
> > > > no
> > > > us
> > > > Dispatcher.java:525)",
> > > >
> > > > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousD
> > > > is
> > > > pa
> > > > tcher.java:502)",
> > > >
> > > > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousD
> > > > is
> > > > pa
> > > > tcher.java:119)",
> > > >
> > > >
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.
> > > > service(ServletContainerDispatcher.java:208)",
> > > >
> > > > Anyone know what I'm doing wrong?
> > > >
> > > > Mark Wood-Patrick
> > > > Performance Infrastructure Lead
> > > > e-mail: mwoodpatrick@nvidia.com<ma...@nvidia.com>
> > > > Building/Cube: SC B31.3084
> > > > Primary Office: please use cell # below (+1 408 486-2757)
> > > > Cell:    408-627-5025
> > > > Fax: 408 486-4757
> > > > Mailstop/Mailbox: MS-10 / B307
> > > >
> > > >  (\__/)
> > > >  (='.'=)
> > > >  (")_(")
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ------------------------------------------------------------------
> > > > --
> > > > --
> > > > ------------- This email message is for the sole use of the
> > > > intended
> > > > recipient(s) and may contain confidential information.  Any
> > > > unauthorized review, use, disclosure or distribution is prohibited.
> > > > If you are not the intended recipient, please contact the sender
> > > > by reply email and destroy all copies of the original message.
> > > >
> > > > ------------------------------------------------------------------
> > > > --
> > > > --
> > > > -------------
> > > >
> > >
> > >
> > >
> >
> >
>
>

RE: problem using firefox REST tool with archetype

Posted by Mark Wood-Patrick <mw...@gmail.com>.
Are there any plans for the Restful Objects API to support the patch http
verb (aka upsert) there by saving a round trip?

Mark

-----Original Message-----
From: Mark Wood-Patrick [mailto:mwoodpatrick@gmail.com] 
Sent: Friday, January 25, 2013 9:57 PM
To: 'users@isis.apache.org'
Cc: 'dev'
Subject: RE: problem using firefox REST tool with archetype

Many thanks, very much appreciated.

Mark

-----Original Message-----
From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
Sent: Friday, January 25, 2013 9:16 AM
To: users@isis.apache.org
Cc: dev
Subject: Re: problem using firefox REST tool with archetype

Glad you are now going, Mark.

Nevertheless, I've raised ISIS-318 because this should have returned a 400,
not a 500.

fyi, although we've put out RO Viewer 1.0.0, do note that it doesn't yet
implement Restful Objects spec 1.0.0.  And it's new code, so there are bound
to be some rough issues.

Jeroen is probably the expert in terms of using it from a client-side
perspective; on the project we're working on together, he's using the RO API
as a way to migrate all the data from an old system onto the new app.
 So it is getting a good workout, but in a fairly narrow way.

To your question about regression tests, there aren't really any.  Which
isn't good enough, I know; but when I was writing that code I was also
trying to keep up with Richard and Stef who were doing the .NET impl, as
well as write the RO spec at the same time... I took some corners.  One or
two people on the dev mailing list have offered to backfill these tests, but
that was a while ago and there's been no contributions, so I suspect I may
need to get round to it myself.

In the meantime, if you do hit any showstoppers, I'll certainly do my best
to resolve them, though you may need to build the code from source for
expediency's sake.

Cheers
Dan

On 25 January 2013 16:52, Mark Wood-Patrick <mw...@gmail.com> wrote:

> Actually that content worked,
>
> Many thanks
>
> Very much appreciated
>
> Mark
>
> -----Original Message-----
> From: Jeroen van der Wal [mailto:jeroen@stromboli.it]
> Sent: Friday, January 25, 2013 8:01 AM
> To: users@isis.apache.org
> Subject: Re: problem using firefox REST tool with archetype
>
> Hi Mark, perhaps you could share the raw respones body which shows the 
> stacktrace.
>
> Futhermore, I've tested with
>
> {
>     "description": "Eat Seaweed",
>     "category": "Other",
>     "dueBy": "20130123T000000000"
> }
>
> and that works fine.
>
>
>
>
>
> On Fri, Jan 25, 2013 at 4:46 PM, Mark Wood-Patrick
> <mw...@gmail.com>wrote:
>
> > Anyone know what's going on here?
> >
> > This is currently blocking for me. Does this work for other folks?
> >
> > What regression tests do we have to verify that this should work?
> >
> > Mark
> >
> > -----Original Message-----
> > From: Mark Wood-Patrick [mailto:mwoodpatrick@gmail.com]
> > Sent: Thursday, January 24, 2013 11:53 AM
> > To: users@isis.apache.org
> > Subject: RE: problem using firefox REST tool with archetype
> >
> > No I got a Status Code: 500 Server Error
> >
> > Changing the capitalization as you suggested did not help
> >
> > Are you able to repro the issue or does it work for you?
> >
> > Mark
> >
> > -----Original Message-----
> > From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
> > Sent: Thursday, January 24, 2013 9:55 AM
> > To: users@isis.apache.org
> > Subject: Re: problem using firefox REST tool with archetype
> >
> > Hi Mark,
> >
> > Just looking at the code, the Category enum is defined as:
> >
> >     public static enum Category {
> >         Professional, Domestic, Other;
> >     }
> >
> > So try "Other" instead of "OTHER".
> >
> > Did you get a 400 response code (you should have)?
> >
> > Let me know...
> > Dan
> >
> > On 24 January 2013 17:16, Mark Wood-Patrick 
> > <mw...@nvidia.com>
> > wrote:
> >
> > > I was trying to post:
> > >
> > > {
> > >     "description": "Eat Seaweed",
> > >     "category": "OTHER",
> > >     "dueBy": "Jan 23, 2013"
> > > }
> > >
> > > To an instance of the archetype using URL:
> > >
> > >
> > > http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoIte
> > > ms
> > > Jd
> > > o:1/actions/newToDo/invoke
> > >
> > > using the Firefox REST tool with current archetype
> > >
> > > And I got:
> > >
> > > {
> > >   "message": "Unknown enum constant 'OTHER'",
> > >   "stackTrace": [
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > lu eS
> > > emanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > lu eS
> > > emanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > lu eS
> > > emanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.value.ValueSemantics
> > > Pr
> > > ov
> > > iderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFa
> > > ce
> > > tA
> > > bstract.java:261)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.encodeable.Encodable
> > > Fa
> > > ce
> > > tUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderD
> > > ec
> > > od
> > > er.java:60)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:33
> > > 2)
> > > ",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)
> > > ",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)
> > > ",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.
> > > ja
> > > va:270)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
> > >
> > >
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > Domain
> >
> > ObjectResourceServerside.invokeAction(DomainObjectResourceServerside
> > .j
> > ava:40
> > 7)",
> > >     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > >
> > > "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > java:57)",
> > >
> > >
> >
> > "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc
> > es
> > sorImp
> > l.java:43)",
> > >     "java.lang.reflect.Method.invoke(Method.java:601)",
> > >
> > > "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
> > > java:155)",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
> > > java:257)",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java
> > > :2
> > > 22
> > > )",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java
> > > :2
> > > 11
> > > )",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(Synchro
> > > no
> > > us
> > > Dispatcher.java:525)",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousD
> > > is
> > > pa
> > > tcher.java:502)",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousD
> > > is
> > > pa
> > > tcher.java:119)",
> > >
> > > "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.
> > > service(ServletContainerDispatcher.java:208)",
> > >
> > > Anyone know what I'm doing wrong?
> > >
> > > Mark Wood-Patrick
> > > Performance Infrastructure Lead
> > > e-mail: mwoodpatrick@nvidia.com<ma...@nvidia.com>
> > > Building/Cube: SC B31.3084
> > > Primary Office: please use cell # below (+1 408 486-2757)
> > > Cell:    408-627-5025
> > > Fax: 408 486-4757
> > > Mailstop/Mailbox: MS-10 / B307
> > >
> > >  (\__/)
> > >  (='.'=)
> > >  (")_(")
> > >
> > >
> > >
> > >
> > >
> > > ------------------------------------------------------------------
> > > --
> > > --
> > > ------------- This email message is for the sole use of the 
> > > intended
> > > recipient(s) and may contain confidential information.  Any 
> > > unauthorized review, use, disclosure or distribution is prohibited.
> > > If you are not the intended recipient, please contact the sender 
> > > by reply email and destroy all copies of the original message.
> > >
> > > ------------------------------------------------------------------
> > > --
> > > --
> > > -------------
> > >
> >
> >
> >
>
>


RE: problem using firefox REST tool with archetype

Posted by Mark Wood-Patrick <mw...@gmail.com>.
Are there any plans for the Restful Objects API to support the patch http
verb (aka upsert) there by saving a round trip?

Mark

-----Original Message-----
From: Mark Wood-Patrick [mailto:mwoodpatrick@gmail.com] 
Sent: Friday, January 25, 2013 9:57 PM
To: 'users@isis.apache.org'
Cc: 'dev'
Subject: RE: problem using firefox REST tool with archetype

Many thanks, very much appreciated.

Mark

-----Original Message-----
From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
Sent: Friday, January 25, 2013 9:16 AM
To: users@isis.apache.org
Cc: dev
Subject: Re: problem using firefox REST tool with archetype

Glad you are now going, Mark.

Nevertheless, I've raised ISIS-318 because this should have returned a 400,
not a 500.

fyi, although we've put out RO Viewer 1.0.0, do note that it doesn't yet
implement Restful Objects spec 1.0.0.  And it's new code, so there are bound
to be some rough issues.

Jeroen is probably the expert in terms of using it from a client-side
perspective; on the project we're working on together, he's using the RO API
as a way to migrate all the data from an old system onto the new app.
 So it is getting a good workout, but in a fairly narrow way.

To your question about regression tests, there aren't really any.  Which
isn't good enough, I know; but when I was writing that code I was also
trying to keep up with Richard and Stef who were doing the .NET impl, as
well as write the RO spec at the same time... I took some corners.  One or
two people on the dev mailing list have offered to backfill these tests, but
that was a while ago and there's been no contributions, so I suspect I may
need to get round to it myself.

In the meantime, if you do hit any showstoppers, I'll certainly do my best
to resolve them, though you may need to build the code from source for
expediency's sake.

Cheers
Dan

On 25 January 2013 16:52, Mark Wood-Patrick <mw...@gmail.com> wrote:

> Actually that content worked,
>
> Many thanks
>
> Very much appreciated
>
> Mark
>
> -----Original Message-----
> From: Jeroen van der Wal [mailto:jeroen@stromboli.it]
> Sent: Friday, January 25, 2013 8:01 AM
> To: users@isis.apache.org
> Subject: Re: problem using firefox REST tool with archetype
>
> Hi Mark, perhaps you could share the raw respones body which shows the 
> stacktrace.
>
> Futhermore, I've tested with
>
> {
>     "description": "Eat Seaweed",
>     "category": "Other",
>     "dueBy": "20130123T000000000"
> }
>
> and that works fine.
>
>
>
>
>
> On Fri, Jan 25, 2013 at 4:46 PM, Mark Wood-Patrick
> <mw...@gmail.com>wrote:
>
> > Anyone know what's going on here?
> >
> > This is currently blocking for me. Does this work for other folks?
> >
> > What regression tests do we have to verify that this should work?
> >
> > Mark
> >
> > -----Original Message-----
> > From: Mark Wood-Patrick [mailto:mwoodpatrick@gmail.com]
> > Sent: Thursday, January 24, 2013 11:53 AM
> > To: users@isis.apache.org
> > Subject: RE: problem using firefox REST tool with archetype
> >
> > No I got a Status Code: 500 Server Error
> >
> > Changing the capitalization as you suggested did not help
> >
> > Are you able to repro the issue or does it work for you?
> >
> > Mark
> >
> > -----Original Message-----
> > From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
> > Sent: Thursday, January 24, 2013 9:55 AM
> > To: users@isis.apache.org
> > Subject: Re: problem using firefox REST tool with archetype
> >
> > Hi Mark,
> >
> > Just looking at the code, the Category enum is defined as:
> >
> >     public static enum Category {
> >         Professional, Domestic, Other;
> >     }
> >
> > So try "Other" instead of "OTHER".
> >
> > Did you get a 400 response code (you should have)?
> >
> > Let me know...
> > Dan
> >
> > On 24 January 2013 17:16, Mark Wood-Patrick 
> > <mw...@nvidia.com>
> > wrote:
> >
> > > I was trying to post:
> > >
> > > {
> > >     "description": "Eat Seaweed",
> > >     "category": "OTHER",
> > >     "dueBy": "Jan 23, 2013"
> > > }
> > >
> > > To an instance of the archetype using URL:
> > >
> > >
> > > http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoIte
> > > ms
> > > Jd
> > > o:1/actions/newToDo/invoke
> > >
> > > using the Firefox REST tool with current archetype
> > >
> > > And I got:
> > >
> > > {
> > >   "message": "Unknown enum constant 'OTHER'",
> > >   "stackTrace": [
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > lu eS
> > > emanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > lu eS
> > > emanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > lu eS
> > > emanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.value.ValueSemantics
> > > Pr
> > > ov
> > > iderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFa
> > > ce
> > > tA
> > > bstract.java:261)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.encodeable.Encodable
> > > Fa
> > > ce
> > > tUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderD
> > > ec
> > > od
> > > er.java:60)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:33
> > > 2)
> > > ",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)
> > > ",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)
> > > ",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.
> > > ja
> > > va:270)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
> > >
> > >
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > Domain
> >
> > ObjectResourceServerside.invokeAction(DomainObjectResourceServerside
> > .j
> > ava:40
> > 7)",
> > >     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > >
> > > "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > java:57)",
> > >
> > >
> >
> > "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc
> > es
> > sorImp
> > l.java:43)",
> > >     "java.lang.reflect.Method.invoke(Method.java:601)",
> > >
> > > "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
> > > java:155)",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
> > > java:257)",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java
> > > :2
> > > 22
> > > )",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java
> > > :2
> > > 11
> > > )",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(Synchro
> > > no
> > > us
> > > Dispatcher.java:525)",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousD
> > > is
> > > pa
> > > tcher.java:502)",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousD
> > > is
> > > pa
> > > tcher.java:119)",
> > >
> > > "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.
> > > service(ServletContainerDispatcher.java:208)",
> > >
> > > Anyone know what I'm doing wrong?
> > >
> > > Mark Wood-Patrick
> > > Performance Infrastructure Lead
> > > e-mail: mwoodpatrick@nvidia.com<ma...@nvidia.com>
> > > Building/Cube: SC B31.3084
> > > Primary Office: please use cell # below (+1 408 486-2757)
> > > Cell:    408-627-5025
> > > Fax: 408 486-4757
> > > Mailstop/Mailbox: MS-10 / B307
> > >
> > >  (\__/)
> > >  (='.'=)
> > >  (")_(")
> > >
> > >
> > >
> > >
> > >
> > > ------------------------------------------------------------------
> > > --
> > > --
> > > ------------- This email message is for the sole use of the 
> > > intended
> > > recipient(s) and may contain confidential information.  Any 
> > > unauthorized review, use, disclosure or distribution is prohibited.
> > > If you are not the intended recipient, please contact the sender 
> > > by reply email and destroy all copies of the original message.
> > >
> > > ------------------------------------------------------------------
> > > --
> > > --
> > > -------------
> > >
> >
> >
> >
>
>


RE: problem using firefox REST tool with archetype

Posted by Mark Wood-Patrick <mw...@gmail.com>.
Many thanks, very much appreciated.

Mark

-----Original Message-----
From: Dan Haywood [mailto:dan@haywood-associates.co.uk] 
Sent: Friday, January 25, 2013 9:16 AM
To: users@isis.apache.org
Cc: dev
Subject: Re: problem using firefox REST tool with archetype

Glad you are now going, Mark.

Nevertheless, I've raised ISIS-318 because this should have returned a 400,
not a 500.

fyi, although we've put out RO Viewer 1.0.0, do note that it doesn't yet
implement Restful Objects spec 1.0.0.  And it's new code, so there are bound
to be some rough issues.

Jeroen is probably the expert in terms of using it from a client-side
perspective; on the project we're working on together, he's using the RO API
as a way to migrate all the data from an old system onto the new app.
 So it is getting a good workout, but in a fairly narrow way.

To your question about regression tests, there aren't really any.  Which
isn't good enough, I know; but when I was writing that code I was also
trying to keep up with Richard and Stef who were doing the .NET impl, as
well as write the RO spec at the same time... I took some corners.  One or
two people on the dev mailing list have offered to backfill these tests, but
that was a while ago and there's been no contributions, so I suspect I may
need to get round to it myself.

In the meantime, if you do hit any showstoppers, I'll certainly do my best
to resolve them, though you may need to build the code from source for
expediency's sake.

Cheers
Dan

On 25 January 2013 16:52, Mark Wood-Patrick <mw...@gmail.com> wrote:

> Actually that content worked,
>
> Many thanks
>
> Very much appreciated
>
> Mark
>
> -----Original Message-----
> From: Jeroen van der Wal [mailto:jeroen@stromboli.it]
> Sent: Friday, January 25, 2013 8:01 AM
> To: users@isis.apache.org
> Subject: Re: problem using firefox REST tool with archetype
>
> Hi Mark, perhaps you could share the raw respones body which shows the 
> stacktrace.
>
> Futhermore, I've tested with
>
> {
>     "description": "Eat Seaweed",
>     "category": "Other",
>     "dueBy": "20130123T000000000"
> }
>
> and that works fine.
>
>
>
>
>
> On Fri, Jan 25, 2013 at 4:46 PM, Mark Wood-Patrick
> <mw...@gmail.com>wrote:
>
> > Anyone know what's going on here?
> >
> > This is currently blocking for me. Does this work for other folks?
> >
> > What regression tests do we have to verify that this should work?
> >
> > Mark
> >
> > -----Original Message-----
> > From: Mark Wood-Patrick [mailto:mwoodpatrick@gmail.com]
> > Sent: Thursday, January 24, 2013 11:53 AM
> > To: users@isis.apache.org
> > Subject: RE: problem using firefox REST tool with archetype
> >
> > No I got a Status Code: 500 Server Error
> >
> > Changing the capitalization as you suggested did not help
> >
> > Are you able to repro the issue or does it work for you?
> >
> > Mark
> >
> > -----Original Message-----
> > From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
> > Sent: Thursday, January 24, 2013 9:55 AM
> > To: users@isis.apache.org
> > Subject: Re: problem using firefox REST tool with archetype
> >
> > Hi Mark,
> >
> > Just looking at the code, the Category enum is defined as:
> >
> >     public static enum Category {
> >         Professional, Domestic, Other;
> >     }
> >
> > So try "Other" instead of "OTHER".
> >
> > Did you get a 400 response code (you should have)?
> >
> > Let me know...
> > Dan
> >
> > On 24 January 2013 17:16, Mark Wood-Patrick 
> > <mw...@nvidia.com>
> > wrote:
> >
> > > I was trying to post:
> > >
> > > {
> > >     "description": "Eat Seaweed",
> > >     "category": "OTHER",
> > >     "dueBy": "Jan 23, 2013"
> > > }
> > >
> > > To an instance of the archetype using URL:
> > >
> > >
> > > http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoIte
> > > ms
> > > Jd
> > > o:1/actions/newToDo/invoke
> > >
> > > using the Firefox REST tool with current archetype
> > >
> > > And I got:
> > >
> > > {
> > >   "message": "Unknown enum constant 'OTHER'",
> > >   "stackTrace": [
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > lu eS 
> > > emanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > lu eS 
> > > emanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > lu eS 
> > > emanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.value.ValueSemantics
> > > Pr
> > > ov
> > > iderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFa
> > > ce
> > > tA
> > > bstract.java:261)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.encodeable.Encodable
> > > Fa
> > > ce
> > > tUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderD
> > > ec
> > > od
> > > er.java:60)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:33
> > > 2)
> > > ",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)
> > > ",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)
> > > ",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.
> > > ja
> > > va:270)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
> > >
> > >
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > Domain
> >
> > ObjectResourceServerside.invokeAction(DomainObjectResourceServerside
> > .j
> > ava:40
> > 7)",
> > >     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > >
> > > "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > java:57)",
> > >
> > >
> >
> > "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc
> > es
> > sorImp
> > l.java:43)",
> > >     "java.lang.reflect.Method.invoke(Method.java:601)",
> > >
> > > "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
> > > java:155)",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
> > > java:257)",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java
> > > :2
> > > 22
> > > )",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java
> > > :2
> > > 11
> > > )",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(Synchro
> > > no
> > > us
> > > Dispatcher.java:525)",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousD
> > > is
> > > pa
> > > tcher.java:502)",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousD
> > > is
> > > pa
> > > tcher.java:119)",
> > >
> > > "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.
> > > service(ServletContainerDispatcher.java:208)",
> > >
> > > Anyone know what I'm doing wrong?
> > >
> > > Mark Wood-Patrick
> > > Performance Infrastructure Lead
> > > e-mail: mwoodpatrick@nvidia.com<ma...@nvidia.com>
> > > Building/Cube: SC B31.3084
> > > Primary Office: please use cell # below (+1 408 486-2757)
> > > Cell:    408-627-5025
> > > Fax: 408 486-4757
> > > Mailstop/Mailbox: MS-10 / B307
> > >
> > >  (\__/)
> > >  (='.'=)
> > >  (")_(")
> > >
> > >
> > >
> > >
> > >
> > > ------------------------------------------------------------------
> > > --
> > > --
> > > ------------- This email message is for the sole use of the 
> > > intended
> > > recipient(s) and may contain confidential information.  Any 
> > > unauthorized review, use, disclosure or distribution is prohibited.
> > > If you are not the intended recipient, please contact the sender 
> > > by reply email and destroy all copies of the original message.
> > >
> > > ------------------------------------------------------------------
> > > --
> > > --
> > > -------------
> > >
> >
> >
> >
>
>


RE: problem using firefox REST tool with archetype

Posted by Mark Wood-Patrick <mw...@gmail.com>.
Many thanks, very much appreciated.

Mark

-----Original Message-----
From: Dan Haywood [mailto:dan@haywood-associates.co.uk] 
Sent: Friday, January 25, 2013 9:16 AM
To: users@isis.apache.org
Cc: dev
Subject: Re: problem using firefox REST tool with archetype

Glad you are now going, Mark.

Nevertheless, I've raised ISIS-318 because this should have returned a 400,
not a 500.

fyi, although we've put out RO Viewer 1.0.0, do note that it doesn't yet
implement Restful Objects spec 1.0.0.  And it's new code, so there are bound
to be some rough issues.

Jeroen is probably the expert in terms of using it from a client-side
perspective; on the project we're working on together, he's using the RO API
as a way to migrate all the data from an old system onto the new app.
 So it is getting a good workout, but in a fairly narrow way.

To your question about regression tests, there aren't really any.  Which
isn't good enough, I know; but when I was writing that code I was also
trying to keep up with Richard and Stef who were doing the .NET impl, as
well as write the RO spec at the same time... I took some corners.  One or
two people on the dev mailing list have offered to backfill these tests, but
that was a while ago and there's been no contributions, so I suspect I may
need to get round to it myself.

In the meantime, if you do hit any showstoppers, I'll certainly do my best
to resolve them, though you may need to build the code from source for
expediency's sake.

Cheers
Dan

On 25 January 2013 16:52, Mark Wood-Patrick <mw...@gmail.com> wrote:

> Actually that content worked,
>
> Many thanks
>
> Very much appreciated
>
> Mark
>
> -----Original Message-----
> From: Jeroen van der Wal [mailto:jeroen@stromboli.it]
> Sent: Friday, January 25, 2013 8:01 AM
> To: users@isis.apache.org
> Subject: Re: problem using firefox REST tool with archetype
>
> Hi Mark, perhaps you could share the raw respones body which shows the 
> stacktrace.
>
> Futhermore, I've tested with
>
> {
>     "description": "Eat Seaweed",
>     "category": "Other",
>     "dueBy": "20130123T000000000"
> }
>
> and that works fine.
>
>
>
>
>
> On Fri, Jan 25, 2013 at 4:46 PM, Mark Wood-Patrick
> <mw...@gmail.com>wrote:
>
> > Anyone know what's going on here?
> >
> > This is currently blocking for me. Does this work for other folks?
> >
> > What regression tests do we have to verify that this should work?
> >
> > Mark
> >
> > -----Original Message-----
> > From: Mark Wood-Patrick [mailto:mwoodpatrick@gmail.com]
> > Sent: Thursday, January 24, 2013 11:53 AM
> > To: users@isis.apache.org
> > Subject: RE: problem using firefox REST tool with archetype
> >
> > No I got a Status Code: 500 Server Error
> >
> > Changing the capitalization as you suggested did not help
> >
> > Are you able to repro the issue or does it work for you?
> >
> > Mark
> >
> > -----Original Message-----
> > From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
> > Sent: Thursday, January 24, 2013 9:55 AM
> > To: users@isis.apache.org
> > Subject: Re: problem using firefox REST tool with archetype
> >
> > Hi Mark,
> >
> > Just looking at the code, the Category enum is defined as:
> >
> >     public static enum Category {
> >         Professional, Domestic, Other;
> >     }
> >
> > So try "Other" instead of "OTHER".
> >
> > Did you get a 400 response code (you should have)?
> >
> > Let me know...
> > Dan
> >
> > On 24 January 2013 17:16, Mark Wood-Patrick 
> > <mw...@nvidia.com>
> > wrote:
> >
> > > I was trying to post:
> > >
> > > {
> > >     "description": "Eat Seaweed",
> > >     "category": "OTHER",
> > >     "dueBy": "Jan 23, 2013"
> > > }
> > >
> > > To an instance of the archetype using URL:
> > >
> > >
> > > http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoIte
> > > ms
> > > Jd
> > > o:1/actions/newToDo/invoke
> > >
> > > using the Firefox REST tool with current archetype
> > >
> > > And I got:
> > >
> > > {
> > >   "message": "Unknown enum constant 'OTHER'",
> > >   "stackTrace": [
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > lu eS 
> > > emanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > lu eS 
> > > emanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumVa
> > > lu eS 
> > > emanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.value.ValueSemantics
> > > Pr
> > > ov
> > > iderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFa
> > > ce
> > > tA
> > > bstract.java:261)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.encodeable.Encodable
> > > Fa
> > > ce
> > > tUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderD
> > > ec
> > > od
> > > er.java:60)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:33
> > > 2)
> > > ",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)
> > > ",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)
> > > ",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.
> > > ja
> > > va:270)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
> > >
> > >
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > Domain
> >
> > ObjectResourceServerside.invokeAction(DomainObjectResourceServerside
> > .j
> > ava:40
> > 7)",
> > >     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > >
> > > "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > java:57)",
> > >
> > >
> >
> > "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc
> > es
> > sorImp
> > l.java:43)",
> > >     "java.lang.reflect.Method.invoke(Method.java:601)",
> > >
> > > "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
> > > java:155)",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
> > > java:257)",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java
> > > :2
> > > 22
> > > )",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java
> > > :2
> > > 11
> > > )",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(Synchro
> > > no
> > > us
> > > Dispatcher.java:525)",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousD
> > > is
> > > pa
> > > tcher.java:502)",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousD
> > > is
> > > pa
> > > tcher.java:119)",
> > >
> > > "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.
> > > service(ServletContainerDispatcher.java:208)",
> > >
> > > Anyone know what I'm doing wrong?
> > >
> > > Mark Wood-Patrick
> > > Performance Infrastructure Lead
> > > e-mail: mwoodpatrick@nvidia.com<ma...@nvidia.com>
> > > Building/Cube: SC B31.3084
> > > Primary Office: please use cell # below (+1 408 486-2757)
> > > Cell:    408-627-5025
> > > Fax: 408 486-4757
> > > Mailstop/Mailbox: MS-10 / B307
> > >
> > >  (\__/)
> > >  (='.'=)
> > >  (")_(")
> > >
> > >
> > >
> > >
> > >
> > > ------------------------------------------------------------------
> > > --
> > > --
> > > ------------- This email message is for the sole use of the 
> > > intended
> > > recipient(s) and may contain confidential information.  Any 
> > > unauthorized review, use, disclosure or distribution is prohibited.
> > > If you are not the intended recipient, please contact the sender 
> > > by reply email and destroy all copies of the original message.
> > >
> > > ------------------------------------------------------------------
> > > --
> > > --
> > > -------------
> > >
> >
> >
> >
>
>


Re: problem using firefox REST tool with archetype

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Glad you are now going, Mark.

Nevertheless, I've raised ISIS-318 because this should have returned a 400,
not a 500.

fyi, although we've put out RO Viewer 1.0.0, do note that it doesn't yet
implement Restful Objects spec 1.0.0.  And it's new code, so there are
bound to be some rough issues.

Jeroen is probably the expert in terms of using it from a client-side
perspective; on the project we're working on together, he's using the RO
API as a way to migrate all the data from an old system onto the new app.
 So it is getting a good workout, but in a fairly narrow way.

To your question about regression tests, there aren't really any.  Which
isn't good enough, I know; but when I was writing that code I was also
trying to keep up with Richard and Stef who were doing the .NET impl, as
well as write the RO spec at the same time... I took some corners.  One or
two people on the dev mailing list have offered to backfill these tests,
but that was a while ago and there's been no contributions, so I suspect I
may need to get round to it myself.

In the meantime, if you do hit any showstoppers, I'll certainly do my best
to resolve them, though you may need to build the code from source for
expediency's sake.

Cheers
Dan

On 25 January 2013 16:52, Mark Wood-Patrick <mw...@gmail.com> wrote:

> Actually that content worked,
>
> Many thanks
>
> Very much appreciated
>
> Mark
>
> -----Original Message-----
> From: Jeroen van der Wal [mailto:jeroen@stromboli.it]
> Sent: Friday, January 25, 2013 8:01 AM
> To: users@isis.apache.org
> Subject: Re: problem using firefox REST tool with archetype
>
> Hi Mark, perhaps you could share the raw respones body which shows the
> stacktrace.
>
> Futhermore, I've tested with
>
> {
>     "description": "Eat Seaweed",
>     "category": "Other",
>     "dueBy": "20130123T000000000"
> }
>
> and that works fine.
>
>
>
>
>
> On Fri, Jan 25, 2013 at 4:46 PM, Mark Wood-Patrick
> <mw...@gmail.com>wrote:
>
> > Anyone know what's going on here?
> >
> > This is currently blocking for me. Does this work for other folks?
> >
> > What regression tests do we have to verify that this should work?
> >
> > Mark
> >
> > -----Original Message-----
> > From: Mark Wood-Patrick [mailto:mwoodpatrick@gmail.com]
> > Sent: Thursday, January 24, 2013 11:53 AM
> > To: users@isis.apache.org
> > Subject: RE: problem using firefox REST tool with archetype
> >
> > No I got a Status Code: 500 Server Error
> >
> > Changing the capitalization as you suggested did not help
> >
> > Are you able to repro the issue or does it work for you?
> >
> > Mark
> >
> > -----Original Message-----
> > From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
> > Sent: Thursday, January 24, 2013 9:55 AM
> > To: users@isis.apache.org
> > Subject: Re: problem using firefox REST tool with archetype
> >
> > Hi Mark,
> >
> > Just looking at the code, the Category enum is defined as:
> >
> >     public static enum Category {
> >         Professional, Domestic, Other;
> >     }
> >
> > So try "Other" instead of "OTHER".
> >
> > Did you get a 400 response code (you should have)?
> >
> > Let me know...
> > Dan
> >
> > On 24 January 2013 17:16, Mark Wood-Patrick <mw...@nvidia.com>
> > wrote:
> >
> > > I was trying to post:
> > >
> > > {
> > >     "description": "Eat Seaweed",
> > >     "category": "OTHER",
> > >     "dueBy": "Jan 23, 2013"
> > > }
> > >
> > > To an instance of the archetype using URL:
> > >
> > >
> > > http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoItems
> > > Jd
> > > o:1/actions/newToDo/invoke
> > >
> > > using the Firefox REST tool with current archetype
> > >
> > > And I got:
> > >
> > > {
> > >   "message": "Unknown enum constant 'OTHER'",
> > >   "stackTrace": [
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValu
> > > eS emanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValu
> > > eS emanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValu
> > > eS emanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsPr
> > > ov
> > > iderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFace
> > > tA
> > > bstract.java:261)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.encodeable.EncodableFa
> > > ce
> > > tUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderDec
> > > od
> > > er.java:60)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:332)
> > > ",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.
> > > ja
> > > va:270)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
> > >
> > >
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > Domain
> >
> > ObjectResourceServerside.invokeAction(DomainObjectResourceServerside.j
> > ava:40
> > 7)",
> > >     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > >
> > > "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > java:57)",
> > >
> > >
> >
> > "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > sorImp
> > l.java:43)",
> > >     "java.lang.reflect.Method.invoke(Method.java:601)",
> > >
> > > "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
> > > java:155)",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
> > > java:257)",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:2
> > > 22
> > > )",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:2
> > > 11
> > > )",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(Synchrono
> > > us
> > > Dispatcher.java:525)",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDis
> > > pa
> > > tcher.java:502)",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDis
> > > pa
> > > tcher.java:119)",
> > >
> > > "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.
> > > service(ServletContainerDispatcher.java:208)",
> > >
> > > Anyone know what I'm doing wrong?
> > >
> > > Mark Wood-Patrick
> > > Performance Infrastructure Lead
> > > e-mail: mwoodpatrick@nvidia.com<ma...@nvidia.com>
> > > Building/Cube: SC B31.3084
> > > Primary Office: please use cell # below (+1 408 486-2757)
> > > Cell:    408-627-5025
> > > Fax: 408 486-4757
> > > Mailstop/Mailbox: MS-10 / B307
> > >
> > >  (\__/)
> > >  (='.'=)
> > >  (")_(")
> > >
> > >
> > >
> > >
> > >
> > > --------------------------------------------------------------------
> > > --
> > > ------------- This email message is for the sole use of the intended
> > > recipient(s) and may contain confidential information.  Any
> > > unauthorized review, use, disclosure or distribution is prohibited.
> > > If you are not the intended recipient, please contact the sender by
> > > reply email and destroy all copies of the original message.
> > >
> > > --------------------------------------------------------------------
> > > --
> > > -------------
> > >
> >
> >
> >
>
>

Re: problem using firefox REST tool with archetype

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Glad you are now going, Mark.

Nevertheless, I've raised ISIS-318 because this should have returned a 400,
not a 500.

fyi, although we've put out RO Viewer 1.0.0, do note that it doesn't yet
implement Restful Objects spec 1.0.0.  And it's new code, so there are
bound to be some rough issues.

Jeroen is probably the expert in terms of using it from a client-side
perspective; on the project we're working on together, he's using the RO
API as a way to migrate all the data from an old system onto the new app.
 So it is getting a good workout, but in a fairly narrow way.

To your question about regression tests, there aren't really any.  Which
isn't good enough, I know; but when I was writing that code I was also
trying to keep up with Richard and Stef who were doing the .NET impl, as
well as write the RO spec at the same time... I took some corners.  One or
two people on the dev mailing list have offered to backfill these tests,
but that was a while ago and there's been no contributions, so I suspect I
may need to get round to it myself.

In the meantime, if you do hit any showstoppers, I'll certainly do my best
to resolve them, though you may need to build the code from source for
expediency's sake.

Cheers
Dan

On 25 January 2013 16:52, Mark Wood-Patrick <mw...@gmail.com> wrote:

> Actually that content worked,
>
> Many thanks
>
> Very much appreciated
>
> Mark
>
> -----Original Message-----
> From: Jeroen van der Wal [mailto:jeroen@stromboli.it]
> Sent: Friday, January 25, 2013 8:01 AM
> To: users@isis.apache.org
> Subject: Re: problem using firefox REST tool with archetype
>
> Hi Mark, perhaps you could share the raw respones body which shows the
> stacktrace.
>
> Futhermore, I've tested with
>
> {
>     "description": "Eat Seaweed",
>     "category": "Other",
>     "dueBy": "20130123T000000000"
> }
>
> and that works fine.
>
>
>
>
>
> On Fri, Jan 25, 2013 at 4:46 PM, Mark Wood-Patrick
> <mw...@gmail.com>wrote:
>
> > Anyone know what's going on here?
> >
> > This is currently blocking for me. Does this work for other folks?
> >
> > What regression tests do we have to verify that this should work?
> >
> > Mark
> >
> > -----Original Message-----
> > From: Mark Wood-Patrick [mailto:mwoodpatrick@gmail.com]
> > Sent: Thursday, January 24, 2013 11:53 AM
> > To: users@isis.apache.org
> > Subject: RE: problem using firefox REST tool with archetype
> >
> > No I got a Status Code: 500 Server Error
> >
> > Changing the capitalization as you suggested did not help
> >
> > Are you able to repro the issue or does it work for you?
> >
> > Mark
> >
> > -----Original Message-----
> > From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
> > Sent: Thursday, January 24, 2013 9:55 AM
> > To: users@isis.apache.org
> > Subject: Re: problem using firefox REST tool with archetype
> >
> > Hi Mark,
> >
> > Just looking at the code, the Category enum is defined as:
> >
> >     public static enum Category {
> >         Professional, Domestic, Other;
> >     }
> >
> > So try "Other" instead of "OTHER".
> >
> > Did you get a 400 response code (you should have)?
> >
> > Let me know...
> > Dan
> >
> > On 24 January 2013 17:16, Mark Wood-Patrick <mw...@nvidia.com>
> > wrote:
> >
> > > I was trying to post:
> > >
> > > {
> > >     "description": "Eat Seaweed",
> > >     "category": "OTHER",
> > >     "dueBy": "Jan 23, 2013"
> > > }
> > >
> > > To an instance of the archetype using URL:
> > >
> > >
> > > http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoItems
> > > Jd
> > > o:1/actions/newToDo/invoke
> > >
> > > using the Firefox REST tool with current archetype
> > >
> > > And I got:
> > >
> > > {
> > >   "message": "Unknown enum constant 'OTHER'",
> > >   "stackTrace": [
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValu
> > > eS emanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValu
> > > eS emanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValu
> > > eS emanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsPr
> > > ov
> > > iderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFace
> > > tA
> > > bstract.java:261)",
> > >
> > > "org.apache.isis.core.progmodel.facets.object.encodeable.EncodableFa
> > > ce
> > > tUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderDec
> > > od
> > > er.java:60)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:332)
> > > ",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.
> > > ja
> > > va:270)",
> > >
> > > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > > DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
> > >
> > >
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > Domain
> >
> > ObjectResourceServerside.invokeAction(DomainObjectResourceServerside.j
> > ava:40
> > 7)",
> > >     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> > >
> > > "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > java:57)",
> > >
> > >
> >
> > "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > sorImp
> > l.java:43)",
> > >     "java.lang.reflect.Method.invoke(Method.java:601)",
> > >
> > > "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
> > > java:155)",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
> > > java:257)",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:2
> > > 22
> > > )",
> > >
> > > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:2
> > > 11
> > > )",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(Synchrono
> > > us
> > > Dispatcher.java:525)",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDis
> > > pa
> > > tcher.java:502)",
> > >
> > > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDis
> > > pa
> > > tcher.java:119)",
> > >
> > > "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.
> > > service(ServletContainerDispatcher.java:208)",
> > >
> > > Anyone know what I'm doing wrong?
> > >
> > > Mark Wood-Patrick
> > > Performance Infrastructure Lead
> > > e-mail: mwoodpatrick@nvidia.com<ma...@nvidia.com>
> > > Building/Cube: SC B31.3084
> > > Primary Office: please use cell # below (+1 408 486-2757)
> > > Cell:    408-627-5025
> > > Fax: 408 486-4757
> > > Mailstop/Mailbox: MS-10 / B307
> > >
> > >  (\__/)
> > >  (='.'=)
> > >  (")_(")
> > >
> > >
> > >
> > >
> > >
> > > --------------------------------------------------------------------
> > > --
> > > ------------- This email message is for the sole use of the intended
> > > recipient(s) and may contain confidential information.  Any
> > > unauthorized review, use, disclosure or distribution is prohibited.
> > > If you are not the intended recipient, please contact the sender by
> > > reply email and destroy all copies of the original message.
> > >
> > > --------------------------------------------------------------------
> > > --
> > > -------------
> > >
> >
> >
> >
>
>

RE: problem using firefox REST tool with archetype

Posted by Mark Wood-Patrick <mw...@gmail.com>.
Actually that content worked, 

Many thanks

Very much appreciated

Mark

-----Original Message-----
From: Jeroen van der Wal [mailto:jeroen@stromboli.it] 
Sent: Friday, January 25, 2013 8:01 AM
To: users@isis.apache.org
Subject: Re: problem using firefox REST tool with archetype

Hi Mark, perhaps you could share the raw respones body which shows the
stacktrace.

Futhermore, I've tested with

{
    "description": "Eat Seaweed",
    "category": "Other",
    "dueBy": "20130123T000000000"
}

and that works fine.





On Fri, Jan 25, 2013 at 4:46 PM, Mark Wood-Patrick
<mw...@gmail.com>wrote:

> Anyone know what's going on here?
>
> This is currently blocking for me. Does this work for other folks?
>
> What regression tests do we have to verify that this should work?
>
> Mark
>
> -----Original Message-----
> From: Mark Wood-Patrick [mailto:mwoodpatrick@gmail.com]
> Sent: Thursday, January 24, 2013 11:53 AM
> To: users@isis.apache.org
> Subject: RE: problem using firefox REST tool with archetype
>
> No I got a Status Code: 500 Server Error
>
> Changing the capitalization as you suggested did not help
>
> Are you able to repro the issue or does it work for you?
>
> Mark
>
> -----Original Message-----
> From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
> Sent: Thursday, January 24, 2013 9:55 AM
> To: users@isis.apache.org
> Subject: Re: problem using firefox REST tool with archetype
>
> Hi Mark,
>
> Just looking at the code, the Category enum is defined as:
>
>     public static enum Category {
>         Professional, Domestic, Other;
>     }
>
> So try "Other" instead of "OTHER".
>
> Did you get a 400 response code (you should have)?
>
> Let me know...
> Dan
>
> On 24 January 2013 17:16, Mark Wood-Patrick <mw...@nvidia.com>
> wrote:
>
> > I was trying to post:
> >
> > {
> >     "description": "Eat Seaweed",
> >     "category": "OTHER",
> >     "dueBy": "Jan 23, 2013"
> > }
> >
> > To an instance of the archetype using URL:
> >
> >
> > http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoItems
> > Jd
> > o:1/actions/newToDo/invoke
> >
> > using the Firefox REST tool with current archetype
> >
> > And I got:
> >
> > {
> >   "message": "Unknown enum constant 'OTHER'",
> >   "stackTrace": [
> >
> > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValu
> > eS emanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
> >
> > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValu
> > eS emanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
> >
> > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValu
> > eS emanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
> >
> > "org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsPr
> > ov 
> > iderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFace
> > tA
> > bstract.java:261)",
> >
> > "org.apache.isis.core.progmodel.facets.object.encodeable.EncodableFa
> > ce 
> > tUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderDec
> > od
> > er.java:60)",
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:332)
> > ",
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)",
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)",
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.
> > ja
> > va:270)",
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
> >
> >
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> Domain
>
> ObjectResourceServerside.invokeAction(DomainObjectResourceServerside.j
> ava:40
> 7)",
> >     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> >
> > "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > java:57)",
> >
> >
>
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImp
> l.java:43)",
> >     "java.lang.reflect.Method.invoke(Method.java:601)",
> >
> > "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
> > java:155)",
> >
> > "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
> > java:257)",
> >
> > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:2
> > 22
> > )",
> >
> > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:2
> > 11
> > )",
> >
> > "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(Synchrono
> > us
> > Dispatcher.java:525)",
> >
> > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDis
> > pa
> > tcher.java:502)",
> >
> > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDis
> > pa
> > tcher.java:119)",
> >
> > "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.
> > service(ServletContainerDispatcher.java:208)",
> >
> > Anyone know what I'm doing wrong?
> >
> > Mark Wood-Patrick
> > Performance Infrastructure Lead
> > e-mail: mwoodpatrick@nvidia.com<ma...@nvidia.com>
> > Building/Cube: SC B31.3084
> > Primary Office: please use cell # below (+1 408 486-2757)
> > Cell:    408-627-5025
> > Fax: 408 486-4757
> > Mailstop/Mailbox: MS-10 / B307
> >
> >  (\__/)
> >  (='.'=)
> >  (")_(")
> >
> >
> >
> >
> >
> > --------------------------------------------------------------------
> > --
> > ------------- This email message is for the sole use of the intended
> > recipient(s) and may contain confidential information.  Any 
> > unauthorized review, use, disclosure or distribution is prohibited.
> > If you are not the intended recipient, please contact the sender by 
> > reply email and destroy all copies of the original message.
> >
> > --------------------------------------------------------------------
> > --
> > -------------
> >
>
>
>


Re: problem using firefox REST tool with archetype

Posted by Jeroen van der Wal <je...@stromboli.it>.
Hi Mark, perhaps you could share the raw respones body which shows the
stacktrace.

Futhermore, I've tested with

{
    "description": "Eat Seaweed",
    "category": "Other",
    "dueBy": "20130123T000000000"
}

and that works fine.





On Fri, Jan 25, 2013 at 4:46 PM, Mark Wood-Patrick
<mw...@gmail.com>wrote:

> Anyone know what's going on here?
>
> This is currently blocking for me. Does this work for other folks?
>
> What regression tests do we have to verify that this should work?
>
> Mark
>
> -----Original Message-----
> From: Mark Wood-Patrick [mailto:mwoodpatrick@gmail.com]
> Sent: Thursday, January 24, 2013 11:53 AM
> To: users@isis.apache.org
> Subject: RE: problem using firefox REST tool with archetype
>
> No I got a Status Code: 500 Server Error
>
> Changing the capitalization as you suggested did not help
>
> Are you able to repro the issue or does it work for you?
>
> Mark
>
> -----Original Message-----
> From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
> Sent: Thursday, January 24, 2013 9:55 AM
> To: users@isis.apache.org
> Subject: Re: problem using firefox REST tool with archetype
>
> Hi Mark,
>
> Just looking at the code, the Category enum is defined as:
>
>     public static enum Category {
>         Professional, Domestic, Other;
>     }
>
> So try "Other" instead of "OTHER".
>
> Did you get a 400 response code (you should have)?
>
> Let me know...
> Dan
>
> On 24 January 2013 17:16, Mark Wood-Patrick <mw...@nvidia.com>
> wrote:
>
> > I was trying to post:
> >
> > {
> >     "description": "Eat Seaweed",
> >     "category": "OTHER",
> >     "dueBy": "Jan 23, 2013"
> > }
> >
> > To an instance of the archetype using URL:
> >
> >
> > http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoItemsJd
> > o:1/actions/newToDo/invoke
> >
> > using the Firefox REST tool with current archetype
> >
> > And I got:
> >
> > {
> >   "message": "Unknown enum constant 'OTHER'",
> >   "stackTrace": [
> >
> > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueS
> > emanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
> >
> > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueS
> > emanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
> >
> > "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueS
> > emanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
> >
> > "org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProv
> > iderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFacetA
> > bstract.java:261)",
> >
> > "org.apache.isis.core.progmodel.facets.object.encodeable.EncodableFace
> > tUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderDecod
> > er.java:60)",
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:332)",
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)",
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)",
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.ja
> > va:270)",
> >
> > "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> > DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
> >
> >
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.Domain
>
> ObjectResourceServerside.invokeAction(DomainObjectResourceServerside.java:40
> 7)",
> >     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
> >
> > "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > java:57)",
> >
> >
>
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> l.java:43)",
> >     "java.lang.reflect.Method.invoke(Method.java:601)",
> >
> > "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
> > java:155)",
> >
> > "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
> > java:257)",
> >
> > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222
> > )",
> >
> > "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211
> > )",
> >
> > "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(Synchronous
> > Dispatcher.java:525)",
> >
> > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
> > tcher.java:502)",
> >
> > "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
> > tcher.java:119)",
> >
> > "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.
> > service(ServletContainerDispatcher.java:208)",
> >
> > Anyone know what I'm doing wrong?
> >
> > Mark Wood-Patrick
> > Performance Infrastructure Lead
> > e-mail: mwoodpatrick@nvidia.com<ma...@nvidia.com>
> > Building/Cube: SC B31.3084
> > Primary Office: please use cell # below (+1 408 486-2757)
> > Cell:    408-627-5025
> > Fax: 408 486-4757
> > Mailstop/Mailbox: MS-10 / B307
> >
> >  (\__/)
> >  (='.'=)
> >  (")_(")
> >
> >
> >
> >
> >
> > ----------------------------------------------------------------------
> > ------------- This email message is for the sole use of the intended
> > recipient(s) and may contain confidential information.  Any
> > unauthorized review, use, disclosure or distribution is prohibited.
> > If you are not the intended recipient, please contact the sender by
> > reply email and destroy all copies of the original message.
> >
> > ----------------------------------------------------------------------
> > -------------
> >
>
>
>

RE: problem using firefox REST tool with archetype

Posted by Mark Wood-Patrick <mw...@gmail.com>.
Anyone know what's going on here?

This is currently blocking for me. Does this work for other folks? 

What regression tests do we have to verify that this should work?

Mark

-----Original Message-----
From: Mark Wood-Patrick [mailto:mwoodpatrick@gmail.com] 
Sent: Thursday, January 24, 2013 11:53 AM
To: users@isis.apache.org
Subject: RE: problem using firefox REST tool with archetype

No I got a Status Code: 500 Server Error

Changing the capitalization as you suggested did not help

Are you able to repro the issue or does it work for you?

Mark

-----Original Message-----
From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
Sent: Thursday, January 24, 2013 9:55 AM
To: users@isis.apache.org
Subject: Re: problem using firefox REST tool with archetype

Hi Mark,

Just looking at the code, the Category enum is defined as:

    public static enum Category {
        Professional, Domestic, Other;
    }

So try "Other" instead of "OTHER".

Did you get a 400 response code (you should have)?

Let me know...
Dan

On 24 January 2013 17:16, Mark Wood-Patrick <mw...@nvidia.com> wrote:

> I was trying to post:
>
> {
>     "description": "Eat Seaweed",
>     "category": "OTHER",
>     "dueBy": "Jan 23, 2013"
> }
>
> To an instance of the archetype using URL:
>
>
> http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoItemsJd
> o:1/actions/newToDo/invoke
>
> using the Firefox REST tool with current archetype
>
> And I got:
>
> {
>   "message": "Unknown enum constant 'OTHER'",
>   "stackTrace": [
>
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueS
> emanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
>
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueS
> emanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
>
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueS
> emanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
>
> "org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProv
> iderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFacetA
> bstract.java:261)",
>
> "org.apache.isis.core.progmodel.facets.object.encodeable.EncodableFace
> tUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderDecod
> er.java:60)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:332)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.ja
> va:270)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
>
>
"org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.Domain
ObjectResourceServerside.invokeAction(DomainObjectResourceServerside.java:40
7)",
>     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
>
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:57)",
>
>
"sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l.java:43)",
>     "java.lang.reflect.Method.invoke(Method.java:601)",
>
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
> java:155)",
>
> "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
> java:257)",
>
> "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222
> )",
>
> "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211
> )",
>
> "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(Synchronous
> Dispatcher.java:525)",
>
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
> tcher.java:502)",
>
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
> tcher.java:119)",
>
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.
> service(ServletContainerDispatcher.java:208)",
>
> Anyone know what I'm doing wrong?
>
> Mark Wood-Patrick
> Performance Infrastructure Lead
> e-mail: mwoodpatrick@nvidia.com<ma...@nvidia.com>
> Building/Cube: SC B31.3084
> Primary Office: please use cell # below (+1 408 486-2757)
> Cell:    408-627-5025
> Fax: 408 486-4757
> Mailstop/Mailbox: MS-10 / B307
>
>  (\__/)
>  (='.'=)
>  (")_(")
>
>
>
>
>
> ----------------------------------------------------------------------
> ------------- This email message is for the sole use of the intended
> recipient(s) and may contain confidential information.  Any 
> unauthorized review, use, disclosure or distribution is prohibited.
> If you are not the intended recipient, please contact the sender by 
> reply email and destroy all copies of the original message.
>
> ----------------------------------------------------------------------
> -------------
>



RE: problem using firefox REST tool with archetype

Posted by Mark Wood-Patrick <mw...@gmail.com>.
No I got a Status Code: 500 Server Error

Changing the capitalization as you suggested did not help

Are you able to repro the issue or does it work for you?

Mark

-----Original Message-----
From: Dan Haywood [mailto:dan@haywood-associates.co.uk] 
Sent: Thursday, January 24, 2013 9:55 AM
To: users@isis.apache.org
Subject: Re: problem using firefox REST tool with archetype

Hi Mark,

Just looking at the code, the Category enum is defined as:

    public static enum Category {
        Professional, Domestic, Other;
    }

So try "Other" instead of "OTHER".

Did you get a 400 response code (you should have)?

Let me know...
Dan

On 24 January 2013 17:16, Mark Wood-Patrick <mw...@nvidia.com> wrote:

> I was trying to post:
>
> {
>     "description": "Eat Seaweed",
>     "category": "OTHER",
>     "dueBy": "Jan 23, 2013"
> }
>
> To an instance of the archetype using URL:
>
>
> http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoItemsJd
> o:1/actions/newToDo/invoke
>
> using the Firefox REST tool with current archetype
>
> And I got:
>
> {
>   "message": "Unknown enum constant 'OTHER'",
>   "stackTrace": [
>
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueS
> emanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
>
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueS
> emanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
>
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueS
> emanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
>
> "org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProv
> iderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFacetA
> bstract.java:261)",
>
> "org.apache.isis.core.progmodel.facets.object.encodeable.EncodableFace
> tUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderDecod
> er.java:60)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:332)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.ja
> va:270)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.
> DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
>
>
"org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.Domain
ObjectResourceServerside.invokeAction(DomainObjectResourceServerside.java:40
7)",
>     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
>
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:57)",
>
>
"sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l.java:43)",
>     "java.lang.reflect.Method.invoke(Method.java:601)",
>
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
> java:155)",
>
> "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
> java:257)",
>
> "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222
> )",
>
> "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211
> )",
>
> "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(Synchronous
> Dispatcher.java:525)",
>
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
> tcher.java:502)",
>
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
> tcher.java:119)",
>
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.
> service(ServletContainerDispatcher.java:208)",
>
> Anyone know what I'm doing wrong?
>
> Mark Wood-Patrick
> Performance Infrastructure Lead
> e-mail: mwoodpatrick@nvidia.com<ma...@nvidia.com>
> Building/Cube: SC B31.3084
> Primary Office: please use cell # below (+1 408 486-2757)
> Cell:    408-627-5025
> Fax: 408 486-4757
> Mailstop/Mailbox: MS-10 / B307
>
>  (\__/)
>  (='.'=)
>  (")_(")
>
>
>
>
>
> ----------------------------------------------------------------------
> ------------- This email message is for the sole use of the intended 
> recipient(s) and may contain confidential information.  Any 
> unauthorized review, use, disclosure or distribution is prohibited.  
> If you are not the intended recipient, please contact the sender by 
> reply email and destroy all copies of the original message.
>
> ----------------------------------------------------------------------
> -------------
>


Re: problem using firefox REST tool with archetype

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

Just looking at the code, the Category enum is defined as:

    public static enum Category {
        Professional, Domestic, Other;
    }

So try "Other" instead of "OTHER".

Did you get a 400 response code (you should have)?

Let me know...
Dan

On 24 January 2013 17:16, Mark Wood-Patrick <mw...@nvidia.com> wrote:

> I was trying to post:
>
> {
>     "description": "Eat Seaweed",
>     "category": "OTHER",
>     "dueBy": "Jan 23, 2013"
> }
>
> To an instance of the archetype using URL:
>
>
> http://l-sim-15-165:8080/restful/objects/objstore.jdo.todo.ToDoItemsJdo:1/actions/newToDo/invoke
>
> using the Firefox REST tool with current archetype
>
> And I got:
>
> {
>   "message": "Unknown enum constant 'OTHER'",
>   "stackTrace": [
>
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueSemanticsProvider.doParse(EnumValueSemanticsProvider.java:63)",
>
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueSemanticsProvider.doRestore(EnumValueSemanticsProvider.java:73)",
>
> "org.apache.isis.core.progmodel.facets.object.choices.enums.EnumValueSemanticsProvider.doRestore(EnumValueSemanticsProvider.java:32)",
>
> "org.apache.isis.core.progmodel.facets.object.value.ValueSemanticsProviderAndFacetAbstract.fromEncodedString(ValueSemanticsProviderAndFacetAbstract.java:261)",
>
> "org.apache.isis.core.progmodel.facets.object.encodeable.EncodableFacetUsingEncoderDecoder.fromEncodedString(EncodableFacetUsingEncoderDecoder.java:60)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.JsonValueEncoder.asAdapter(JsonValueEncoder.java:163)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.objectAdapterFor(DomainResourceHelper.java:332)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.parseArguments(DomainResourceHelper.java:476)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.parseArguments(DomainResourceHelper.java:463)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.invokeActionUsingAdapters(DomainResourceHelper.java:270)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainResourceHelper.invokeAction(DomainResourceHelper.java:265)",
>
> "org.apache.isis.viewer.restfulobjects.viewer.resources.domainobjects.DomainObjectResourceServerside.invokeAction(DomainObjectResourceServerside.java:407)",
>     "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)",
>
> "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)",
>
> "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
>     "java.lang.reflect.Method.invoke(Method.java:601)",
>
> "org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)",
>
> "org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)",
>
> "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)",
>
> "org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)",
>
> "org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)",
>
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)",
>
> "org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)",
>
> "org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)",
>
> Anyone know what I'm doing wrong?
>
> Mark Wood-Patrick
> Performance Infrastructure Lead
> e-mail: mwoodpatrick@nvidia.com<ma...@nvidia.com>
> Building/Cube: SC B31.3084
> Primary Office: please use cell # below (+1 408 486-2757)
> Cell:    408-627-5025
> Fax: 408 486-4757
> Mailstop/Mailbox: MS-10 / B307
>
>  (\__/)
>  (='.'=)
>  (")_(")
>
>
>
>
>
> -----------------------------------------------------------------------------------
> This email message is for the sole use of the intended recipient(s) and
> may contain
> confidential information.  Any unauthorized review, use, disclosure or
> distribution
> is prohibited.  If you are not the intended recipient, please contact the
> sender by
> reply email and destroy all copies of the original message.
>
> -----------------------------------------------------------------------------------
>