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

Error using service builder when lazy attribute of blob column is set to false

    Details

      Description

      Steps to reproduce

      1. Configure a Liferay workspace for 7.0
        Example: blade init -v 7.0 liferay-workspace-for-testing
      2. Create a new module of service builder type.
        Example: blade create -v 7.0 -p com.liferay.support.test -t service-builder my-sb-module
      3. In the service.xml file, define a new column of Blob type, with its lazy attribute to false.
        Example: <column name="fieldBlob" type="Blob" lazy="false" />
      4. Run gradlew buildService task to generate services.

      Expected result:
      A BUILD SUCCESSFUL message in console.

      Observed result:
      An error trace is showed in console:

      > Task :modules:my-sb-module:my-sb-module-service:buildService FAILED
      Building Foo
      Writing src/main/java/com/liferay/support/test/service/persistence/impl/FooPersistenceImpl.java
      14:23:28,131 ERROR [runtime:60] Error executing FreeMarker template
      FreeMarker template error:
      The following has evaluated to null or missing:
      ==> columnBitmaskEnabled  [in template "com/liferay/portal/tools/service/builder/dependencies/model_impl.ftl" at line 751, column 79]
      
      ----
      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: #if !entityColumn.isOrderColumn() && ...  [in template "com/liferay/portal/tools/service/builder/dependencies/model_impl.ftl" at line 751, column 41]
      ----
      ...
      ..
      .
      FAILURE: Build failed with an exception.
      ...
      BUILD FAILED
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

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

                  Packages

                  Version Package
                  7.0.X
                  7.1.X
                  7.2.X
                  Master