Creating Draft Work Item returns 500
{
"title":"A test defect",
"rtc_cm:type":
{
"rdf:resource":"https://jazz01.<domain>.com/ccm04\/oslc/types/_eZ3Z8KuOEeKo-JGDY--3wg\/defect"
} }
{"prefixes":{"oslc":"http:\/\/open-services.net\/ns\/core#"},"oslc:message":"null argument:","oslc:statusCode":500}
7 answers
Comments
Thanks Eric.
OSLC-Core-Version | 2.0 |
accept | application/json |
Content-type | application/json |
-
org.eclipse.core.runtime.AssertionFailedException: null argument:
-
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
-
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
-
at com.ibm.team.workitem.common.internal.workflow.StateGroupRegistry.getStateGroup(StateGroupRegistry.java:
-
29)
"rtc_cm:state": { "rdf:resource": "https:\/\/rtc:9443\/ccm\/oslc\/workflows\/_FckdEKD8EeGCjPo2EBGANQ\/states\/com.ibm.team.workitem.taskWorkflow\/3", "rdf:type": [ { "rdf:resource": "http:\/\/jazz.net\/xmlns\/prod\/jazz\/rtc\/cm\/1.0\/Status" } ] },
1. The instanceShape of the work item type in question (Task in my case) states that only the title/summary is required, since only for this attribute the <oslc:occurs/> value is "Exactly-one" and all the others are "Zero-or-one" or "Zero-or-many".
2. Using the same POST content (I used the presentation of an existing work item less the identifier), I could submit a work item, but not a "draft" work item. Creating draft work items always fails with the same error as quoted in Eric's post above. It's a bit ironic since it should have been much easier to create a "draft" than a proper one.
BTW, I'm using CLM 4.0.5.
Comments
What did you do to get this to fail?
Comments
Here are the results. I tried it once with dc:type and the other with rtc_cm:type
Just to keep the discussion going. I get the same 500 error "null parameter" when I post the below JSON
{ "dcterms:title": "Offer more services related to loans", "rtc_cm:type": { "rdf:type": [ { "rdf:resource": "http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/Type" } ], "rdf:resource": "https://<server>:<port>/ccm/oslc/types/_YAOpUK2SEeOZZsxCNqN2HA/defect" } }If I post the same content with the same setting to create a WI (not a draft), I get the error "'Save Work Item' failed. Preconditions have not been met: The 'Filed Against' attribute needs to be set (work item <12:44:28>)." as expected.
Has something changed? It seems the 'type' attribute is ignored in the newer releases (I'm testing on 6.0.4) when creating a draft workitem. I've tried various forms, all are ignored.
'dc:type':'task'
'rtc_cm:type':'task'
'rtc_cm:type':{'rdf:resource':'fullURL/task'}
'dc:type':{'rdf:resource':'fullURL/task'}
Any ideas?
I'm seeing the same thing. Type seems to be ignored, but the other parts of my JSON are respected. IBM Support told me they don't support OSLC so to come and ask the developers here!
There has been a defect since v3:
If you can provide support with a small program that demonstrates the problem when run against the out-of-the-box Money That Matters project area, they should be willing to reproduce the problem and give you some guidance (or create a defect for the problem). Or in this case, let you know it is a known defect.
This is so stupid. But I got it working.
Comments
Donald Nong
Feb 18 '14, 8:54 p.m.500 internal error can mean anything. You need to check the log file to find out the relevant errors. Also, you did not say what URL you passed the JSON to, and it is difficult for others to imagine what might go wrong.
Bryan Perino
Feb 18 '14, 9:35 p.m.Sorry about the lack of information. Here is the url that I am sending the request to