It's all about the answers!

Ask a question

Working whits Releases values in RTC (REST/OSLC)


Pavel Cikota (136) | asked Oct 27 '16, 7:36 a.m.
edited Oct 27 '16, 7:43 a.m.
Hello everybody!

According of this post I can GET Releases values form RTC as xml or json request, but other operation whits POST or PUT give me error 400 (bad request) or 500 (internal server error). I try add new values or update existing values.

By REST API the updating/adding curl-command is

"Content-Type: application/x-www-form-urlencoded" -H "Accept: text/json" -X POST (or PUT) -d @jsonFile.json "<HOST-URL>/service/com.ibm.team.workitem.common.internal.rest.IWorkItemRestService/releases?projectAreaItemId=<PA-UUID>"


where jsonFile.json contains record of existed, modified and (or) new values (same structure like GET-request)

{[{"creationDate":1436583600000,"description":"Desc2","name":"1.2.6","_eQualifiedClassName":"com.ibm.team.workitem.rest.dto:ReleaseDTO","isArchived":false,"isFiltered":false,"itemId":"_vcoIFptyEea9EY_n_HFgiA","sequenceValue":7,"isModified":true}]}

or 

{ "projectAreaItemId": "<PA-UUID>","releases":[{"creationDate":1436583600000,"description":"Desc2","name":"1.2.6","_eQualifiedClassName":"com.ibm.team.workitem.rest.dto:ReleaseDTO","isArchived":false,"isFiltered":false,"itemId":"_vcoIFptyEea9EY_n_HFgiA","sequenceValue":7,"isModified":true}] }

but become error. 

{"errorClass":"java.lang.NullPointerException","errorCode":500,"errorTraceMarshall":[{"errorTraceFileName":"StringReader.java","errorTraceClassName":"java.io.StringReader","errorTraceMethodName":"<init>","errorTraceLineNumber":44},{"errorTraceFileName":"WorkItemRestService.java","errorTraceClassName":"com.ibm.team.workitem.service.internal.rest.WorkItemRestService","errorTraceMethodName":"postReleases","errorTraceLineNumber":3006},{"errorTraceFileName":null,"errorTraceClassName":"sun.reflect.GeneratedMethodAccessor2877","errorTraceMethodName":"invoke","errorTraceLineNumber":-1},{"errorTraceFileName":"DelegatingMethodAccessorImpl.java","errorTraceClassName":"sun.reflect.DelegatingMethodAccessorImpl","errorTraceMethodName":"invoke","errorTraceLineNumber":37},{"errorTraceFileName":"Method.java","errorTraceClassName":"java.lang.reflect.Method","errorTraceMethodName":"invoke","errorTraceLineNumber":611},{"errorTraceFileName":"ExportProxyServiceRecord.java","errorTraceClassName":"org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord","errorTraceMethodName":"invoke","errorTraceLineNumber":361},{"errorTraceFileName":"ExportProxyServiceRecord.java","errorTraceClassName":"org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord","errorTraceMethodName":"access$0","errorTraceLineNumber":347},{"errorTraceFileName":"ExportProxyServiceRecord.java","errorTraceClassName":"org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler","errorTraceMethodName":"invoke","errorTraceLineNumber":56},{"errorTraceFileName":null,"errorTraceClassName":"com.sun.proxy.$Proxy1402","errorTraceMethodName":"postReleases","errorTraceLineNumber":-1},{"errorTraceFileName":null,"errorTraceClassName":"sun.reflect.GeneratedMethodAccessor2876","errorTraceMethodName":"invoke","errorTraceLineNumber":-1},{"errorTraceFileName":"DelegatingMethodAccessorImpl.java","errorTraceClassName":"sun.reflect.DelegatingMethodAccessorImpl","errorTraceMethodName":"invoke","errorTraceLineNumber":37},{"errorTraceFileName":"Method.java","errorTraceClassName":"java.lang.reflect.Method","errorTraceMethodName":"invoke","errorTraceLineNumber":611},{"errorTraceFileName":"AbstractTeamServerServlet.java","errorTraceClassName":"com.ibm.team.repository.servlet.AbstractTeamServerServlet","errorTraceMethodName":"doModelledRestService","errorTraceLineNumber":567},{"errorTraceFileName":"AbstractTeamServerServlet.java","errorTraceClassName":"com.ibm.team.repository.servlet.AbstractTeamServerServlet","errorTraceMethodName":"handleRequest2","errorTraceLineNumber":2453},{"errorTraceFileName":"AbstractTeamServerServlet.java","errorTraceClassName":"com.ibm.team.repository.servlet.AbstractTeamServerServlet","errorTraceMethodName":"handleRequest","errorTraceLineNumber":2244},{"errorTraceFileName":"AbstractTeamServerServlet.java","errorTraceClassName":"com.ibm.team.repository.servlet.AbstractTeamServerServlet","errorTraceMethodName":"service","errorTraceLineNumber":1761},{"errorTraceFileName":"HttpServlet.java","errorTraceClassName":"javax.servlet.http.HttpServlet","errorTraceMethodName":"service","errorTraceLineNumber":727},{"errorTraceFileName":"ServletManager.java","errorTraceClassName":"org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper","errorTraceMethodName":"service","errorTraceLineNumber":180},{"errorTraceFileName":"ServletRegistration.java","errorTraceClassName":"org.eclipse.equinox.http.servlet.internal.ServletRegistration","errorTraceMethodName":"service","errorTraceLineNumber":61},{"errorTraceFileName":"ProxyServlet.java","errorTraceClassName":"org.eclipse.equinox.http.servlet.internal.ProxyServlet","errorTraceMethodName":"processAlias","errorTraceLineNumber":126},{"errorTraceFileName":"ProxyServlet.java","errorTraceClassName":"org.eclipse.equinox.http.servlet.internal.ProxyServlet","errorTraceMethodName":"service","errorTraceLineNumber":76},{"errorTraceFileName":"HttpServlet.java","errorTraceClassName":"javax.servlet.http.HttpServlet","errorTraceMethodName":"service","errorTraceLineNumber":727},{"errorTraceFileName":"BridgeServlet.java","errorTraceClassName":"org.eclipse.equinox.servletbridge.BridgeServlet","errorTraceMethodName":"service","errorTraceLineNumber":120},{"errorTraceFileName":"JazzServlet.java","errorTraceClassName":"com.ibm.team.repository.server.servletbridge.JazzServlet","errorTraceMethodName":"service","errorTraceLineNumber":74},{"errorTraceFileName":"HttpServlet.java","errorTraceClassName":"javax.servlet.http.HttpServlet","errorTraceMethodName":"service","errorTraceLineNumber":727},{"errorTraceFileName":"ApplicationFilterChain.java","errorTraceClassName":"org.apache.catalina.core.ApplicationFilterChain","errorTraceMethodName":"internalDoFilter","errorTraceLineNumber":303},{"errorTraceFileName":"ApplicationFilterChain.java","errorTraceClassName":"org.apache.catalina.core.ApplicationFilterChain","errorTraceMethodName":"doFilter","errorTraceLineNumber":208},{"errorTraceFileName":"BridgeFilter.java","errorTraceClassName":"com.ibm.team.repository.server.servletbridge.BridgeFilter","errorTraceMethodName":"processDelegate","errorTraceLineNumber":165},{"errorTraceFileName":"BridgeFilter.java","errorTraceClassName":"com.ibm.team.repository.server.servletbridge.BridgeFilter","errorTraceMethodName":"doFilter","errorTraceLineNumber":198},{"errorTraceFileName":"ApplicationFilterChain.java","errorTraceClassName":"org.apache.catalina.core.ApplicationFilterChain","errorTraceMethodName":"internalDoFilter","errorTraceLineNumber":241},{"errorTraceFileName":"ApplicationFilterChain.java","errorTraceClassName":"org.apache.catalina.core.ApplicationFilterChain","errorTraceMethodName":"doFilter","errorTraceLineNumber":208},{"errorTraceFileName":"StandardWrapperValve.java","errorTraceClassName":"org.apache.catalina.core.StandardWrapperValve","errorTraceMethodName":"invoke","errorTraceLineNumber":220},{"errorTraceFileName":"StandardContextValve.java","errorTraceClassName":"org.apache.catalina.core.StandardContextValve","errorTraceMethodName":"invoke","errorTraceLineNumber":122},{"errorTraceFileName":"AuthenticatorBase.java","errorTraceClassName":"org.apache.catalina.authenticator.AuthenticatorBase","errorTraceMethodName":"invoke","errorTraceLineNumber":610},{"errorTraceFileName":"StandardHostValve.java","errorTraceClassName":"org.apache.catalina.core.StandardHostValve","errorTraceMethodName":"invoke","errorTraceLineNumber":171},{"errorTraceFileName":"ErrorReportValve.java","errorTraceClassName":"org.apache.catalina.valves.ErrorReportValve","errorTraceMethodName":"invoke","errorTraceLineNumber":102},{"errorTraceFileName":"SingleSignOn.java","errorTraceClassName":"org.apache.catalina.authenticator.SingleSignOn","errorTraceMethodName":"invoke","errorTraceLineNumber":339},{"errorTraceFileName":"StandardEngineValve.java","errorTraceClassName":"org.apache.catalina.core.StandardEngineValve","errorTraceMethodName":"invoke","errorTraceLineNumber":116},{"errorTraceFileName":"CoyoteAdapter.java","errorTraceClassName":"org.apache.catalina.connector.CoyoteAdapter","errorTraceMethodName":"service","errorTraceLineNumber":408},{"errorTraceFileName":"AbstractHttp11Processor.java","errorTraceClassName":"org.apache.coyote.http11.AbstractHttp11Processor","errorTraceMethodName":"process","errorTraceLineNumber":1040},{"errorTraceFileName":"AbstractProtocol.java","errorTraceClassName":"org.apache.coyote.AbstractProtocol$AbstractConnectionHandler","errorTraceMethodName":"process","errorTraceLineNumber":607},{"errorTraceFileName":"JIoEndpoint.java","errorTraceClassName":"org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor","errorTraceMethodName":"run","errorTraceLineNumber":314},{"errorTraceFileName":"ThreadPoolExecutor.java","errorTraceClassName":"java.util.concurrent.ThreadPoolExecutor$Worker","errorTraceMethodName":"runTask","errorTraceLineNumber":895},{"errorTraceFileName":"ThreadPoolExecutor.java","errorTraceClassName":"java.util.concurrent.ThreadPoolExecutor$Worker","errorTraceMethodName":"run","errorTraceLineNumber":918},{"errorTraceFileName":"TaskThread.java","errorTraceClassName":"org.apache.tomcat.util.threads.TaskThread$WrappingRunnable","errorTraceMethodName":"run","errorTraceLineNumber":61},{"errorTraceFileName":"Thread.java","errorTraceClassName":"java.lang.Thread","errorTraceMethodName":"run","errorTraceLineNumber":761}],"errorTrace":["java.io.StringReader.<init>(StringReader.java:44)","com.ibm.team.workitem.service.internal.rest.WorkItemRestService.postReleases(WorkItemRestService.java:3006)","sun.reflect.GeneratedMethodAccessor2877.invoke(Unknown Source)","sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)","java.lang.reflect.Method.invoke(Method.java:611)","org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)","org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)","org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)","com.sun.proxy.$Proxy1402.postReleases(Unknown Source)","sun.reflect.GeneratedMethodAccessor2876.invoke(Unknown Source)","sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)","java.lang.reflect.Method.invoke(Method.java:611)","com.ibm.team.repository.servlet.AbstractTeamServerServlet.doModelledRestService(AbstractTeamServerServlet.java:567)","com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleRequest2(AbstractTeamServerServlet.java:2453)","com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleRequest(AbstractTeamServerServlet.java:2244)","com.ibm.team.repository.servlet.AbstractTeamServerServlet.service(AbstractTeamServerServlet.java:1761)","javax.servlet.http.HttpServlet.service(HttpServlet.java:727)","org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)","org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)","org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126)","org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:76)","javax.servlet.http.HttpServlet.service(HttpServlet.java:727)","org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:120)","com.ibm.team.repository.server.servletbridge.JazzServlet.service(JazzServlet.java:74)","javax.servlet.http.HttpServlet.service(HttpServlet.java:727)","org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)","org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)","com.ibm.team.repository.server.servletbridge.BridgeFilter.processDelegate(BridgeFilter.java:165)","com.ibm.team.repository.server.servletbridge.BridgeFilter.doFilter(BridgeFilter.java:198)","org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)","org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)","org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)","org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)","org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)","org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)","org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)","org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:339)","org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)","org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)","org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)","org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)","org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)","java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)","java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)","org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)","java.lang.Thread.run(Thread.java:761)"],"errorMessage":null}

Whats I do wrong?



Comments
Donald Nong commented Oct 30 '16, 9:06 p.m.

You are using internal APIs and your request is not officially supported. I doubt anybody out here on the forum can answer your question.

Be the first one to answer this question!


Register or to post your answer.