urgent Fixx-API error when adding a comment to an issue.
Adding comments through API somehow seems to mess up the issue internally or perhaps im just doing it wrong :)
Request above the linesep(----) and response below it in the examples.
So far so good i get the issue and its comments (2) i then try to add a new comment:
Still no errors as expected if i now retrieve the comments again i get the following error:
This causes all the comments not to show in the web interface and for older issues I've noticed it clears the description too although I've not been able to fully catch when this happens.
Request above the linesep(----) and response below it in the examples.
GET /api/issues/573 HTTP/1.1
Accept: application/xml
Content-Type: application/xml
Authorization: Basic <removed>
Host: </removed><removed>
------------------------
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=</removed><removed>; Path=/
Content-Length: 555
Date: Wed, 30 Sep 2009 18:19:43 GMT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><issue><id>573</id><title>TEST ISSUE</title><description><p>This is a test issue</p></description><assignedto>5</assignedto><type>13</type><priority>4</priority><area />11<createdon>2009-09-30T20:18:18.858+02:00</createdon><dueon>2009-10-07T22:18:18.858+02:00</dueon><createdby>5</createdby><affected>6</affected><fixfor>6</fixfor><estimatedtime>0</estimatedtime><closed>false</closed><updatedon>2009-09-30T20:18:59.390+02:00</updatedon><hidefromclient>false</hidefromclient></issue>
</removed>
GET /api/issues/573/comments HTTP/1.1
Accept: application/xml
Content-Type: application/xml
Authorization: Basic <removed>
Host: </removed><removed>
--------------------------------
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=</removed><removed>; Path=/
Content-Length: 381
Date: Wed, 30 Sep 2009 18:19:46 GMT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><comments><comment><id>273</id><text>Test COmmment2</text><createdat>2009-09-30T20:18:59.388+02:00</createdat><createdby>5</createdby><issue>573</issue></comment><comment><id>272</id><text>TEST COMMENT #1</text><createdat>2009-09-30T20:18:41.785+02:00</createdat><createdby>5</createdby><issue>573</issue></comment></comments>
</removed>
So far so good i get the issue and its comments (2) i then try to add a new comment:
POST /api/issues/573/comments HTTP/1.1
Accept: application/xml
Content-Type: application/xml
Authorization: Basic <removed>
Host: </removed><removed>
Content-Length: 52
Expect: 100-continue
<comment>
<text>Test Comment 3</text>
</comment>
-----------------------------
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=</removed><removed>; Path=/
Content-Length: 155
Date: Wed, 30 Sep 2009 18:20:11 GMT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><comment><id>274</id><text>Test Comment 3</text><createdby>5</createdby><issue>573</issue></comment>
</removed>
Still no errors as expected if i now retrieve the comments again i get the following error:
GET /api/issues/573/comments HTTP/1.1
Accept: application/xml
Content-Type: application/xml
Authorization: Basic <removed>
Host: </removed><removed>
-------------------------------------------------
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Transfer-Encoding: chunked
Date: Wed, 30 Sep 2009 18:20:50 GMT
Connection: close
2000
<html><head><title>Apache Tomcat/6.0.16 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><hr />
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
java.util.Date.getMillisOf(Unknown Source)
java.util.Date.before(Unknown Source)
com.hedgehoglab.fixx.model.comparator.CommentAgeComparator.compare(CommentAgeComparator.java:16)
com.hedgehoglab.fixx.model.comparator.CommentAgeComparator.compare(CommentAgeComparator.java:8)
java.util.Arrays.mergeSort(Unknown Source)
java.util.Arrays.sort(Unknown Source)
java.util.Collections.sort(Unknown Source)
com.hedgehoglab.fixx.api.resources.IssuesResource.getComments(IssuesResource.java:64)
sun.reflect.GeneratedMethodAccessor1253.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.sun.jersey.impl.model.method.dispatch.EntityParamDispatchProvider$ResponseOutInvoker._dispatch(EntityParamDispatchProvider.java:156)
com.sun.jersey.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:85)
com.sun.jersey.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:123)
com.sun.jersey.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
com.sun.jersey.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
com.sun.jersey.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
com.sun.jersey.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
com.sun.jersey.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:722)
com.sun.jersey.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:692)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:344)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
org.appfuse.webapp.filter.StaticFilter.doFilterInternal(StaticFilter.java:103)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
org.appfuse.webapp.filter.LocaleFilter.doFilterInternal(LocaleFilter.java:63)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
com.hedgehoglab.fixx.utils.DisableUrlSessionFilter.doFilter(DisableUrlSessionFilter.java:90)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:359)
org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
com.hedgehoglab.fixx.webapp.filter.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:83)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.config.OrderedFilterBeanDefinitionDecorator$OrderedFilterDecorator.doFilter(OrderedFilterBeanDefinitionDecorator.java:93)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:172)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:268)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:268)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:87)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:229)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:174)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
com.hedgehoglab.fixx.webapp.filter.UpgradeFilter.doFilterInternal(UpgradeFilter.java:160)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
com.hedgehoglab.fixx.webapp.filter.SetupFilter.doFilterInternal(SetupFilter.java:68)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
note
ab
The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs.
<hr /><h3>Apache Tomcat/6.0.16</h3></body></html>
0
</removed>
This causes all the comments not to show in the web interface and for older issues I've noticed it clears the description too although I've not been able to fully catch when this happens.
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?This does indeed appear to be a bug in the API when the createdAt time is not passed for comments. Sorry about this. I have asked for this to be fixed.
For now, could you ensure that the createdAt attribute is being sent and see if that fixes it?
I’m sorry
-
Just to clarify. The documentation is correct. The bug is that the createdAt value is not being defaulted to the current time. -
I can confirm that manually sending <createdat> works. I'm happy I don't have to scrap that feature :)</createdat> -
Inappropriate?This has been fixed in 1.9 where the createdAt field is set to the time the comment is posted to the back-end.
I’m happy
The company says
this answers the question
Loading Profile...




EMPLOYEE