java.lang.UnsupportedOperationException: This code or velocity template expects a GenericValue, but received an Issue. We need to recode

Atlassian JIRA | Vincent Thoulé | 9 years ago
  1. 0

    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}

    Atlassian JIRA | 9 years ago | Vincent Thoulé
    java.lang.UnsupportedOperationException: This code or velocity template expects a GenericValue, but received an Issue. We need to recode
  2. 0

    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}

    Atlassian JIRA | 9 years ago | Vincent Thoulé
    java.lang.UnsupportedOperationException: This code or velocity template expects a GenericValue, but received an Issue. We need to recode
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    atlassianlabs / automation / issues / #22 - UnsupportedOperationException from Analytics when using scheduled Event publisher — Bitbucket

    bitbucket.org | 1 year ago
    java.lang.UnsupportedOperationException: This code or velocity template expects a GenericValue, but received an Issue. We need to recode
  5. 0

    In the bundle <dependency> <groupId>org.apache.servicemix.bundles</groupId> <artifactId>org.apache.servicemix.bundles.fop</artifactId> <version>1.0_2</version> </dependency> It seems that there is a difference between the bundle and original fop jar(http://repo1.maven.org/maven2/org/apache/xmlgraphics/fop/1.0/fop-1.0.jar). It leaves out service configuration in the bundle under META-INF\services\. there are some excpetion when using it in karaf: 2012-12-13 16:22:41,596 | ERROR | qtp1553639268-32 | DefaultFOProcessor | 675 - fo-to-pdf-converter - 1.0.41001.20121213-1411-RELEASE | Transformation failed: Don't know how to handle "application/pdf" as an output format. Neither an FOEventHandler, nor a Renderer could be found fo r this output format. java.lang.UnsupportedOperationException: Don't know how to handle "application/pdf" as an output format. Neither an FOEventHandler, nor a Renderer c ould be found for this output format. at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:361) at org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:105) at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:101) at org.apache.fop.apps.Fop.<init>(Fop.java:79) at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:271)

    SpringSource Issue Tracker | 4 years ago | cliff.chen
    java.lang.UnsupportedOperationException: Don't know how to handle "application/pdf" as an output format. Neither an FOEventHandler, nor a Renderer c ould be found for this output format.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. com.atlassian.jira
      DefaultIssueManager.isEditable
      1. com.atlassian.jira.issue.DocumentIssueImpl.getString(DocumentIssueImpl.java:306)
      2. com.atlassian.jira.workflow.SimpleWorkflowManager.isEditable(SimpleWorkflowManager.java:482)
      3. com.atlassian.jira.issue.managers.DefaultIssueManager.isEditable(DefaultIssueManager.java:348)
      3 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor149.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    4. com.atlassian.util
      ObjectProfiler.profiledInvoke
      1. com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:71)
      1 frame
    5. com.atlassian.jira
      SwitchingInvocationHandler.invoke
      1. com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28)
      1 frame
    6. Unknown
      $Proxy3.isEditable
      1. $Proxy3.isEditable(Unknown Source)
      1 frame
    7. com.atlassian.jira
      DefaultWorklogService.hasPermissionToCreate
      1. com.atlassian.jira.bc.issue.worklog.DefaultWorklogService.isIssueInEditableWorkflowState(DefaultWorklogService.java:514)
      2. com.atlassian.jira.bc.issue.worklog.DefaultWorklogService.hasPermissionToCreate(DefaultWorklogService.java:342)
      2 frames