Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
5.0, 6.0.5
-
Sql Server 2005
Jira 5.0
Windows Server 2003 r2
-
5
-
2
-
Severity 1 - Critical
-
0
-
Description
Since upgrading to the Official Jira 5 RTM release we are having problems with publishing activities to Jira via the REST API.
It appears every now and then Jira will create a "blank" row in the ACTIVITY entity table - this row is devoid of all information, including the POSTER and PUBLISHED values (which are implicit as part of the REST API call, so can't be blamed on a malformed activity request).
Once one of these rows is created after a while the following error occurs
2012-02-29 15:54:11,885 QuartzWorker-1 WARN ServiceRunner com.atlassian.streams.internal.ActivityProviderConnectionMonitorImpl:activityProviderMonitor [atlassian.streams.internal.StreamsCompletionService] Handling a non-timeout exception com.atlassian.util.concurrent.RuntimeExecutionException: java.util.concurrent.ExecutionException: java.lang.NullPointerException: displayName at com.atlassian.util.concurrent.AsyncCompleter$BlockingAccessor.apply(AsyncCompleter.java:278) at com.atlassian.util.concurrent.AsyncCompleter$BlockingAccessor.apply(AsyncCompleter.java:270) at com.atlassian.util.concurrent.AsyncCompleter$AsyncCompletionFunction$1.get(AsyncCompleter.java:207) at com.google.common.base.Suppliers$MemoizingSupplier.get(Suppliers.java:96) at com.atlassian.streams.internal.StreamsCompletionService$Execution$TimeoutHandler.get(StreamsCompletionService.java:325) at com.atlassian.streams.internal.StreamsCompletionService$Execution$TimeoutHandler.get(StreamsCompletionService.java:312) at com.atlassian.util.concurrent.Functions$ValueExtractor.apply(Functions.java:58) at com.atlassian.util.concurrent.Functions$ValueExtractor.apply(Functions.java:56) at com.google.common.collect.Iterators$8.next(Iterators.java:730) at com.google.common.collect.Iterators$7.computeNext(Iterators.java:608) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:137) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:132) at com.google.common.collect.Iterators$7.computeNext(Iterators.java:607) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:137) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:132) at com.google.common.collect.Iterators$8.hasNext(Iterators.java:726) at com.google.common.collect.Lists.newArrayList(Lists.java:135) at com.google.common.collect.Collections2.toCollection(Collections2.java:76) at com.google.common.collect.ImmutableSet.copyOf(ImmutableSet.java:217) at com.atlassian.streams.internal.ActivityProviderConnectionMonitorImpl$ActivityMonitorJob.execute(ActivityProviderConnectionMonitorImpl.java:181) at com.atlassian.sal.jira.scheduling.JiraPluginSchedulerService.run(JiraPluginSchedulerService.java:93) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:47) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException: displayName at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) at java.util.concurrent.FutureTask.get(FutureTask.java:83) at com.atlassian.util.concurrent.AsyncCompleter$BlockingAccessor.apply(AsyncCompleter.java:274) ... 25 more Caused by: java.lang.NullPointerException: displayName at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204) at com.atlassian.streams.thirdparty.api.Application.application(Application.java:71) at com.atlassian.streams.thirdparty.ActivityServiceActiveObjectsImpl$2.apply(ActivityServiceActiveObjectsImpl.java:630) at com.atlassian.streams.thirdparty.ActivityServiceActiveObjectsImpl$2.apply(ActivityServiceActiveObjectsImpl.java:626) at com.google.common.collect.Iterators$8.next(Iterators.java:730) at com.atlassian.streams.thirdparty.ActivityServiceActiveObjectsImpl.uniqueApplications(ActivityServiceActiveObjectsImpl.java:294) at com.atlassian.streams.thirdparty.ActivityServiceActiveObjectsImpl.applications(ActivityServiceActiveObjectsImpl.java:287) at sun.reflect.GeneratedMethodAccessor520.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.activeobjects.tx.TransactionalProxy.invoke(TransactionalProxy.java:79) at com.atlassian.activeobjects.tx.TransactionalProxy.access$000(TransactionalProxy.java:18) at com.atlassian.activeobjects.tx.TransactionalProxy$1.doInTransaction(TransactionalProxy.java:63) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25) at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:34) at sun.reflect.GeneratedMethodAccessor271.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$AbstractMultiTenantAwareInvocationHandler.invokeInternal(MultiTenantComponentFactoryImpl.java:181) at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$MultiTenantAwareInvocationHandler.invoke(MultiTenantComponentFactoryImpl.java:211) at $Proxy444.doInTransaction(Unknown Source) at sun.reflect.GeneratedMethodAccessor271.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at $Proxy444.doInTransaction(Unknown Source) at sun.reflect.GeneratedMethodAccessor271.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154) at $Proxy444.doInTransaction(Unknown Source) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:21) at sun.reflect.GeneratedMethodAccessor390.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvok
And at that point the activity stream gadget within Jira no longer displays any of the remote application names as filter options, or any of the remote activities in the activity stream.
Once we update the table and remove the blank rows:
DELETE FROM [catch_jira_5].[dbo].[AO_563AEE_ACTIVITY_ENTITY] WHERE GENERATOR_DISPLAY_NAME IS NULL
And restart Jira, everything returns to normal, but then after a few minutes, another blank activity stream row is created, and the activity stream gadget stops working again after a minute or so.
If we enabled the jira http dump, we can see that the failing requests are returning the response "stream.error.unexpected.error":
192.168.0.7 o1027x506x1 remote [29/Feb/2012:17:07:59 +1300] "POST http://192.168.0.7/jira/rest/activities/1.0/ HTTP/1.1" 500 43 0.2810 - "RestSharp 102.0.0.0" - ___ Request _____________________________________________________ Request HTTP Headers : connection=Keep-Alive via=1.1 CATCH01 content-length=1848 content-type=application/vnd.atl.streams.thirdparty+json accept=application/json, application/xml, text/json, text/x-json, text/javascript, text/xml, application/vnd.atl.streams.thirdparty+json authorization=Basic cmVtb3RlOmNhdGNoMDE= host=192.168.0.7 user-agent=RestSharp 102.0.0.0 Request Attributes : os_securityfilter_already_filtered=true com.atlassian.jira.web.filters.JiraPostEncodingFilter_alreadyfiltered=true com.newrelic.agent.TRANSACTION_NAME=/rest/activities/* atlassian.core.seraph.original.url=/rest/activities/1.0/ com.atlassian.jira.web.filters.JiraFirstFilter_alreadyfiltered=true com.atlassian.gzipfilter.GzipFilter_already_filtered=true loginfilter.already.filtered=true com.atlassian.jira.web.filters.accesslog.AccessLogFilter_already_filtered=true jira.request.username=remote os_authstatus=success jira.xsrf.set.cookie.pending=BC6U-TFUE-1NHC-83X6|a5f4aedc295c6c7947613d5d6958efe17d5690b2|lin com.atlassian.jira.security.xsrf.XsrfTokenAdditionRequestFilter_already_filtered=true com.atlassian.seraph.auth.LoginReason=OK jira.webwork.cleanup=false jira.request.id=1027x506x1 jira.request.start.millis=1330488479357 com.atlassian.johnson.filters.Johnson503Filter_already_filtered=true com.atlassian.jira.security.login.LoginManager.LoginResult=com.atlassian.jira.bc.security.login.LoginResultImpl@a4a2e2[reason=OK,loginInfo=com.atlassian.jira.bc.security.login.LoginInfoImpl@c1c8b0[lastLoginTime=1330488479513,previousLoginTime=1330488478982,loginCount=62,currentFailedLoginCount=0,totalFailedLoginCount=<null>,lastFailedLoginTime=<null>,elevatedSecurityCheckRequired=false,maxAuthenticationAttemptsAllowed=3],userName=remote,deniedReasons=[]] os_authTypeDefault=any Request Data (total 1848 bytes) : { "published": "2012-02-29T04:07:41.263Z", "title": "Catch Administrator assigned Test Script '<a href=\"http://catch04/EnterpriseTester/home#/script/edit/515040d8-697a-419f-b52a-a005015f3674\">Filtering by Account Returns Filtered Results</a>' to <span class=\"activity-stream-username\">Catch Administrator</sp", "content": "Assignee was changed from <span class=\"activity-stream-username\">Kieran Williams</span> to <span class=\"activity-stream-username\">Catch Administrator</span>\r\n<ul class=\"updates activity-list\">\r\n<li class=\"activity-stream-object-number\">Number: 6</li>\r\n<li class=\"activity-stream-package\">Package: <a href=\"http://catch04/EnterpriseTester/home#/script/list/ad081619-c496-4144-aad8-a005015f33c3\">/Script Library/Reports</a></li>\r\n<li class=\"activity-stream-project\">Project: <a href=\"http://catch04/EnterpriseTester/home#/dashboard/project/089a0384-ccd6-46c5-a112-a0050155bc8f\">Internet Banking</a></li>\r\n</ul>", "id": "http://catch04/EnterpriseTester/home#/script/edit/515040d8-697a-419f-b52a-a005015f3674", "target": { "url": "http://catch04/EnterpriseTester/home#/dashboard/project/089a0384-ccd6-46c5-a112-a0050155bc8f" }, "generator": { "id": "http://catch04/EnterpriseTester/c57e0ec1-d93d-461d-8754-a00600ce2b2a", "displayName": "Enterprise Tester" }, "object": { "objectType": "TestScript", "url": "http://catch04/EnterpriseTester/home#/script/edit/515040d8-697a-419f-b52a-a005015f3674" }, "icon": { "url": "http://catch04/EnterpriseTester/content/images/logo_16_by_15.png", "width": 16, "height": 16 }, "actor": { "id": "Administrator", "image": { "url": "http://catch04/EnterpriseTester/AvatarImage/GetImage.rails?userName=Administrator", "width": 36, "height": 36 } } } ___ Response ____________________________________________________ Response HTTP Headers : X-AUSERNAME=remote Cache-Control=no-cache, no-store, no-transform Content-Type=application/json Response Data (total 43 bytes) : {"subCode":"stream.error.unexpected.error"}
From what I can see there is no difference between this activity entry and any of the others that are being published (and this can be confirmed because repeating the same action often results in a different activity for a different entity causing the "unexpected error".
It looks to me like there are a couple of issues here:
- Activity stream publishing fails intermittently, and for no reason.
- When failure occurs, an activity entry row is still incorrectly created in the database, but with no content (if the publishing failed, but didn't create a blank row, that would at least stop the activity stream gadget from breaking completely).
Any advice would be greatly appreciated as this affecting all our customers upgrading to Jira 5.
Attachments
Issue Links
- relates to
-
JRASERVER-27041 If you create an event via the activitystrea.ms API with a title greater then 255 characters, it is incorrectly persisted and causes errors to be logged constantly
- Gathering Impact
-
STRM-2055 Loading...
- is cloned from
-
STRM-2184 Loading...