Retrieve Artifact Template Information in OSLC
I am trying to get the template definition information from an artifact type in my project using the following URI:
http://MYSEVERADDRESS:9080/rm/types/TEMPLATE_ID
The URI was pulled directly from the discovery request on my project.
When I run this request through Poster in Firefox, I get the correct response and all of the template information. However when I run it through my web application I get an error. Other requests against the same server appear to work fine. I am using the same credentials in Poster and my web application. Here is the error message I retrieved from the server:
2013-08-05 13:39:45,490 [ http-bio-9080-exec-13732] ERROR ibm.rdm.fronting.server.services.types.TypeService - Server Error: Entry [fa6ae3dac9835862]
java.lang.NullPointerException
at com.ibm.rdm.fronting.server.services.types.internal.ResourceShapeService.doGetInternal(ResourceShapeService.java:71)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.runInternalMethod(RRSRestServiceBase.java:683)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.handleMethod(RRSRestServiceBase.java:611)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.doGet(RRSRestServiceBase.java:123)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.performService(RRSRestServiceBase.java:330)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.service(RRSRestServiceBase.java:214)
at com.ibm.team.jfs.app.servlet.AppContainerServlet.dispatchRequest(AppContainerServlet.java:155)
at com.ibm.team.jfs.app.servlet.AppContainerServlet.service(AppContainerServlet.java:281)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:120)
at com.ibm.team.repository.server.servletbridge.JazzServlet.service(JazzServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.ibm.team.repository.server.servletbridge.BridgeFilter.processDelegate(BridgeFilter.java:133)
at com.ibm.team.repository.server.servletbridge.BridgeFilter.doFilter(BridgeFilter.java:154)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:309)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
at java.lang.Thread.run(Thread.java:738)
java.lang.NullPointerException
at com.ibm.rdm.fronting.server.services.types.internal.ResourceShapeService.doGetInternal(ResourceShapeService.java:71)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.runInternalMethod(RRSRestServiceBase.java:683)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.handleMethod(RRSRestServiceBase.java:611)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.doGet(RRSRestServiceBase.java:123)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.performService(RRSRestServiceBase.java:330)
at com.ibm.rdm.fronting.server.core.internal.RRSRestServiceBase.service(RRSRestServiceBase.java:214)
at com.ibm.team.jfs.app.servlet.AppContainerServlet.dispatchRequest(AppContainerServlet.java:155)
at com.ibm.team.jfs.app.servlet.AppContainerServlet.service(AppContainerServlet.java:281)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:120)
at com.ibm.team.repository.server.servletbridge.JazzServlet.service(JazzServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.ibm.team.repository.server.servletbridge.BridgeFilter.processDelegate(BridgeFilter.java:133)
at com.ibm.team.repository.server.servletbridge.BridgeFilter.doFilter(BridgeFilter.java:154)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:309)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
at java.lang.Thread.run(Thread.java:738)
Thank you!
2 answers
Hello
Please open a workitem in Jazz.net against RRC and list the above information as well as what version of RRC and what other OSLC calls you used prior to this one in order to get to this point.
Also, I am not sure what you mean by this statement exactly "...The URI was pulled directly from the discovery request on my project." Could you elaborate that?
Please put the link to the workitem as a reply to this post when complete/
Please open a workitem in Jazz.net against RRC and list the above information as well as what version of RRC and what other OSLC calls you used prior to this one in order to get to this point.
Also, I am not sure what you mean by this statement exactly "...The URI was pulled directly from the discovery request on my project." Could you elaborate that?
Please put the link to the workitem as a reply to this post when complete/
Comments
Here is the output of when I run Example04 from the OSLC workshop which uses the first resource shape returned to create a requirement with primary text. Also, please note that the GET to the services URI is not the first GET to a protected resource. Before you do the GET to the services URI, have you also tried to retrieve the service catalog URI?
Have you tried to do a GET on any of the other artifact template URIs? Does it fail with same exception?
>> GET(1) https://clm.process.ws/rm/discovery/_meCLkP_LEeKxkogx-RK4jA/services.xml >> Response Headers: - Server: Apache-Coyote/1.1 - OSLC-Core-Version: 2.0 - Content-Type: application/rdf+xml - Transfer-Encoding: chunked - Date: Fri, 09 Aug 2013 14:50:25 GMT Creation Factory URI->> https://clm.process.ws/rm/requirementFactory?projectURL=https%3A%2F%2Fclm.process.ws%2Fjts%2Fprocess%2Fproject-areas%2F_meCLkP_LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_ok1gAf_LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_oobmk__LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_oroEgf_LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_otTfgf_LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_ouYdkf_LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_owSiEf_LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_oxvTkf_LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_oy6YQf_LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_o0TfY__LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_o1X2Y__LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_o2i7Ef_LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_o33wwf_LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_o46Skv_LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_o7V7gv_LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_o8o8Af_LEeKxkogx-RK4jA Resource Shape URI->> https://clm.process.ws/rm/types/_o-adof_LEeKxkogx-RK4jA >> GET(1) https://clm.process.ws/rm/types/_ok1gAf_LEeKxkogx-RK4jA >> Response Headers: - Server: Apache-Coyote/1.1 - Content-Type: application/rdf+xml - Transfer-Encoding: chunked - Date: Fri, 09 Aug 2013 14:50:25 GMT http://jazz.net/ns/rm#primaryText New Requirement Content ->> <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:oslc_rm="http://open-services.net/ns/rm#" xmlns:dc="http://purl.org/dc/terms/" xmlns:oslc="http://open-services.net/ns/core#" xmlns:nav="http://jazz.net/ns/rm/navigation#" xmlns:rm_property="https://clm.process.ws/rm/types/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <oslc_rm:Requirement xmlns:rm_jazz="http://jazz.net/ns/rm#" rdf:about=""> <dc:title>MyDocument</dc:title> <dc:description>This is a test document</dc:description> <oslc:instanceShape rdf:resource="https://clm.process.ws/rm/types/_ok1gAf_LEeKxkogx-RK4jA"/> <nav:parent rdf:resource="https://clm.process.ws/rm/folders/_BdsToQEDEeO47Z4cL0DozA"/> <rm_jazz:primaryText rdf:parseType="Literal"><div xmlns="http://www.w3.org/1999/xhtml" id="_Nf2cQJKNEd25PMUBGiN3Dw"><h1 id="_DwpWsMueEd28xKN9fhQheA">Test Document</h1></div></rm_jazz:primaryText> </oslc_rm:Requirement> </rdf:RDF> >> POST(1) https://clm.process.ws/rm/requirementFactory?projectURL=https://clm.process.ws/jts/process/project-areas/_meCLkP_LEeKxkogx-RK4jA >> Response Headers: - Server: Apache-Coyote/1.1 - Location: https://clm.process.ws/rm/resources/_BuqH0QEDEeO47Z4cL0DozA - X-Last-Modified-XSD: 2013-08-09T14:50:26.387Z - Last-Modified: Fri, 09 Aug 2013 14:50:26 GMT - X-Last-Modified-User: https://clm.process.ws/jts/users/pewadmin - X-Jazz-Owning-Context: https://clm.process.ws/jts/process/project-areas/_meCLkP_LEeKxkogx-RK4jA - ETag: "%220%22&%22_ButyMQEDEeO47Z4cL0DozA%22" - Content-Length: 0 - Date: Fri, 09 Aug 2013 14:50:26 GMT >> Created Requirement [https://clm.process.ws/rm/resources/_BuqH0QEDEeO47Z4cL0DozA]