Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Get Version Release date in specific format

Hi Team,

Currently, we have a requirement to show only the last 30 days of released versions only, if any version does not contain the release date then ignore it.

I am able to get the version release date in the yyyy-MM-dd HH:mm:ss for example release date: 2018-09-24 00:00:00.0 format but as i need to compare it with yyyy-MM-dd format so i am unable to do so and getting the below error.

java.lang.IllegalArgumentException: Cannot compare java.sql.Timestamp with value '9/24/18 12:00 AM' and java.lang.String with value '2021-05-15' at Script2778$_run_closure1.doCall(Script2778.groovy:22) at Script2778.run(Script2778.groovy:17) Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Date ... 2 more

Any help will be appreciated.

Thanks

1 answer

Hi @Yogesh Mude,

Could you please share the full code you are using?

Also, for the Date formatting, have you tried using the java.text.SimpleDateFormat?

Thank you and Kind Regards,
Ram

Hello Ram,

Thank you for the response.

Yes, i used java.text.SimpleDateFormat.

import java.text.SimpleDateFormat
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.project.version.Version
import com.atlassian.jira.project.version.VersionManager


//get last 30 days date
Calendar cal = Calendar.getInstance()
cal.add(Calendar.DAY_OF_MONTH, -30)
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd")
def last30Days = sdf.format(cal.getTime())
log.error "Date : ${last30Days}"

def vers = ComponentAccessor.getVersionManager().getVersionsReleased(14644, false) //project ID
def dateVersions = []

vers.each { version ->
def releaseDate = version.getReleaseDate()
log.error " release date: " + releaseDate
def rel = sdf.format(releaseDate)
def released = version.isReleased()
if (released == true && releaseDate <= last30Days){
dateVersions.add(version)
}
}

Hi  @Yogesh Mude

The reason why you are encountering the exception is that there is an error in your parsing configuration. 

On this line:-

def last30Days = sdf.format(cal.getTime())

You are passing the value for the last 30 days as a String, and when you are making the comparison between your release on this line:-

if (released == true && releaseDate <= last30Days){

you are comparing a String to a Date which is what causes the exception.

You should instead pass the value as a Date like this:-

import com.atlassian.jira.component.ComponentAccessor
import java.text.SimpleDateFormat

def versionManager = ComponentAccessor.versionManager

def cal = Calendar.instance
cal.add(Calendar.DAY_OF_MONTH, -30)

def sdf = new SimpleDateFormat("yyyy-MM-dd")
def last30Days = sdf.parse(sdf.format(cal.time))

def vers = versionManager.getVersionsReleased(10600, false) //project ID
def dateVersions = []

vers.each { version ->
def releaseDate = version.releaseDate
log.warn " release date: ${sdf.format(releaseDate)}"
def released = version.isReleased()
if (released && releaseDate <= (last30Days as Date)){
dateVersions.add(version)
}
}

Please note, this sample code is not 100% exact to your environment. Hence, you will need to make the required modifications.

Below is the test output with the updated code:-

console_test.png

If you notice in the print screen, the log printed for the Date uses the yyyy-MM-dd format.

I hope this helps to answer your question. :)

Thank you and Kind Regards,
Ram

Hello @Ram Kumar Aravindakshan _Adaptavist_ 

Thank you so much for your response.

I did the changes to the code and ran to the script console.

I got the response as below snapshot.

import java.text.SimpleDateFormat
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.project.version.VersionManager


//get last 30 days date
def cal = Calendar.getInstance()
cal.add(Calendar.DAY_OF_MONTH, -30)

def sdf = new SimpleDateFormat("yyyy-MM-dd")
def last30Days = sdf.parse(sdf.format(cal.time))
log.error "Date : ${last30Days}"

def vers = ComponentAccessor.getVersionManager().getVersionsReleased(14644, false) //project ID
def dateVersions = []

vers.each { version ->
def releaseDate = version.getReleaseDate()
log.error " release date: " + sdf.format(releaseDate)

def released = version.isReleased()
if (released && releaseDate <= (last30Days as Date)){
dateVersions.add(version)
}
}

If I am not wrong is this error due to some of the versions does not contain the release dates?

test.JPG

Hi @Yogesh Mude,

The value in the release date field may be empty from the error returned, as you suspected.

You could try to add another condition to ensure that it will only log the message if the release date has a value like:-


if(releaseDate!=null) {
.
.
.

Below is the complete updated code for your reference:-

import java.text.SimpleDateFormat
import com.atlassian.jira.component.ComponentAccessor

//get last 30 days date
def cal = Calendar.getInstance()
cal.add(Calendar.DAY_OF_MONTH, -30)

def sdf = new SimpleDateFormat("yyyy-MM-dd")
def last30Days = sdf.parse(sdf.format(cal.time))
log.error "Date : ${last30Days}"

def vers = ComponentAccessor.getVersionManager().getVersionsReleased(14644, false) //project ID
def dateVersions = []

vers.each { version ->

def releaseDate = version.getReleaseDate()

if(releaseDate!=null) {
log.error " release date: " + sdf.format(releaseDate)

def released = version.isReleased()
if (released && releaseDate <= (last30Days as Date)){
dateVersions.add(version)
}
}
}

I hope this helps to answer your question. :)

Thank you and Kind Regards,

Ram

Hello, @Ram Kumar Aravindakshan _Adaptavist_ ,

Yes, it's working now and the issue was due to the release date only.

If you remembered, last time I was raised one question about the versions linked to another project while creating change.

To achieve that you helped me with the Rest Endpoint, Listener, and behavior. Whenever the user will click on the Version custom filed it listed down all the versions so he wants to list down only the last 30 days released version and for that, I am checking this date n all.

Can you just go through the below Rest Endpoint code and let me know what's wrong with this as when I clicked on the Version CF its not loading anything...and if i removed the date-related code then its loading all the versions.

import com.onresolve.scriptrunner.runner.rest.common.CustomEndpointDelegate
import groovy.json.JsonBuilder
import groovy.transform.BaseScript
import java.text.SimpleDateFormat
import com.atlassian.jira.project.version.VersionManager

import javax.ws.rs.core.MultivaluedMap
import javax.ws.rs.core.Response

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.project.version.Version

@BaseScript CustomEndpointDelegate delegate


//get last 30 days date
def cal = Calendar.getInstance()
cal.add(Calendar.DAY_OF_MONTH, -30)

def sdf = new SimpleDateFormat("yyyy-MM-dd")
def last30Days = sdf.parse(sdf.format(cal.time))
log.error "Date : ${last30Days}"

getMTVVersions(httpMethod: "GET", groups: ["jira-software-users"]) { MultivaluedMap queryParams, String body ->

def rt = [:]
def vers = ComponentAccessor.getVersionManager().getVersionsReleased(14644, false)

rt = [
items : vers.collect { Version v ->
def releaseDate = v.getReleaseDate()
def released = v.isReleased()
if(releaseDate!=null){
if(released && releaseDate <= (last30Days as Date)){
[
value: v.getName(),
label: v.getName(),
]
}
}
},
total : vers.size(),
footer: "Choose the MTV version... "
]
return Response.ok(new JsonBuilder(rt).toString()).build();
}

test1.JPG

It's working with the below code..

import com.onresolve.scriptrunner.runner.rest.common.CustomEndpointDelegate
import groovy.json.JsonBuilder
import groovy.transform.BaseScript
import java.text.SimpleDateFormat
import com.atlassian.jira.project.version.VersionManager

import javax.ws.rs.core.MultivaluedMap
import javax.ws.rs.core.Response

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.project.version.Version

@BaseScript CustomEndpointDelegate delegate


//get last 30 days date
def cal = Calendar.getInstance()
cal.add(Calendar.DAY_OF_MONTH, -30)

def sdf = new SimpleDateFormat("yyyy-MM-dd")
def last30Days = sdf.parse(sdf.format(cal.time))
log.error "Date : ${last30Days}"

getMTVVersions(httpMethod: "GET", groups: ["jira-software-users"]) { MultivaluedMap queryParams, String body ->

def rt = [:]
def vers = ComponentAccessor.getVersionManager().getVersionsReleased(14644, false)

rt = [
items : vers.collect { Version v ->
//def releaseDate = v.getReleaseDate()
//def released = v.isReleased()
//if(releaseDate!=null){
//if(released && releaseDate <= (last30Days as Date)){
[
value: v.getName(),
label: v.getName(),
]
//}
//}
},
total : vers.size(),
footer: "Choose the MTV version... "
]
return Response.ok(new JsonBuilder(rt).toString()).build();
}

test2.JPG

 

Thanks in advance.

Yogesh

Hi @Yogesh Mude

Comparing the code you have shared here against the code that I have shared in the previous post, it appears that you are making a different approach.

In the REST Endpoint example that I have provided in the previous post, i.e.

import com.onresolve.scriptrunner.runner.rest.common.CustomEndpointDelegate
import groovy.json.JsonBuilder
import groovy.transform.BaseScript
import groovyx.net.http.ContentType
import groovyx.net.http.HTTPBuilder
import groovyx.net.http.Method

import javax.ws.rs.core.MultivaluedMap
import javax.ws.rs.core.Response

@BaseScript CustomEndpointDelegate delegate
convertToJson { MultivaluedMap queryParams ->

def hostUrl = "http://localhost:9091"
def userName = "admin"
def password = "q"
def projectKey = "GV" // Project Key from which to get the Version list

def httpBuilder = new HTTPBuilder(hostUrl)

def issueJson = httpBuilder.request(Method.GET, ContentType.JSON) { req ->

uri.path = "/rest/api/2/project/${projectKey}/versions"

headers.'Authorization' = "Basic ${"${userName}:${password}".bytes.encodeBase64().toString()}"

response.failure = { resp, reader ->
log.warn("Failed to query JIRA API: " + reader.errorMessages)
return
}
}

def issueMap = [
items : issueJson.collect { Map row ->
[
value: row.get("name"),
html : row.get("name"),
label: row.get("name")
]
}
]

return Response.ok(new JsonBuilder(issueMap).toPrettyString()).build()
}

I am first invoking creating a GET request to the REST Endpoint and getting the JSON value. From there, I am filtering which JSON value to display. 

In the first code you have shared, if you use an IDE to analyse it, you will see it complains that it doesn't have a return statement, which is why it is failing.

Below is a print screen on the output shown in the IntelliJ IDE:-

code_check.png

You should instead try to put the if /else condition outside the Map, i.e. something like this:-

import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.scriptrunner.runner.rest.common.CustomEndpointDelegate
import groovy.json.JsonBuilder
import groovy.transform.BaseScript

import javax.ws.rs.core.MultivaluedMap
import javax.ws.rs.core.Response
import java.text.SimpleDateFormat

@BaseScript CustomEndpointDelegate delegate

//get last 30 days date
def cal = Calendar.getInstance()
cal.add(Calendar.DAY_OF_MONTH, -30)

def sdf = new SimpleDateFormat("yyyy-MM-dd")
def last30Days = sdf.parse(sdf.format(cal.time))
log.error "Date : ${last30Days}"

getMTVVersions(httpMethod: "GET", groups: ["jira-software-users"]) { MultivaluedMap queryParams, String body ->

def vers = ComponentAccessor.getVersionManager().getVersionsReleased(14644, false)

def rt = [:]
vers.each {
def releaseDate = it.releaseDate
def released = it.isReleased()
if(releaseDate!=null && released && releaseDate <=(last30Days as Date)) {

rt = [
value: it.name,
label: it.name
]
}
}
return Response.ok(new JsonBuilder(rt).toString()).build()
}

I hope this helps to answer your question. :)

Thank you and Kind Regards,

Ram

Hello, @Ram Kumar Aravindakshan _Adaptavist_ ,

I checked with the above code but it's not listing down the versions, getting No Matches.

Thanks

Hi @Yogesh Mude

I can get the code to work in my environment now.

I have modified the original code that I have shared in the previous question i.e. 

import com.onresolve.scriptrunner.runner.rest.common.CustomEndpointDelegate
import groovy.json.JsonBuilder
import groovy.transform.BaseScript
import groovyx.net.http.ContentType
import groovyx.net.http.HTTPBuilder
import groovyx.net.http.Method

import javax.ws.rs.core.MultivaluedMap
import javax.ws.rs.core.Response

@BaseScript CustomEndpointDelegate delegate
convertToJson { MultivaluedMap queryParams ->

def hostUrl = "http://localhost:9091"
def userName = "admin"
def password = "q"
def projectKey = "GV" // Project Key from which to get the Version list

def httpBuilder = new HTTPBuilder(hostUrl)

def issueJson = httpBuilder.request(Method.GET, ContentType.JSON) { req ->

uri.path = "/rest/api/2/project/${projectKey}/versions"

headers.'Authorization' = "Basic ${"${userName}:${password}".bytes.encodeBase64().toString()}"

response.failure = { resp, reader ->
log.warn("Failed to query JIRA API: " + reader.errorMessages)
return
}
}

def issueMap = [
items : issueJson.collect { Map row ->
[
value: row.get("name"),
html : row.get("name"),
label: row.get("name")
]
}
]

return Response.ok(new JsonBuilder(issueMap).toPrettyString()).build()
}

and included the exclusion of null values, i.e.:-

def denull(obj) {
if(obj instanceof Map) {
obj.collectEntries {k, v ->
if(v) [(k): denull(v)] else [:]
}
} else if(obj instanceof List) {
obj.collect { denull(it) }.findAll { it != null }
} else {
obj
}
}

Using the denull method and the date filtration, i.e. from the code you have shared, I can filter the versions according to only display versions with release dates within the date range specified.

Below is the complete updated working code for your reference:-

import com.onresolve.scriptrunner.runner.rest.common.CustomEndpointDelegate
import groovy.json.JsonBuilder
import groovy.transform.BaseScript
import groovyx.net.http.ContentType
import groovyx.net.http.HTTPBuilder
import groovyx.net.http.Method

import javax.ws.rs.core.MultivaluedMap
import javax.ws.rs.core.Response
import java.text.SimpleDateFormat

@BaseScript CustomEndpointDelegate delegate
convertToJson { MultivaluedMap queryParams ->

def hostUrl = "http://localhost:9091"
def userName = "admin"
def password = "q"
def projectKey = "GV"

def httpBuilder = new HTTPBuilder(hostUrl)

def issueJson = httpBuilder.request(Method.GET, ContentType.JSON) { req ->

uri.path = "/rest/api/2/project/${projectKey}/versions"

headers.'Authorization' = "Basic ${"${userName}:${password}".bytes.encodeBase64().toString()}"

response.failure = { resp, reader ->
log.warn "Failed to query JIRA API: ${reader.errorMessages}"
return
}
}

def cal = Calendar.getInstance()
cal.add(Calendar.DAY_OF_MONTH, -30)
def sdf = new SimpleDateFormat("yyyy-MM-dd")
def last30Days = sdf.parse(sdf.format(cal.time))

def issueMap = [
items : denull( issueJson.collect { Map row ->

def value1 = row.get("releaseDate").toString()
def storedDate = sdf.parse(value1)

if(last30Days <= storedDate) {
[
value: row.get("name"),
html : row.get("name"),
label: row.get("name")
]

}
} )
]
return Response.ok(new JsonBuilder(issueMap).toPrettyString()).build()
}

def denull(obj) {
if(obj instanceof Map) {
obj.collectEntries {k, v ->
if(v) [(k): denull(v)] else [:]
}
} else if(obj instanceof List) {
obj.collect { denull(it) }.findAll { it != null }
} else {
obj
}
}

Please note, the sample code provided is not 100% exact to your environment. Hence, you will need to make the required modifications.

Below are a few test cases.

1) Without the date filtration, I can get all four versions, i.e.:-

versions.png

 

image1.png

2) When the date filtration is included i.e. 

cal.add(Calendar.DAY_OF_MONTH, -30)

along with the denull method, in this case, for the last thirty days, I am only able to view versions that have release dates within thirty days i.e.

image2.png

3) Next, if I try further to modify the range to 10 days, i.e.:-

cal.add(Calendar.DAY_OF_MONTH, -10)

I am only able to view versions that have released dates within ten days, as shown below:-

image3.png

I hope this helps to answer your question. :)

Thank you and Kind Regards,

Ram

Hello @Ram Kumar Aravindakshan _Adaptavist_ 

Thank you very much for your response.

I'll check with the latest code and update you.

Thanks a lot :)

Hello @Ram Kumar Aravindakshan _Adaptavist_ 

Good Day!

I was trying with your REST endpoint's latest code and getting errors like static type checking error for URi.path, headers, and response.

I completely disabled my previous code and did the changes where ever required in ur code and applied.

 

 at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55)
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:43)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.plugins.rest.module.servlet.RestServletUtilsUpdaterFilter.doFilterInternal(RestServletUtilsUpdaterFilter.java:23)
at com.atlassian.plugins.rest.module.servlet.RestServletUtilsUpdaterFilter.doFilter(RestServletUtilsUpdaterFilter.java:35)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.servicedesk.internal.web.ExternalCustomerLockoutFilter.doFilter(ExternalCustomerLockoutFilter.java:55)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.mywork.client.filter.ServingRequestsFilter.doFilter(ServingRequestsFilter.java:32)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.jira.plugin.mobile.web.filter.MobileAppRequestFilter.doFilter(MobileAppRequestFilter.java:59)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.jira.plugin.mobile.login.MobileLoginSuccessFilter.doFilter(MobileLoginSuccessFilter.java:54)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.diagnostics.internal.platform.monitor.http.HttpRequestMonitoringFilter.doFilter(HttpRequestMonitoringFilter.java:55)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.analytics.client.filter.UniversalAnalyticsFilter.doFilter(UniversalAnalyticsFilter.java:75)
at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:33)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFixupFilter.doFilter(PrettyUrlsSiteMeshFixupFilter.java:32)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.prettyurls.filter.PrettyUrlsDispatcherFilter.doFilter(PrettyUrlsDispatcherFilter.java:55)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFilter.doFilter(PrettyUrlsSiteMeshFilter.java:80)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.prettyurls.filter.PrettyUrlsMatcherFilter.doFilter(PrettyUrlsMatcherFilter.java:51)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.labs.botkiller.BotKillerFilter.doFilter(BotKillerFilter.java:35)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55)
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:43)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.jira.web.filters.MobileAppRequestFilter.doFilter(MobileAppRequestFilter.java:36)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.jira.web.filters.accesslog.AccessLogFilter.executeRequest(AccessLogFilter.java:93)
at com.atlassian.jira.web.filters.accesslog.AccessLogFilter.doFilter(AccessLogFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.jira.web.filters.pagebuilder.PageBuilderFilter.doFilter(PageBuilderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.jira.web.filters.CommittedResponseHtmlErrorRecoveryFilter.doFilter(CommittedResponseHtmlErrorRecoveryFilter.java:55)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.ratelimiting.internal.filter.RateLimitFilter.doFilter(RateLimitFilter.java:73)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.troubleshooting.thready.filter.AbstractThreadNamingFilter.doFilter(AbstractThreadNamingFilter.java:46)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:56)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55)
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:43)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.jira.security.xsrf.XsrfTokenAdditionRequestFilter.doFilter(XsrfTokenAdditionRequestFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.jira.web.filters.MauEventFilter.doFilter(MauEventFilter.java:49)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:242)
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:148)
at com.atlassian.jira.web.filters.JiraLoginFilter.doFilter(JiraLoginFilter.java:77)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:38)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.pats.web.filter.TokenBasedAuthenticationFilter.doFilter(TokenBasedAuthenticationFilter.java:82)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:56)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55)
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:43)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.jira.web.filters.johnson.JiraJohnson503Filter.doFilter(JiraJohnson503Filter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:215)
at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:136)
at com.atlassian.servicedesk.internal.api.util.context.ReentrantThreadLocalBasedCodeContext.runOutOfContext(ReentrantThreadLocalBasedCodeContext.java:89)
at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runOutOfCustomerContext(CustomerContextServiceImpl.java:47)
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:206)
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:134)
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:123)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.analytics.client.filter.JiraAnalyticsFilter.doFilter(JiraAnalyticsFilter.java:30)
at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:33)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.ratelimiting.internal.filter.RateLimitPreAuthFilter.doFilter(RateLimitPreAuthFilter.java:71)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.troubleshooting.thready.filter.AbstractThreadNamingFilter.doFilter(AbstractThreadNamingFilter.java:46)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.lambda$doFilter$0(DelegatingPluginFilter.java:57)
at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:56)
at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:62)
at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37)
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:55)
at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:43)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:74)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:31)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:39)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
at com.atlassian.jira.web.filters.PathMatchingEncodingFilter.doFilter(PathMatchingEncodingFilter.java:39)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.jira.web.filters.MultipartBoundaryCheckFilter.doFilter(MultipartBoundaryCheckFilter.java:36)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:74)
at com.atlassian.jira.web.filters.JiraFirstFilter.doFilter(JiraFirstFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:115)
at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:92)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:544)
at org.apache.catalina.valves.StuckThreadDetectionValve.invoke(StuckThreadDetectionValve.java:206)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:616)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1634)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
2021-06-22 08:31:07,074 ERROR [common.UserCustomScriptEndpoint]: *************************************************************************************
2021-06-22 08:31:07,075 ERROR [common.UserCustomScriptEndpoint]: Script endpoint failed on method: GET convertToJson
groovyx.net.http.ResponseParseException: status code: 503, reason phrase: Service Unavailable
at groovyx.net.http.HTTPBuilder$1.handleResponse(HTTPBuilder.java:495)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:223)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165)
at groovyx.net.http.HTTPBuilder.doRequest(HTTPBuilder.java:515)
at groovyx.net.http.HTTPBuilder.doRequest(HTTPBuilder.java:434)
at groovyx.net.http.HTTPBuilder.request(HTTPBuilder.java:383)
at groovyx.net.http.HTTPBuilder$request.call(Unknown Source)
at Script293$_run_closure1.doCall(Script293.groovy:22)
at com.onresolve.scriptrunner.runner.rest.common.UserCustomScriptEndpoint$_doEndpoint_closure2.doCall(UserCustomScriptEndpoint.groovy:187)
at com.onresolve.scriptrunner.runner.rest.common.UserCustomScriptEndpoint$_doEndpoint_closure2.doCall(UserCustomScriptEndpoint.groovy)
at com.onresolve.scriptrunner.runner.diag.DiagnosticsManagerImpl$DiagnosticsExecutionHandlerImpl$_execute_closure1.doCall(DiagnosticsManagerImpl.groovy:351)
at com.onresolve.scriptrunner.runner.diag.DiagnosticsManagerImpl$DiagnosticsExecutionHandlerImpl$_execute_closure1.doCall(DiagnosticsManagerImpl.groovy)
at com.onresolve.scriptrunner.runner.ScriptExecutionRecorder.withRecording(ScriptExecutionRecorder.groovy:13)
at com.onresolve.scriptrunner.runner.ScriptExecutionRecorder$withRecording.call(Unknown Source)
at com.onresolve.scriptrunner.runner.diag.DiagnosticsManagerImpl$DiagnosticsExecutionHandlerImpl.execute(DiagnosticsManagerImpl.groovy:349)
at com.onresolve.scriptrunner.runner.rest.common.UserCustomScriptEndpoint.doEndpoint(UserCustomScriptEndpoint.groovy:220)
at com.onresolve.scriptrunner.runner.rest.common.UserCustomScriptEndpoint.getUserEndpoint(UserCustomScriptEndpoint.groovy:71)
Caused by: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object
The current character read is '<' with an int value of 60
Unable to determine the current character, it is not a string, number, array, or object
line number 1
index number 0
<html><body><h1>503 Service Unavailable</h1>
^
at org.apache.groovy.json.internal.JsonParserCharArray.decodeValueInternal(JsonParserCharArray.java:202)
at org.apache.groovy.json.internal.JsonParserCharArray.decodeValue(JsonParserCharArray.java:153)
at org.apache.groovy.json.internal.JsonParserCharArray.decodeFromChars(JsonParserCharArray.java:43)
at org.apache.groovy.json.internal.JsonParserCharArray.parse(JsonParserCharArray.java:380)
at org.apache.groovy.json.internal.BaseJsonParser.parse(BaseJsonParser.java:131)
at groovyx.net.http.ParserRegistry.parseJSON(ParserRegistry.java:280)
at groovyx.net.http.HTTPBuilder.parseResponse(HTTPBuilder.java:560)
at groovyx.net.http.HTTPBuilder$1.handleResponse(HTTPBuilder.java:489)
... 16 more
Start of logs truncated as they exceeded 300 lines.

 

image.png

Hi @Yogesh Mude

The code I have shared is working.

Regarding the error messages you are getting on the editor, you can ignore them as they are only static type checks.

But, from the log output you have shared, it appears you are getting an HTTP 503 error, which means your Service is unavailable.

Can you try and make a basic CURL request to access the REST Endpoint or attempt to access it via the browser and see if it is accessible?

Also, try and see if you can directly access the Jira instance instead of going through the webserver and see if you can access the REST Endpoint?

Thank you and Kind Regards,

Ram

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you