-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.1 CE GA2
-
Fix Version/s: 7.0.1 CE GA2
-
Component/s: Portal Services, Portal Services > Scripting
-
Labels:
-
Story Points:1.5
-
Fix Priority:3
-
Git Pull Request:
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.