Visual Studio Connector 500 Internal Server Error

When I try to connect the Atlassian Visual Studio connector to our JIRA server, the login and initial connection works fine, but listing issues returns an internal server error (500). My Colleagues are using the same version of the connector and JIRA with no issues.

This connector has previously been working fine (same version) and has only recently started to have problems.

JIRA Version: 5.1.3

Visual Studio Connector Version: 1.3.8

Error Trace:

The remote server returned an error: (500) Internal Server Error.<br><br>Url: http://jira.XXXXX.com:8082/rest/api/2/search?jql=assignee+%3d+currentUser()+and+resolution+%3d+Unresolved+order+by+priority+desc&startAt=0&maxResults=25&expand=renderedFields<br>Response: {"errorMessages":["Internal server error"],"errors":{}}<br>

System.Net.WebException

   at Atlassian.plvs.api.jira.RestClient.jsonOp(String method, String tgtUrl, Object json, HttpStatusCode expectedCode)
   at Atlassian.plvs.api.jira.RestClient.getCustomFilterIssues(JiraFilter filter, String sortOrder, Int32 start, Int32 count)
   at Atlassian.plvs.api.jira.facade.RestJiraServerFacade.getCustomFilterIssues(JiraServer server, JiraFilter filter, Int32 start, Int32 count)
   at Atlassian.plvs.api.jira.facade.SmartJiraServerFacade.<>c__DisplayClasse.<getCustomFilterIssues>b__c(JiraServer param0)
   at Atlassian.plvs.api.jira.facade.SmartJiraServerFacade.delegated[T](JiraServer server, Delegate`1 rest, Delegate`1 classic)
   at Atlassian.plvs.api.jira.facade.SmartJiraServerFacade.getCustomFilterIssues(JiraServer server, JiraFilter filter, Int32 start, Int32 count)
   at Atlassian.plvs.models.jira.JiraIssueListModelBuilder.rebuildModelWithPresetFilter(JiraIssueListModel model, JiraServer server, JiraPresetFilter filter)
   at Atlassian.plvs.ui.jira.TabJira.<>c__DisplayClass2b.<reloadIssuesWithPresetFilter>b__2a()

EDIT

This is the error from the JIRA log. I have replaced my username with USERNAME:

2013-04-05 11:45:23,897 http-8082-4 ERROR USERNAME 705x718x1 1bxe679 10.0.1.36 /rest/api/2/search [jira.rest.exception.ExceptionInterceptor] Returning internal server error in response
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$TypeOutInvoker$1.invoke(DispatchProviderHelper.java:205)  <+4> (DispatchProviderHelper.java:100) (DefaultMethodInvocation.java:61) (ExpandInterceptor.java:38) (DefaultMethodInvocation.java:61)
	at com.atlassian.jira.rest.exception.ExceptionInterceptor.intercept(ExceptionInterceptor.java:59)  <+1> (DefaultMethodInvocation.java:61)
	at com.atlassian.jira.rest.v2.issue.scope.RequestScopeInterceptor.intercept(RequestScopeInterceptor.java:43)  <+14> (DefaultMethodInvocation.java:61) (DispatchProviderHelper.java:132) (DispatchProviderHelper.java:201) (ResourceJavaMethodDispatcher.java:75) (HttpMethodRule.java:288) (ResourceClassRule.java:108) (RightHandPathRule.java:147) (RootResourceClassesRule.java:84) (WebApplicationImpl.java:1469) (WebApplicationImpl.java:1400) (WebApplicationImpl.java:1349) (WebApplicationImpl.java:1339) (WebComponent.java:416) (ServletContainer.java:537)
	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178)  <+1> (ServletContainer.java:795)
	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73)  <+7> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
	at com.atlassian.labs.botkiller.BotKillerFilter.doFilter(BotKillerFilter.java:36)  <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
	at com.atlassian.jira.tzdetect.IncludeResourcesFilter.doFilter(IncludeResourcesFilter.java:39)  <+24> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) (RestServletUtilsUpdaterFilter.java:26) (RestServletUtilsUpdaterFilter.java:40) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) (ContextFilter.java:25) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (AccessLogFilter.java:103) (AccessLogFilter.java:87) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (XsrfTokenAdditionRequestFilter.java:54) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66)
	at com.atlassian.labs.remoteapps.modules.permissions.ApiScopingFilter.doFilter(ApiScopingFilter.java:71)  <+22> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (SecurityFilter.java:234) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (TrustedApplicationsFilter.java:98) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (BaseLoginFilter.java:157) (JiraLoginFilter.java:70) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66) (OAuthFilter.java:71) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
	at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:40)  <+18> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (AbstractJohnsonFilter.java:71) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (UrlRewriteFilter.java:738) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (GzipFilter.java:80) (GzipFilter.java:51) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66)
	at com.atlassian.labs.remoteapps.modules.oauth.OAuth2LOFilter.doFilter(OAuth2LOFilter.java:70)  <+47> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) (JWDSendRedirectFilter.java:25) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (ChainedFilterStepRunner.java:78) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (AbstractCachingFilter.java:33) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (AbstractEncodingFilter.java:41) (AbstractHttpFilter.java:31) (PathMatchingEncodingFilter.java:45) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (ActiveRequestsFilter.java:346) (ActiveRequestsFilter.java:463) (ActiveRequestsFilter.java:173) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (JiraStartupChecklistFilter.java:75) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (MultiTenantServletFilter.java:91) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (ChainedFilterStepRunner.java:78) (ApplicationFilterChain.java:235) (ApplicationFilterChain.java:206) (StandardWrapperValve.java:233) (StandardContextValve.java:191) (StandardHostValve.java:127) (ErrorReportValve.java:102) (StandardEngineValve.java:109) (AccessLogValve.java:554) (CoyoteAdapter.java:298) (Http11AprProcessor.java:864) (Http11AprProtocol.java:579) (AprEndpoint.java:1665)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: key <renderedFields?os_username=USERNAME> doesn't match pattern
	at com.atlassian.plugins.rest.common.expand.parameter.DefaultExpandParameter$ExpandKey.from(DefaultExpandParameter.java:118)
	at com.atlassian.plugins.rest.common.expand.parameter.DefaultExpandParameter$ExpandKey.access$000(DefaultExpandParameter.java:90)
	at com.atlassian.plugins.rest.common.expand.parameter.DefaultExpandParameter.parse(DefaultExpandParameter.java:72)
	at com.atlassian.plugins.rest.common.expand.parameter.DefaultExpandParameter.<init>(DefaultExpandParameter.java:36)
	at com.atlassian.jira.rest.v2.search.SearchResource$IssueToIssueBean.<init>(SearchResource.java:254)
	at com.atlassian.jira.rest.v2.search.SearchResource.search(SearchResource.java:164)
	... 156 more

3 answers

1 accepted

Ok, you are a victim of bug https://ecosystem.atlassian.net/browse/PLVS-392. To fix it, either upgrade to the latest snapshot build of the connector, or do not use the "Authenticate using URL parameters" config option in the server configuration dialog

Thanks, turning of URL parameter authentication seems to have fixed it.

Hi Liam,

Internal Server Error means that something blew up inside JIRA when it was processing the request from the connector. Which means that there will be an error message with a stack trace related to this in your JIRA log. Can you check what error is JIRA reporting in the log?

Janusz

Hi, I have edited by original post to include the JIRA server error.

Hi Liam,

It seems to me an issue retrieving the result of the following filter (getCustomFilterIssues):

http://jira.smartergridsolutions.com:8082/rest/api/2/search?jql=assignee+%3d+currentUser()+and+resolution+%3d+Unresolved+order+by+priority+desc&startAt=0&maxResults=25&expand=renderedFields

You may get more information about what's wrong using CURL as this example:

curl -u user:password http://jira.smartergridsolutions.com:8082/rest/api/2/search?jql=assignee+%3d+currentUser()+and+resolution+%3d+Unresolved+order+by+priority+desc&startAt=0&maxResults=25&expand=renderedFields

I hope this helps.

Cheers

Hi, thanks for your answer. I had already tried that and there are no errors in the response when performing the request outside the Visual Studio connector.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,713 views 17 21
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you