Million of entries in logfile

Hey.

Can you tell me, what is responsible for this errors in the logfiles?

2015-02-26 10:38:56,391 http-bio-8080-exec-70072 ERROR info 638x3148734x1 k0wx6f 10.1.16.124,10.1.16.51 /rest/api/2/search [onresolve.jira.groovy.GroovyCustomField] javax.script.ScriptException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'DocumentIssueImpl[issueKey=IT-6698]' with class 'com.atlassian.jira.issue.DocumentIssueImpl' to class 'com.atlassian.jira.issue.MutableIssue'
2015-02-26 10:38:56,398 http-bio-8080-exec-70072 ERROR info 638x3148734x1 k0wx6f 10.1.16.124,10.1.16.51 /rest/api/2/search [onresolve.jira.groovy.GroovyCustomField] javax.script.ScriptException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'DocumentIssueImpl[issueKey=IT-6698]' with class 'com.atlassian.jira.issue.DocumentIssueImpl' to class 'com.atlassian.jira.issue.MutableIssue'
2015-02-26 10:38:56,421 http-bio-8080-exec-70149 ERROR PersonickB 638x3148762x2 x6zq90 10.0.0.216,10.1.16.51 /sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml [onresolve.jira.groovy.GroovyCustomField] javax.script.ScriptException: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'DocumentIssueImpl[issueKey=NT-1328]' with class 'com.atlassian.jira.issue.DocumentIssueImpl' to class 'com.atlassian.jira.issue.MutableIssue'

The logfile is growing 30 GB in 2 days.

2 answers

It is pretty simple to avoid this problem.  I didn't test this in a scripted field but in a validator I did something like this.

(where thisIssue =  a returned issue from the JQL query / com.atlassian.jira.issue.DocumentIssueImpl' )

MutableIssue mIssue = issueManager.getIssueObject(thisIssue.getId())

 

 

You need to be careful to load it from the database only if you actually need to... there will be a performance hit if you do this for many issues returned from your query.

Check your script fields, looks like you have one that does a JQL query and attempts to cast it to a MutableIssue. If you just want to "solve" the problem then remove the script field.

Jamie, Even i am facing the same issue, is there any solution to avoid this error instead removing scripted field. Thanks, Vijay

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 31, 2018 in Marketplace Apps

Marketplace Spotlight: Zephyr

Hello Atlassian Community! Each month, we run a series of Spotlights to highlight Marketplace vendors and apps that our team thinks this Community would find valuable. In last month's Spotlig...

412 views 0 3
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