java.lang.IllegalArgumentException: argument type mismatch

Liferay Issues | Krisztian Rostas | 11 months ago
  1. 0

    *Reproduction steps:* 1) Add Asset Publisher portlet to a page 2) Create custom ADT using the following freemarker template, set groupIds value: {code} <#assign liferay_ui = taglibLiferayHash["/WEB-INF/tld/liferay-ui.tld"] /> <@liferay_ui["asset-tags-selector"] groupIds=20192></@> {code} After applying the custom template exception thrown: {code} 15:01:26,604 ERROR [http-bio-8080-exec-2][IncludeTag:128] Current URL /web/guest/page2 generates exception: com.liferay.portal.kernel.templateparser.TransformException: Unhandled exception java.lang.IllegalArgumentException: argument type mismatch at freemarker.ext.jsp.JspTagModelBase.setupTag(JspTagModelBase.java:87) at freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java:103) at freemarker.core.Environment.visit(Environment.java:297) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.Environment.process(Environment.java:199) at freemarker.template.Template.process(Template.java:237) at com.liferay.portal.template.freemarker.FreeMarkerTemplate.processTemplate(FreeMarkerTemplate.java:121) at com.liferay.portal.template.AbstractSingleResourceTemplate.doProcessTemplate(AbstractSingleResourceTemplate.java:68) at com.liferay.portal.template.AbstractTemplate._write(AbstractTemplate.java:157) at com.liferay.portal.template.AbstractSingleResourceTemplate.processTemplate(AbstractSingleResourceTemplate.java:91) at com.liferay.portal.template.RestrictedTemplate.processTemplate(RestrictedTemplate.java:97) at com.liferay.portal.templateparser.Transformer.mergeTemplate(Transformer.java:256) at com.liferay.portal.templateparser.Transformer.transform(Transformer.java:145) at com.liferay.portlet.display.template.internal.PortletDisplayTemplateImpl.renderDDMTemplate(PortletDisplayTemplateImpl.java:452) at com.liferay.portlet.display.template.internal.PortletDisplayTemplateImpl.renderDDMTemplate(PortletDisplayTemplateImpl.java:479) at com.liferay.portlet.display.template.PortletDisplayTemplateUtil.renderDDMTemplate(PortletDisplayTemplateUtil.java:144) at org.apache.jsp.template_005frenderer.start_jsp._jspService(start_jsp:258) {code} *Reproduced on:* ee-6.2.x:35e802a3f488b04d186d82c7c3e99c1a5b60595f master:6abb5b942e1ad75e57089b86d03d0accaa591474 *Analysis (Eduardo):* " If you try topass groupIds param through the taglib in freemarker as a long[], it fails because the array is being wrapped by Freemarker with a different type." *Additional info*: original issue reported for Audience Targeting

    Liferay Issues | 11 months ago | Krisztian Rostas
    java.lang.IllegalArgumentException: argument type mismatch
  2. 0

    *Reproduction steps:* 1) Add Asset Publisher portlet to a page 2) Create custom ADT using the following freemarker template, set groupIds value: {code} <#assign liferay_ui = taglibLiferayHash["/WEB-INF/tld/liferay-ui.tld"] /> <@liferay_ui["asset-tags-selector"] groupIds=20192></@> {code} After applying the custom template exception thrown: {code} 15:01:26,604 ERROR [http-bio-8080-exec-2][IncludeTag:128] Current URL /web/guest/page2 generates exception: com.liferay.portal.kernel.templateparser.TransformException: Unhandled exception java.lang.IllegalArgumentException: argument type mismatch at freemarker.ext.jsp.JspTagModelBase.setupTag(JspTagModelBase.java:87) at freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java:103) at freemarker.core.Environment.visit(Environment.java:297) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:221) at freemarker.core.Environment.process(Environment.java:199) at freemarker.template.Template.process(Template.java:237) at com.liferay.portal.template.freemarker.FreeMarkerTemplate.processTemplate(FreeMarkerTemplate.java:121) at com.liferay.portal.template.AbstractSingleResourceTemplate.doProcessTemplate(AbstractSingleResourceTemplate.java:68) at com.liferay.portal.template.AbstractTemplate._write(AbstractTemplate.java:157) at com.liferay.portal.template.AbstractSingleResourceTemplate.processTemplate(AbstractSingleResourceTemplate.java:91) at com.liferay.portal.template.RestrictedTemplate.processTemplate(RestrictedTemplate.java:97) at com.liferay.portal.templateparser.Transformer.mergeTemplate(Transformer.java:256) at com.liferay.portal.templateparser.Transformer.transform(Transformer.java:145) at com.liferay.portlet.display.template.internal.PortletDisplayTemplateImpl.renderDDMTemplate(PortletDisplayTemplateImpl.java:452) at com.liferay.portlet.display.template.internal.PortletDisplayTemplateImpl.renderDDMTemplate(PortletDisplayTemplateImpl.java:479) at com.liferay.portlet.display.template.PortletDisplayTemplateUtil.renderDDMTemplate(PortletDisplayTemplateUtil.java:144) at org.apache.jsp.template_005frenderer.start_jsp._jspService(start_jsp:258) {code} *Reproduced on:* ee-6.2.x:35e802a3f488b04d186d82c7c3e99c1a5b60595f master:6abb5b942e1ad75e57089b86d03d0accaa591474 *Analysis (Eduardo):* " If you try topass groupIds param through the taglib in freemarker as a long[], it fails because the array is being wrapped by Freemarker with a different type." *Additional info*: original issue reported for Audience Targeting

    Liferay Issues | 11 months ago | Krisztian Rostas
    java.lang.IllegalArgumentException: argument type mismatch
  3. 0

    ADT + Freemaker + liferay-portlet taglib - Forums | Liferay

    liferay.com | 1 year ago
    java.lang.IllegalArgumentException: argument type mismatch
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Bulk edit plan permission save throws the following stack trace when username contains @ (example {{asd@}}): {noformat}2015-09-15 21:08:10,693 ERROR [http-bio-8085-exec-3] [FiveOhOh] 500 Exception was thrown. java.lang.IllegalArgumentException: In expression [@ww.hidden name='${grantedPermission}' value='true' /] ['${grantedPermission}'] evaluated as [bambooPermission_user_asd@_ADMINISTRATION] was deemed unsafe at freemarker.core.UnifiedCall.accept(UnifiedCall.java:150) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167) at freemarker.core.Environment.visit(Environment.java:417) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.Environment.visit(Environment.java:299) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:165) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.Environment.process(Environment.java:190) at freemarker.template.Template.process(Template.java:289) at freemarker.template.Template.process(Template.java:243) at org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:215) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.validateWorkflow(BambooWorkflowInterceptor.java:54) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.access$000(BambooWorkflowInterceptor.java:16) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor$1.call(BambooWorkflowInterceptor.java:33) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor$1.call(BambooWorkflowInterceptor.java:29) at com.atlassian.bamboo.util.BambooProfilingUtils.withUtilTimerStack(BambooProfilingUtils.java:51) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.doIntercept(BambooWorkflowInterceptor.java:28) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246){noformat}

    Atlassian JIRA | 1 year ago | Deric Lee [Atlassian]
    java.lang.IllegalArgumentException: In expression [@ww.hidden name='${grantedPermission}' value='true' /] ['${grantedPermission}'] evaluated as [bambooPermission_user_asd@_ADMINISTRATION] was deemed unsafe
  6. 0

    Bulk edit plan permission save throws the following stack trace when username contains @ (example {{asd@}}): {noformat}2015-09-15 21:08:10,693 ERROR [http-bio-8085-exec-3] [FiveOhOh] 500 Exception was thrown. java.lang.IllegalArgumentException: In expression [@ww.hidden name='${grantedPermission}' value='true' /] ['${grantedPermission}'] evaluated as [bambooPermission_user_asd@_ADMINISTRATION] was deemed unsafe at freemarker.core.UnifiedCall.accept(UnifiedCall.java:150) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167) at freemarker.core.Environment.visit(Environment.java:417) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.Environment.visit(Environment.java:299) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:165) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:210) at freemarker.core.Environment.process(Environment.java:190) at freemarker.template.Template.process(Template.java:289) at freemarker.template.Template.process(Template.java:243) at org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:215) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:168) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.validateWorkflow(BambooWorkflowInterceptor.java:54) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.access$000(BambooWorkflowInterceptor.java:16) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor$1.call(BambooWorkflowInterceptor.java:33) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor$1.call(BambooWorkflowInterceptor.java:29) at com.atlassian.bamboo.util.BambooProfilingUtils.withUtilTimerStack(BambooProfilingUtils.java:51) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.doIntercept(BambooWorkflowInterceptor.java:28) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246){noformat}

    Atlassian JIRA | 1 year ago | Deric Lee
    java.lang.IllegalArgumentException: In expression [@ww.hidden name='${grantedPermission}' value='true' /] ['${grantedPermission}'] evaluated as [bambooPermission_user_asd@_ADMINISTRATION] was deemed unsafe

    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.IllegalArgumentException

      argument type mismatch

      at freemarker.ext.jsp.JspTagModelBase.setupTag()
    2. FreeMarker
      Template.process
      1. freemarker.ext.jsp.JspTagModelBase.setupTag(JspTagModelBase.java:87)
      2. freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java:103)
      3. freemarker.core.Environment.visit(Environment.java:297)
      4. freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
      5. freemarker.core.Environment.visit(Environment.java:221)
      6. freemarker.core.MixedContent.accept(MixedContent.java:92)
      7. freemarker.core.Environment.visit(Environment.java:221)
      8. freemarker.core.Environment.process(Environment.java:199)
      9. freemarker.template.Template.process(Template.java:237)
      9 frames
    3. com.liferay.portal
      FreeMarkerTemplate.processTemplate
      1. com.liferay.portal.template.freemarker.FreeMarkerTemplate.processTemplate(FreeMarkerTemplate.java:121)
      1 frame
    4. Liferay Portal Impl
      Transformer.transform
      1. com.liferay.portal.template.AbstractSingleResourceTemplate.doProcessTemplate(AbstractSingleResourceTemplate.java:68)
      2. com.liferay.portal.template.AbstractTemplate._write(AbstractTemplate.java:157)
      3. com.liferay.portal.template.AbstractSingleResourceTemplate.processTemplate(AbstractSingleResourceTemplate.java:91)
      4. com.liferay.portal.template.RestrictedTemplate.processTemplate(RestrictedTemplate.java:97)
      5. com.liferay.portal.templateparser.Transformer.mergeTemplate(Transformer.java:256)
      6. com.liferay.portal.templateparser.Transformer.transform(Transformer.java:145)
      6 frames
    5. com.liferay.portlet
      PortletDisplayTemplateUtil.renderDDMTemplate
      1. com.liferay.portlet.display.template.internal.PortletDisplayTemplateImpl.renderDDMTemplate(PortletDisplayTemplateImpl.java:452)
      2. com.liferay.portlet.display.template.internal.PortletDisplayTemplateImpl.renderDDMTemplate(PortletDisplayTemplateImpl.java:479)
      3. com.liferay.portlet.display.template.PortletDisplayTemplateUtil.renderDDMTemplate(PortletDisplayTemplateUtil.java:144)
      3 frames
    6. org.apache.jsp
      start_jsp._jspService
      1. org.apache.jsp.template_005frenderer.start_jsp._jspService(start_jsp:258)
      1 frame