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

NoClassDefFoundError: javax/tools/DiagnosticListener when compiling portal with JDK11 on 7.2.x

    Details

    • Type: Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: 7.2.X
    • Fix Version/s: None
    • Labels:
      None
    • Fix Priority:
      2

      Description

      Steps to Reproduce:

      1. Set JAVA_HOME to JDK11
      2. Remove Java version check from build-common.xml in portal source
      3. Workaround for connection issue (SSLPeerUnverifiedException), Add the following to your JAVA_OPTS:
        -Djdk.tls.server.protocols=TLSv1.2 -Djdk.tls.client.protocols=TLSv1.2  
      1. Run "ant all"

      Expected result:

      Liferay portal compiled without error.

      Actual result:

      Compile error:

      [echo] Note: Some input files use unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: Some input files use unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: /Users/malei/dev/project/github/liferay-portal-ee-7.2.x/modules/core/portal-equinox-log-bridge/src/main/java/com/liferay/portal/equinox/log/bridge/internal/PortalSynchronousLogListener.java uses or overrides a deprecated API. [echo] Note: Recompile with -Xlint:deprecation for details. [echo] Note: Some input files use unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: /Users/malei/dev/project/github/liferay-portal-ee-7.2.x/modules/apps/info/info-api/src/main/java/com/liferay/info/display/contributor/InfoDisplayField.java uses or overrides a deprecated API. [echo] Note: Recompile with -Xlint:deprecation for details. [echo] Note: /Users/malei/dev/project/github/liferay-portal-ee-7.2.x/modules/apps/info/info-api/src/main/java/com/liferay/info/display/contributor/field/ExpandoInfoDisplayContributorField.java uses unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: /Users/malei/dev/project/github/liferay-portal-ee-7.2.x/modules/apps/item-selector/item-selector-api/src/main/java/com/liferay/item/selector/BaseItemSelectorCriterionHandler.java uses unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: /Users/malei/dev/project/github/liferay-portal-ee-7.2.x/modules/apps/adaptive-media/adaptive-media-api/src/main/java/com/liferay/adaptive/media/AMAttribute.java uses unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: Some input files use unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: /Users/malei/dev/project/github/liferay-portal-ee-7.2.x/modules/apps/adaptive-media/adaptive-media-content-transformer-impl/src/main/java/com/liferay/adaptive/media/content/transformer/internal/ContentTransformerHandlerImpl.java uses unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: Some input files use unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: Some input files use or override a deprecated API. [echo] Note: Recompile with -Xlint:deprecation for details. [echo] Note: /Users/malei/dev/project/github/liferay-portal-ee-7.2.x/modules/apps/adaptive-media/adaptive-media-document-library-web/src/main/java/com/liferay/adaptive/media/document/library/web/internal/optimizer/DLAMImageOptimizer.java uses or overrides a deprecated API. [echo] Note: Recompile with -Xlint:deprecation for details. [echo] Note: /Users/malei/dev/project/github/liferay-portal-ee-7.2.x/modules/apps/adaptive-media/adaptive-media-image-service/src/main/java/com/liferay/adaptive/media/image/internal/exportimport/content/processor/AMEmbeddedReferenceSet.java uses or overrides a deprecated API. [echo] Note: Recompile with -Xlint:deprecation for details. [echo] Note: Some input files use unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: /Users/malei/dev/project/github/liferay-portal-ee-7.2.x/modules/apps/adaptive-media/adaptive-media-image-impl/src/main/java/com/liferay/adaptive/media/image/internal/validator/AMImageValidatorImpl.java uses or overrides a deprecated API. [echo] Note: Recompile with -Xlint:deprecation for details. [echo] Note: Some input files use unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: /Users/malei/dev/project/github/liferay-portal-ee-7.2.x/modules/apps/frontend-taglib/frontend-taglib-soy/src/main/java/com/liferay/frontend/taglib/soy/servlet/taglib/TemplateRendererTag.java uses or overrides a deprecated API. [echo] Note: Recompile with -Xlint:deprecation for details. [echo] Note: /Users/malei/dev/project/github/liferay-portal-ee-7.2.x/modules/apps/application-list/application-list-api/src/main/java/com/liferay/application/list/BasePanelApp.java uses or overrides a deprecated API. [echo] Note: Recompile with -Xlint:deprecation for details. [echo] Note: Some input files use unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: Some input files use or override a deprecated API. [echo] Note: Recompile with -Xlint:deprecation for details. [echo] Note: Some input files use unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: /Users/malei/dev/project/github/liferay-portal-ee-7.2.x/modules/apps/portal-background-task/portal-background-task-api/src/main/java/com/liferay/portal/background/task/model/BackgroundTaskWrapper.java uses unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: /Users/malei/dev/project/github/liferay-portal-ee-7.2.x/modules/apps/user-associated-data/user-associated-data-api/src/main/java/com/liferay/user/associated/data/display/BaseModelUADDisplay.java uses unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: Some input files use or override a deprecated API. [echo] Note: Recompile with -Xlint:deprecation for details. [echo] Note: Some input files use unchecked or unsafe operations. [echo] Note: Recompile with -Xlint:unchecked for details. [echo] Note: /Users/malei/dev/project/github/liferay-portal-ee-7.2.x/modules/apps/announcements/announcements-uad/src/main/java/com/liferay/announcements/uad/display/AnnouncementsEntryUADDisplay.java uses or overrides a deprecated API. [echo] Note: Recompile with -Xlint:deprecation for details. [echo] Note: Some input files use or override a deprecated API. [echo] Note: Recompile with -Xlint:deprecation for details. [echo] Note: Some input files use or override a deprecated API. [echo] Note: Recompile with -Xlint:deprecation for details. [echo] Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [echo] at com.liferay.jasper.jspc.JspC.main(JspC.java:52) [echo] Caused by: java.lang.reflect.InvocationTargetException [echo] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [echo] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [echo] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [echo] at java.base/java.lang.reflect.Method.invoke(Method.java:566) [echo] at com.liferay.jasper.jspc.JspC._runWithClassPath(JspC.java:168) [echo] at com.liferay.jasper.jspc.JspC.main(JspC.java:46) [echo] Caused by: java.lang.NoClassDefFoundError: javax/tools/DiagnosticListener [echo] at org.apache.jasper.compiler.Compiler.initJavaCompiler(Compiler.java:756) [echo] at org.apache.jasper.compiler.Compiler.<init>(Compiler.java:140) [echo] at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:288) [echo] at org.apache.jasper.JspC.processFile(JspC.java:1171) [echo] at org.apache.jasper.JspC.execute(JspC.java:1345) [echo] ... 6 more [echo] Caused by: java.lang.ClassNotFoundException: javax.tools.DiagnosticListener [echo] at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471) [echo] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588) [echo] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) [echo] ... 11 more [echo] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". [echo] SLF4J: Defaulting to no-operation (NOP) logger implementation [echo] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.  [echo] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". [echo] SLF4J: Defaulting to no-operation (NOP) logger implementation [echo] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.  [echo] Note: Some input files use or override a deprecated API. [echo] Note: Recompile with -Xlint:deprecation for details. [echo] [echo] [echo] FAILURE: Build failed with an exception. [echo] [echo] * What went wrong: [echo] Execution failed for task ':apps:application-list:application-list-taglib:generateJSPJava'. [echo] > Process 'command '/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 [echo] [echo] * Try: [echo] Run with --info or --debug option to get more log output. Run with --scan to get full insights. [echo] [echo] * Exception is: [echo] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':apps:application-list:application-list-taglib:generateJSPJava'. [echo] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:166) [echo] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.accept(ExecuteActionsTaskExecuter.java:163) [echo] at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:191) [echo] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:156) [echo] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:62) [echo] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:108) [echo] at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67) [echo] at org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46) [echo] at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:94) [echo] at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46) [echo] at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:95) [echo] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57) [echo] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56) [echo] at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36) [echo] at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77) [echo] at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55) [echo] at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52) [echo] at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416) [echo] at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406) [echo] at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165) [echo] at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250) [echo] at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158) [echo] at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102) [echo] at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36) [echo] at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52) [echo] at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43) [echo] at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355) [echo] at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343) [echo] at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336) [echo] at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322) [echo] at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134) [echo] at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129) [echo] at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202) [echo] at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193) [echo] at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129) [echo] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) [echo] at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) [echo] at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) [echo] Caused by: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 [echo] at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:409) [echo] at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:40) [echo] at org.gradle.api.tasks.JavaExec.exec(JavaExec.java:121) [echo] at com.liferay.gradle.plugins.jasper.jspc.CompileJSPTask.exec(CompileJSPTask.java:70) [echo] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [echo] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [echo] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [echo] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:103) [echo] at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:49) [echo] at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:42) [echo] at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28) [echo] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:717) [echo] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:684) [echo] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$5.run(ExecuteActionsTaskExecuter.java:476) [echo] at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402) [echo] at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394) [echo] at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165) [echo] at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250) [echo] at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158) [echo] at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92) [echo] at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) [echo] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:461) [echo] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:444) [echo] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$200(ExecuteActionsTaskExecuter.java:93) [echo] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:237) [echo] at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$1(ExecuteStep.java:33) [echo] at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:33) [echo] at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26) [echo] at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:58) [echo] at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:35) [echo] at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:48) [echo] at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:33) [echo] at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:39) [echo] at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73) [echo] at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54) [echo] at org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:35) [echo] at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51) [echo] at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:45) [echo] at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:31) [echo] at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:208) [echo] at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:70) [echo] at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:45) [echo] at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49) [echo] at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:43) [echo] at org.gradle.internal.execution.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:32) [echo] at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38) [echo] at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24) [echo] at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:96) [echo] at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:89) [echo] at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:54) [echo] at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:38) [echo] at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76) [echo] at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37) [echo] at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36) [echo] at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26) [echo] at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:90) [echo] at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:48) [echo] at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:69) [echo] at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:47) [echo] at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33) [echo] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:140) [echo] ... 34 more [echo] [echo] [echo] * Get more help at https://help.gradle.org  [echo] [echo] BUILD FAILED in 4m 43s [echo] 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              koor.gai Koor Gai
              Participants of an Issue:
              Recent user:
              Victor Ware
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

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

                  Packages

                  Version Package