Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-89274

Service builder will fail if an entity has partial uad attribute usage

    Details

      Description

      Steps to Reproduce:

      1. On the command line, navigate to the module "modules/util/portal-tools-service-builder-test-service"
      2. Add the following block as an entity to "service.xml":
        <entity name="UADPartialEntry" local-service="true">
        
        	<!-- PK fields -->
        
        	<column name="uadPartialEntryId" primary="true" type="long" />
        
        	<!-- Other fields -->
        
        	<column name="userId" type="long" />
        	<column name="userName" type="String" />
        
        	<column name="message" type="String" uad-nonanonymizable="true" />
        </entity>
        
      3. Run "gradle buildService" the command line

      Expected result: service builder completes with no errors
      Actual result: Freemarker errors are thrown

      More Info:
      Abbreviated stack trace:

      Java stack trace (for programmers):
      ----
      ----
      freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
      	at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:131)
      	at freemarker.core.EvalUtil.coerceModelToString(EvalUtil.java:355)
      	at freemarker.core.Expression.evalAndCoerceToString(Expression.java:82)
      	at freemarker.core.DollarVariable.accept(DollarVariable.java:41)
      	at freemarker.core.Environment.visit(Environment.java:324)
      	at freemarker.core.MixedContent.accept(MixedContent.java:54)
      Tip: If the failing expression is known to be 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: ${textFormatter.format(uadAnonymizabl...  [in template "com/liferay/portal/tools/service/builder/dependencies/base_uad_anonymizer.ftl" at line 38, column 145]
      

        Attachments

          Activity

            People

            • Assignee:
              brian.chan Brian Chan
              Reporter:
              drew.brokke Drew Brokke
              Participants of an Issue:
              Recent user:
              Michael Saechang
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                26 weeks, 1 day ago

                Packages

                Version Package
                Master