Details

      Description

      An error is thrown generating pemission test cases when the resource does not have a POST method with "siteId" parameter

       

      mar 17, 2021 11:37:46 AM freemarker.log._JULLoggerFactory$JULLogger error
      GRAVE: Error executing FreeMarker template
      FreeMarker template error:
      The following has evaluated to null or missing:
      ==> freeMarkerTool.getPostSchemaJavaMethodSignature(javaMethodSignatures, "siteId", schemaName)  [in template "com/liferay/portal/tools/rest/builder/dependencies/base_resource_test_case.ftl" at line 360, column 89]
      
      
      ----
      Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
      ----
      
      
      ----
      FTL stack trace ("~" means nesting-related):
      	- Failed at: ${freeMarkerTool.getPostSchemaJavaMet...  [in template "com/liferay/portal/tools/rest/builder/dependencies/base_resource_test_case.ftl" at line 360, column 87]
      ----
      
      
      Java stack trace (for programmers):
      ----
      freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
      	at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)
      	at freemarker.core.UnexpectedTypeException.newDesciptionBuilder(UnexpectedTypeException.java:85)
      	at freemarker.core.UnexpectedTypeException.<init>(UnexpectedTypeException.java:48)
      	at freemarker.core.NonHashException.<init>(NonHashException.java:49)
      	at freemarker.core.Dot._eval(Dot.java:48)
      	at freemarker.core.Expression.eval(Expression.java:83)
      	at freemarker.core.Expression.evalAndCoerceToStringOrUnsupportedMarkup(Expression.java:123)
      	at freemarker.core.BuiltInForString.getTargetString(BuiltInForString.java:34)
      	at freemarker.core.BuiltInForString._eval(BuiltInForString.java:29)
      	at freemarker.core.Expression.eval(Expression.java:83)
      	at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:100)
      	at freemarker.core.DollarVariable.accept(DollarVariable.java:63)
      	at freemarker.core.Environment.visit(Environment.java:330)
      	at freemarker.core.Environment.visit(Environment.java:336)
      	at freemarker.core.Environment.visit(Environment.java:336)
      	at freemarker.core.Environment.visit(Environment.java:372)
      	at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing(IteratorBlock.java:317)
      	at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:271)
      	at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:242)
      	at freemarker.core.Environment.visitIteratorBlock(Environment.java:642)
      	at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:107)
      	at freemarker.core.IteratorBlock.accept(IteratorBlock.java:93)
      	at freemarker.core.Environment.visit(Environment.java:330)
      	at freemarker.core.Environment.visit(Environment.java:336)
      	at freemarker.core.Environment.process(Environment.java:309)
      	at freemarker.template.Template.process(Template.java:384)
      	at com.liferay.portal.tools.rest.builder.internal.freemarker.FreeMarker.processTemplate(FreeMarker.java:60)
      	at com.liferay.portal.tools.rest.builder.internal.freemarker.util.FreeMarkerUtil.processTemplate(FreeMarkerUtil.java:32)
      	at com.liferay.portal.tools.rest.builder.RESTBuilder._createBaseResourceTestCaseFile(RESTBuilder.java:524)
      	at com.liferay.portal.tools.rest.builder.RESTBuilder.build(RESTBuilder.java:324)
      	at com.liferay.portal.tools.rest.builder.RESTBuilder.main(RESTBuilder.java:115)
      
      
      Exception in thread "main" java.lang.RuntimeException: Error generating REST API
      The following has evaluated to null or missing:
      ==> freeMarkerTool.getPostSchemaJavaMethodSignature(javaMethodSignatures, "siteId", schemaName)  [in template "com/liferay/portal/tools/rest/builder/dependencies/base_resource_test_case.ftl" at line 360, column 89]
      
      
      ----
      Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
      ----
      
      
      ----
      FTL stack trace ("~" means nesting-related):
      	- Failed at: ${freeMarkerTool.getPostSchemaJavaMet...  [in template "com/liferay/portal/tools/rest/builder/dependencies/base_resource_test_case.ftl" at line 360, column 87]
      ----
      	at com.liferay.portal.tools.rest.builder.RESTBuilder.main(RESTBuilder.java:125)
      

       

       

        Attachments

          Activity

            People

            Assignee:
            javier.dearcos Javier de Arcos Velilla
            Reporter:
            javier.dearcos Javier de Arcos Velilla
            Participants of an Issue:
            Recent user:
            Sophia Zhang
            Engineering Assignee:
            Javier de Arcos Velilla
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              37 weeks, 4 days ago

                Packages

                Version Package
                7.4.1 CE GA2 DXP 7,4
                7.4.13 DXP GA1
                Master