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

ScriptingExecutor may execute scripts before their dependent components are deployed.

    Details

      Description

      Steps to replicate:

      • Set logging level for com.liferay.portal.scripting.executor to ALL
      • Create a module that has Groovy scripts in the resources/META-INF/resources/scripts folder
      • In script create new GroovyScriptingContext and print anything to log to easily track it in the server log
      • Make sure server is not running
      • Deploy module to server
      • Start server and look through log files

      Expected: Server starts and the script gets run without errors

      Actual: Null pointer exception thrown GroovyScriptingContext line 38

      Related issues can be found by using other services before they are registered. For example when using the DDMStructureLocalServiceUtil.fetchStructure(), I get a null pointer exception on line 324 because the getService() method returns null.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              haoliang.wu Haoliang Wu (Inactive)
              Reporter:
              michael.han Michael Han (Inactive)
              Participants of an Issue:
              Recent user:
              Tina Tian
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 10 weeks, 5 days ago

                  Packages

                  Version Package
                  7.0.1 CE GA2