It's all about the answers!

Ask a question

"assertion failed:" response during RTC web service call


Timothy Esau (1715) | asked Aug 20 '15, 4:51 p.m.
edited Aug 27 '15, 2:00 p.m.
Hello,
      We are using a web service call to RTC to automatically update tickets with information regarding which environments we have deployed the tickets to.  This web service call has been running and working for the past 6 months without issue.  The issue started today when the tickets were not being updated and the error we are getting back from the web service call is simple "assertion failed: " here is information regarding the call.

PUT request to URL:

https://<server and port>/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/39632?oslc_cm.properties=rtc_ext:ReleasedToEnvironments.brassring.engineering

Headers:
Accept: application/xml
OSLC-Core-Version: 2.0
Content-Type: application/xml


XML Body:
<?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:rtc_ext="http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/" xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/" xmlns:oslc_cm="http://open-services.net/ns/cm#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:oslc_cmx="http://open-services.net/ns/cm-x#" xmlns:oslc="http://open-services.net/ns/core#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">     <oslc_cm:ChangeRequest rdf:about="https://<server:port>/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/39632?oslc_cm.properties=rtc_ext:ReleasedToEnvironments.brassring.engineering">         <rtc_ext:ReleasedToEnvironments.brassring.engineering rdf:resource="https://<server:port>/ccm/oslc/enumerations/_uc0ngHTaEeS6abxABEXJVA/enumerationList$Enum_ReleasedtoEnvironments.brassring.engineering/Enum_ReleasedtoEnvironments.brassring.engineering.literal.l6"/>     </oslc_cm:ChangeRequest> </rdf:RDF>
XML Response:

<?xml version="1.0" encoding="UTF-8"?> <rdf:RDF   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"   xmlns:oslc="http://open-services.net/ns/core#">   <rdf:Description rdf:about="https://<server:port>/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/39632?oslc_cm.properties=rtc_ext:ReleasedToEnvironments.brassring.engineering">   </rdf:Description>   <oslc:Error rdf:about="#n0">     <oslc:message>assertion failed: </oslc:message>     <oslc:statusCode>500</oslc:statusCode>   </oslc:Error> </rdf:RDF>


This call is meant to check off the environments listed in the change request, and has been working for the past 6 months.  The environment literals are correct.

-------------------------------------------------------------------------

OUR WORKAROUND TO THE ISSUE

The issue stems from using the web service to clear all of the check boxes of an enumeration list.  There doesn't seem to be a way to get around this, so our team came up with a work around.  We added another enum to our check-list named "none", which simply represents that no other boxes are checked.  When ever we need to clear out the check-list completely using the web services, we do this by making a call to the PUT request with only the "none" enumeration in the body XML.  This effectively deletes the other check boxes in the enum-list, by only checking off the "none" check-box.  This prevents the bug from occurring and allows our other web services to update the enumeration list without the "assertion failed: " error.




Comments
Krzysztof Kaźmierczyk commented Aug 21 '15, 3:32 a.m.

Hi Timothy,
Please look into ccm.log file and provide exactly error message with the stack trace which is there.


Timothy Esau commented Aug 21 '15, 3:06 p.m.

I am working on trying to get the log file from the server, but do not personally have access to it.  It is most likely going to be similar to the problem that Mark is having in his post in this thread as well.  I am trying to add to an enumeration list through a web service call like his.

Accepted answer


permanent link
Mark Höchsmann (263) | answered Aug 21 '15, 4:05 a.m.
edited Aug 21 '15, 4:08 a.m.
Hello there. I have exactly the same error appearing on our RTC installation. The "asssertion error" is just appearing when I try to set a custom enumerationlist field that has not set a value. The error from the ccm.log is as folows:

2015-08-21 07:59:13,638 [http-bio-9443-exec-32 @@ 07:59 mark.hoechsmann <Apache-HttpClient/4.4 (Java 1.5 minimum; Java/1.6.0_24)@xxx.xxx.xxx.xxx> /ccm/oslc/workitems/9] ERROR com.ibm.team.workitem.service                       - Failed to serve the request - 'oslc/workitems/9'. Reason - 'assertion failed: '.
org.eclipse.core.runtime.AssertionFailedException: assertion failed:
    at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
    at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
    at com.ibm.team.workitem.common.internal.model.impl.WorkItemImpl.getValue(WorkItemImpl.java:2849)
    at com.ibm.team.workitem.service.internal.oslc.resources.WorkItemResource.update(WorkItemResource.java:483)
    at com.ibm.team.workitem.service.internal.oslc.RequestHandler.update(RequestHandler.java:315)
    at com.ibm.team.workitem.service.internal.oslc.RequestHandler.handlePATCH(RequestHandler.java:271)
    at com.ibm.team.workitem.service.internal.oslc.OSLCService.perform_PATCH(OSLCService.java:77)
    at com.ibm.team.repository.service.TeamRawService.service(TeamRawService.java:100)
    at sun.reflect.GeneratedMethodAccessor770.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
    at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
    at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
    at com.sun.proxy.$Proxy1993.service(Unknown Source)
    at com.ibm.team.repository.servlet.AbstractTeamServerServlet.doRestService(AbstractTeamServerServlet.java:970)
    at com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleRequest2(AbstractTeamServerServlet.java:2521)
    at com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleRequest(AbstractTeamServerServlet.java:2316)
    at com.ibm.team.repository.servlet.AbstractTeamServerServlet.service(AbstractTeamServerServlet.java:1795)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
    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:727)
    at org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:120)
    at com.ibm.team.repository.server.servletbridge.JazzServlet.service(JazzServlet.java:74)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at com.ibm.team.repository.server.servletbridge.BridgeFilter.processDelegate(BridgeFilter.java:165)
    at com.ibm.team.repository.server.servletbridge.BridgeFilter.doFilter(BridgeFilter.java:198)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:613)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:358)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:767)
Timothy Esau selected this answer as the correct answer

Comments
Timothy Esau commented Aug 21 '15, 3:08 p.m.

Did this error just start occurring or has it been happening for some time?


Mark Höchsmann commented Aug 24 '15, 3:29 a.m.

We just started to use the functionality of removing enum values from a list so that no value is set anymore. Just to clarify the behavior:

When we are removing the value using the UI of RTC then it is no problem to set a new value using the OSLC interface.

The "assertion failed" error just appears when we are removing the enum values using the OSLC interface and then try to set a new value in another call.

To remove the value we are adding a parameter "oslc.properties" to the update call and we are setting the "enumeration field name" as value.

As we have a test system for RTC 5 and 6 we can see that this behavior is present in both versions.


Timothy Esau commented Aug 24 '15, 9:38 a.m.

Interesting, We also just implemented a call two days prior that will remove the values of the enum list in a separate call a few days ago using the OSLC.properties.  It seems like once the enum list is cleared using the oslc.properties method, then the field can not be updated using oslc until the enum list is modified through the ui layer.  Well at least it seems that I can remove the recent call that clears the list to temporarily fix this behaviour.

Thank you so much for this back and forth, I was utterly confused as to why this issue cropped up and now I know why it exists, and how to resolve it until the web services are changed to be able to handle this work flow.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.