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

Compile error in portal-template-freemarker when running FreeMarkerTemplateTest

    Details

      Description

      This is a 7.0.x only test compile issue.

      Reproduced on liferay-portal-ee 7.0.x GitId: 0d4886b24bec5f019b1bcb71e06d0b92de00ca9f

      1. Navigate to the portal-template-freemarker module in the command line.
      2. Run the following test: gradlew test --tests *FreeMarkerTemplateTest

      Expected results: The test compiles and runs without error.
      Actual results: The test fails to compile. See stacktrace below.

      :apps:foundation:portal-template:portal-template-freemarker:compileTestJava
      /Users/mrprigge/Repos/liferay-portal-ee-7.0.x/modules/apps/foundation/portal-template/portal-template-freemarker/src/test/java/com/liferay/portal/template/freemarker/internal/FreeMarkerTemplateTest.java:29: error: package com.liferay.registry does not exist
      import com.liferay.registry.Registry;
                                 ^
      /Users/mrprigge/Repos/liferay-portal-ee-7.0.x/modules/apps/foundation/portal-template/portal-template-freemarker/src/test/java/com/liferay/portal/template/freemarker/internal/FreeMarkerTemplateTest.java:30: error: package com.liferay.registry does not exist
      import com.liferay.registry.RegistryUtil;
                                 ^
      /Users/mrprigge/Repos/liferay-portal-ee-7.0.x/modules/apps/foundation/portal-template/portal-template-freemarker/src/test/java/com/liferay/portal/template/freemarker/internal/FreeMarkerTemplateTest.java:73: error: cannot find symbol
                      Registry registry = RegistryUtil.getRegistry();
                      ^
        symbol:   class Registry
        location: class FreeMarkerTemplateTest
      /Users/mrprigge/Repos/liferay-portal-ee-7.0.x/modules/apps/foundation/portal-template/portal-template-freemarker/src/test/java/com/liferay/portal/template/freemarker/internal/FreeMarkerTemplateTest.java:73: error: cannot find symbol
                      Registry registry = RegistryUtil.getRegistry();
                                          ^
        symbol:   variable RegistryUtil
        location: class FreeMarkerTemplateTest
      Note: /Users/mrprigge/Repos/liferay-portal-ee-7.0.x/modules/apps/foundation/portal-template/portal-template-freemarker/src/test/java/com/liferay/portal/template/freemarker/internal/FreeMarkerTemplateTest.java uses or overrides a deprecated API.
      Note: Recompile with -Xlint:deprecation for details.
      4 errors
      :apps:foundation:portal-template:portal-template-freemarker:compileTestJava FAILED
      
      FAILURE: Build failed with an exception.
      
      * What went wrong:
      Execution failed for task ':apps:foundation:portal-template:portal-template-freemarker:compileTestJava'.
      > Compilation failed; see the compiler error output for details.
      
      * Try:
      Run with --info or --debug option to get more log output.
      
      * Exception is:
      org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':apps:foundation:portal-template:portal-template-freemarker:compileTestJava'.
              at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:98)
              at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:68)
              at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
              at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
              at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
              at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)
              at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
              at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
              at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
              at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
              at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236)
              at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228)
              at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
              at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
              at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
              at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)
              at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
              at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77)
              at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58)
              at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:32)
              at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:113)
              at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
              at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
              at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
              at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
              at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
              at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
              at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
              at org.gradle.initialization.DefaultGradleLauncher$RunTasksAction.execute(DefaultGradleLauncher.java:230)
              at org.gradle.initialization.DefaultGradleLauncher$RunTasksAction.execute(DefaultGradleLauncher.java:227)
              at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
              at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
              at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
              at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:161)
              at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:112)
              at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:95)
              at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:66)
              at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
              at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
              at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
              at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
              at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
              at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)
              at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:49)
              at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:31)
              at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
              at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
              at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:281)
              at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:254)
              at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:33)
              at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
              at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
              at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
              at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:247)
              at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:182)
              at org.gradle.launcher.Main.doAction(Main.java:33)
              at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
              at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
              at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
              at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
              at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:31)
              at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108)
              at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
      Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details.
              at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:48)
              at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:33)
              at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:99)
              at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:52)
              at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:37)
              at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35)
              at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25)
              at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:244)
              at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:229)
              at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:151)
              at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
              at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:163)
              at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
              at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:123)
              at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.execute(ExecuteActionsTaskExecuter.java:115)
              at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.execute(ExecuteActionsTaskExecuter.java:109)
              at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
              at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
              at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
              at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:109)
              at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:90)
              ... 62 more
      
      
      BUILD FAILED
      
      Total time: 14.519 secs
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 39 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.X