java.lang.UnsupportedOperationException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Extending the *SearchRequestPortlet* for Kaamelot Portlet, I use *WorklogService.hasPermissionToCreate(JiraServiceContext jiraServiceContext, Issue issue)* . As *SearchRequestPortlet* provides through its *SearchProvider* a list of Issue based on class DocumentIssueImpl, the *hasPermissionToCreate()* fails with follow stacktrace. {code} 2007-07-11 11:28:24,944 http-8080-Processor24 ERROR [com.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.UnsupportedOperationException: This code or velocity template expects a GenericValue, but received an Issue. We need to recode java.lang.UnsupportedOperationException: This code or velocity template expects a GenericValue, but received an Issue. We need to recode at com.atlassian.jira.issue.DocumentIssueImpl.getString(DocumentIssueImpl.java:306) at com.atlassian.jira.workflow.SimpleWorkflowManager.isEditable(SimpleWorkflowManager.java:482) at com.atlassian.jira.issue.managers.DefaultIssueManager.isEditable(DefaultIssueManager.java:348) at sun.reflect.GeneratedMethodAccessor149.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:71) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at $Proxy3.isEditable(Unknown Source) at com.atlassian.jira.bc.issue.worklog.DefaultWorklogService.isIssueInEditableWorkflowState(DefaultWorklogService.java:514) at com.atlassian.jira.bc.issue.worklog.DefaultWorklogService.hasPermissionToCreate(DefaultWorklogService.java:342) {code} *DocumentIssueImpl* throws _*UnsupportedOperationException*_ on *getString()* call done by *SimpleWorkflowManager.isEditable(Issue issue)*. In *SimpleWorkflowManager.isEditable(Issue issue)*, the retrieve of StatusId .. {code:java}final String status = issue.getString("status");{code} should be done as follow : {code:java}final String status = issue.getStatusObject().getId();{code}
    via by Vincent Thoulé,
  • Extending the *SearchRequestPortlet* for Kaamelot Portlet, I use *WorklogService.hasPermissionToCreate(JiraServiceContext jiraServiceContext, Issue issue)* . As *SearchRequestPortlet* provides through its *SearchProvider* a list of Issue based on class DocumentIssueImpl, the *hasPermissionToCreate()* fails with follow stacktrace. {code} 2007-07-11 11:28:24,944 http-8080-Processor24 ERROR [com.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.UnsupportedOperationException: This code or velocity template expects a GenericValue, but received an Issue. We need to recode java.lang.UnsupportedOperationException: This code or velocity template expects a GenericValue, but received an Issue. We need to recode at com.atlassian.jira.issue.DocumentIssueImpl.getString(DocumentIssueImpl.java:306) at com.atlassian.jira.workflow.SimpleWorkflowManager.isEditable(SimpleWorkflowManager.java:482) at com.atlassian.jira.issue.managers.DefaultIssueManager.isEditable(DefaultIssueManager.java:348) at sun.reflect.GeneratedMethodAccessor149.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:71) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at $Proxy3.isEditable(Unknown Source) at com.atlassian.jira.bc.issue.worklog.DefaultWorklogService.isIssueInEditableWorkflowState(DefaultWorklogService.java:514) at com.atlassian.jira.bc.issue.worklog.DefaultWorklogService.hasPermissionToCreate(DefaultWorklogService.java:342) {code} *DocumentIssueImpl* throws _*UnsupportedOperationException*_ on *getString()* call done by *SimpleWorkflowManager.isEditable(Issue issue)*. In *SimpleWorkflowManager.isEditable(Issue issue)*, the retrieve of StatusId .. {code:java}final String status = issue.getString("status");{code} should be done as follow : {code:java}final String status = issue.getStatusObject().getId();{code}
    via by Vincent Thoulé,
    • java.lang.UnsupportedOperationException: This code or velocity template expects a GenericValue, but received an Issue. We need to recode at com.atlassian.jira.issue.DocumentIssueImpl.getString(DocumentIssueImpl.java:306) at com.atlassian.jira.workflow.SimpleWorkflowManager.isEditable(SimpleWorkflowManager.java:482) at com.atlassian.jira.issue.managers.DefaultIssueManager.isEditable(DefaultIssueManager.java:348) at sun.reflect.GeneratedMethodAccessor149.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:71) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at $Proxy3.isEditable(Unknown Source) at com.atlassian.jira.bc.issue.worklog.DefaultWorklogService.isIssueInEditableWorkflowState(DefaultWorklogService.java:514) at com.atlassian.jira.bc.issue.worklog.DefaultWorklogService.hasPermissionToCreate(DefaultWorklogService.java:342)
    No Bugmate found.