I have been trying to setup the dev environment fo...
# troubleshoot
m
I have been trying to setup the dev environment for datahub in local and getting stuck at this particular error below when running
./gradlew build
Copy code
* What went wrong:
Execution failed for task ':metadata-service:restli-servlet-impl:generateRestModel'.
> Process 'command '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java'' finished with non-zero exit value 1
Have tried doing
./gradlew clean
and ran
Copy code
./gradlew :metadata-service:restli-servlet-impl:build -Prest.model.compatibility=ignore
but still getting the same error. System config: MacOS Monterey 12.1 Java version:
Copy code
java version "1.8.0_331"
Java(TM) SE Runtime Environment (build 1.8.0_331-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.331-b09, mixed mode)
Any ways to resolve this?
h
Hi @mammoth-fall-12031, could you try running
./gradlew :metadata-service:restli-servlet-impl:generateRestModel  -Prest.model.compatibility=ignore
and share the detailed error? I'm assuming that you have changed the REST API locally. If not drop the
-Prest.model.compatibility=ignore
part and please share the error.
m
Result of running 1st command
Copy code
To honour the JVM settings for this build a single-use Daemon process will be forked. See <https://docs.gradle.org/6.9.2/userguide/gradle_daemon.html#sec:disabling_the_daemon>.
Daemon will be stopped at the end of the build 
Configuration on demand is an incubating feature.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See <http://www.slf4j.org/codes.html#StaticLoggerBinder> for further details.

> Task :entity-registry:mainDestroyStaleFiles SKIPPED
:entity-registry:mainDestroyStaleFiles task is a NO-OP task.

> Task :metadata-service:restli-api:mainDestroyStaleFiles SKIPPED
:metadata-service:restli-api:mainDestroyStaleFiles task is a NO-OP task.

> Task :metadata-models:mainDestroyStaleFiles SKIPPED
:metadata-models:mainDestroyStaleFiles task is a NO-OP task.

> Task :metadata-models:mainCopyPdscSchemas SKIPPED
:metadata-models:mainCopyPdscSchemas task is a NO-OP task.

> Task :entity-registry:mainCopyPdscSchemas SKIPPED
:entity-registry:mainCopyPdscSchemas task is a NO-OP task.

> Task :metadata-service:restli-api:mainCopyPdscSchemas SKIPPED
:metadata-service:restli-api:mainCopyPdscSchemas task is a NO-OP task.

> Task :li-utils:generateDataTemplate
There are 32 data schema input files. Using input root folder: /Users/amal/linux/parsons/datahub/li-utils/src/main/pegasus

> Task :metadata-events:mxe-schemas:mainDestroyStaleFiles SKIPPED
:metadata-events:mxe-schemas:mainDestroyStaleFiles task is a NO-OP task.

> Task :metadata-events:mxe-schemas:mainCopyPdscSchemas SKIPPED
:metadata-events:mxe-schemas:mainCopyPdscSchemas task is a NO-OP task.

> Task :metadata-service:restli-servlet-impl:mainDestroyStaleFiles SKIPPED
:metadata-service:restli-servlet-impl:mainDestroyStaleFiles task is a NO-OP task.

> Task :metadata-service:restli-servlet-impl:mainCopyPdscSchemas SKIPPED
:metadata-service:restli-servlet-impl:mainCopyPdscSchemas task is a NO-OP task.

> Task :li-utils:generateDataTemplate
[main] INFO com.linkedin.pegasus.generator.DataTemplateGeneratorCmdLineApp - Generating 33 files

> Task :metadata-events:mxe-schemas:testDestroyStaleFiles SKIPPED
:metadata-events:mxe-schemas:testDestroyStaleFiles task is a NO-OP task.

> Task :metadata-events:mxe-schemas:testCopyPdscSchemas SKIPPED
:metadata-events:mxe-schemas:testCopyPdscSchemas task is a NO-OP task.

> Task :li-utils:mainDestroyStaleFiles SKIPPED
:li-utils:mainDestroyStaleFiles task is a NO-OP task.

> Task :li-utils:mainCopyPdscSchemas SKIPPED
:li-utils:mainCopyPdscSchemas task is a NO-OP task.

> Task :li-utils:mainTranslateSchemas
[main] INFO com.linkedin.restli.tools.data.SchemaFormatTranslator - Translating files. Source dir: /Users/amal/linux/parsons/datahub/li-utils/src/main/pegasus, sourceFormat: pdl, destDir: /Users/amal/linux/parsons/datahub/li-utils/build/mainLegacySchemas, destFormat: pdsc, keepOriginal: true, skipVerification: true

> Task :metadata-events:mxe-schemas:generateAvroSchema
There are 362 data schema input files. Using input root folder: /Users/amal/linux/parsons/datahub/metadata-events/mxe-schemas/src/main/pegasus
[main] INFO com.linkedin.data.avro.generator.AvroSchemaGenerator - Generating 308 files

> Task :li-utils:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :metadata-events:mxe-schemas:generateDataTemplate
There are 362 data schema input files. Using input root folder: /Users/amal/linux/parsons/datahub/metadata-events/mxe-schemas/src/main/pegasus
[main] INFO com.linkedin.pegasus.generator.TemplateSpecGenerator - Class name: com.linkedin.data.template.StringArray, bound to schema:{ "type" : "array", "items" : "string" }, instead of schema: { "type" : "array", "items" : { "type" : "typeref", "name" : "SchemaFieldPath", "namespace" : "com.linkedin.dataset", "doc" : "Schema field path. TODO: Add formal documentation on normalization rules.", "ref" : "string" } }
[main] INFO com.linkedin.pegasus.generator.TemplateSpecGenerator - Class name: com.linkedin.data.template.StringArray, bound to schema:{ "type" : "array", "items" : "string" }, instead of schema: { "type" : "array", "items" : { "type" : "typeref", "name" : "SchemaFieldPath", "namespace" : "com.linkedin.dataset", "doc" : "Schema field path. TODO: Add formal documentation on normalization rules.", "ref" : "string" } }
[main] INFO com.linkedin.pegasus.generator.DataTemplateGeneratorCmdLineApp - Generating 464 files

> Task :metadata-models:generateAvroSchema
There are 362 data schema input files. Using input root folder: /Users/amal/linux/parsons/datahub/metadata-models/src/main/pegasus
[main] INFO com.linkedin.data.avro.generator.AvroSchemaGenerator - Generating 308 files

> Task :metadata-models:generateDataTemplate
There are 362 data schema input files. Using input root folder: /Users/amal/linux/parsons/datahub/metadata-models/src/main/pegasus
[main] INFO com.linkedin.pegasus.generator.TemplateSpecGenerator - Class name: com.linkedin.data.template.StringArray, bound to schema:{ "type" : "array", "items" : "string" }, instead of schema: { "type" : "array", "items" : { "type" : "typeref", "name" : "SchemaFieldPath", "namespace" : "com.linkedin.dataset", "doc" : "Schema field path. TODO: Add formal documentation on normalization rules.", "ref" : "string" } }
[main] INFO com.linkedin.pegasus.generator.TemplateSpecGenerator - Class name: com.linkedin.data.template.StringArray, bound to schema:{ "type" : "array", "items" : "string" }, instead of schema: { "type" : "array", "items" : { "type" : "typeref", "name" : "SchemaFieldPath", "namespace" : "com.linkedin.dataset", "doc" : "Schema field path. TODO: Add formal documentation on normalization rules.", "ref" : "string" } }
[main] INFO com.linkedin.pegasus.generator.DataTemplateGeneratorCmdLineApp - Generating 464 files

> Task :metadata-events:mxe-schemas:compileMainGeneratedDataTemplateJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :metadata-events:mxe-schemas:mainTranslateSchemas
[main] INFO com.linkedin.restli.tools.data.SchemaFormatTranslator - Translating files. Source dir: /Users/amal/linux/parsons/datahub/metadata-events/mxe-schemas/src/main/pegasus, sourceFormat: pdl, destDir: /Users/amal/linux/parsons/datahub/metadata-events/mxe-schemas/build/mainLegacySchemas, destFormat: pdsc, keepOriginal: true, skipVerification: true

> Task :metadata-events:mxe-avro-1.7:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :metadata-models:compileMainGeneratedDataTemplateJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :metadata-models:mainTranslateSchemas
[main] INFO com.linkedin.restli.tools.data.SchemaFormatTranslator - Translating files. Source dir: /Users/amal/linux/parsons/datahub/metadata-models/src/main/pegasus, sourceFormat: pdl, destDir: /Users/amal/linux/parsons/datahub/metadata-models/build/mainLegacySchemas, destFormat: pdsc, keepOriginal: true, skipVerification: true

> Task :metadata-service:restli-api:generateDataTemplate
There are 2 data schema input files. Using input root folder: /Users/amal/linux/parsons/datahub/metadata-service/restli-api/src/main/pegasus
[main] INFO com.linkedin.pegasus.generator.DataTemplateGeneratorCmdLineApp - Generating 5 files

> Task :metadata-events:mxe-utils-avro-1.7:compileJava
Note: /Users/amal/linux/parsons/datahub/metadata-events/mxe-utils-avro-1.7/src/main/java/com/linkedin/metadata/EventUtils.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/amal/linux/parsons/datahub/metadata-events/mxe-utils-avro-1.7/src/main/java/com/linkedin/metadata/EventUtils.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :metadata-events:mxe-registration:compileJava
Note: /Users/amal/linux/parsons/datahub/metadata-events/mxe-registration/src/main/java/com/linkedin/mxe/TopicConventionImpl.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :metadata-service:restli-api:mainTranslateSchemas
[main] INFO com.linkedin.restli.tools.data.SchemaFormatTranslator - Translating files. Source dir: /Users/amal/linux/parsons/datahub/metadata-service/restli-api/src/main/pegasus, sourceFormat: pdl, destDir: /Users/amal/linux/parsons/datahub/metadata-service/restli-api/build/mainLegacySchemas, destFormat: pdsc, keepOriginal: true, skipVerification: true

> Task :entity-registry:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :metadata-models-validator:compileJava
Note: /Users/amal/linux/parsons/datahub/metadata-models-validator/src/main/java/com/linkedin/metadata/model/validation/ModelValidationTask.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :metadata-service:restli-servlet-impl:validateModels
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See <http://www.slf4j.org/codes.html#StaticLoggerBinder> for further details.

> Task :metadata-io:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :metadata-service:restli-servlet-impl:compileJava
Note: /Users/amal/linux/parsons/datahub/metadata-service/restli-servlet-impl/src/main/java/com/linkedin/metadata/resources/entity/EntityResource.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/amal/linux/parsons/datahub/metadata-service/restli-servlet-impl/src/main/java/com/linkedin/metadata/resources/entity/EntityResource.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :metadata-service:restli-servlet-impl:generateRestModel FAILED
[main] ERROR com.linkedin.restli.tools.snapshot.gen.RestLiSnapshotExporterCmdLineApp - Error writing Snapshot files
Error writing Snapshot files:
java.lang.NoClassDefFoundError: com/sun/javadoc/Doc
        at com.linkedin.restli.tools.snapshot.gen.RestLiSnapshotExporter.export(RestLiSnapshotExporter.java:135)
java.lang.NoClassDefFoundError: com/sun/javadoc/Doc     at com.linkedin.restli.tools.snapshot.gen.RestLiSnapshotExporterCmdLineApp.main(RestLiSnapshotExporterCmdLineApp.java:114)

Caused by: java.lang.ClassNotFoundException: com.sun.javadoc.Doc
        at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 2 more

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':metadata-service:restli-servlet-impl:generateRestModel'.
> Process 'command '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at <https://help.gradle.org>

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See <https://docs.gradle.org/6.9.2/userguide/command_line_interface.html#sec:command_line_warnings>
Output of running the 2nd command
Copy code
To honour the JVM settings for this build a single-use Daemon process will be forked. See <https://docs.gradle.org/6.9.2/userguide/gradle_daemon.html#sec:disabling_the_daemon>.
Daemon will be stopped at the end of the build 
Configuration on demand is an incubating feature.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See <http://www.slf4j.org/codes.html#StaticLoggerBinder> for further details.

> Task :metadata-service:restli-api:mainDestroyStaleFiles SKIPPED
:metadata-service:restli-api:mainDestroyStaleFiles task is a NO-OP task.

> Task :entity-registry:mainDestroyStaleFiles SKIPPED
:entity-registry:mainDestroyStaleFiles task is a NO-OP task.

> Task :metadata-models:mainDestroyStaleFiles SKIPPED
:metadata-models:mainDestroyStaleFiles task is a NO-OP task.

> Task :metadata-service:restli-api:mainCopyPdscSchemas SKIPPED
:metadata-service:restli-api:mainCopyPdscSchemas task is a NO-OP task.

> Task :metadata-models:mainCopyPdscSchemas SKIPPED
:metadata-models:mainCopyPdscSchemas task is a NO-OP task.

> Task :entity-registry:mainCopyPdscSchemas SKIPPED
:entity-registry:mainCopyPdscSchemas task is a NO-OP task.

> Task :metadata-events:mxe-schemas:mainDestroyStaleFiles SKIPPED
:metadata-events:mxe-schemas:mainDestroyStaleFiles task is a NO-OP task.

> Task :metadata-events:mxe-schemas:mainCopyPdscSchemas SKIPPED
:metadata-events:mxe-schemas:mainCopyPdscSchemas task is a NO-OP task.

> Task :li-utils:generateDataTemplate
There are 32 data schema input files. Using input root folder: /Users/amal/linux/parsons/datahub/li-utils/src/main/pegasus

> Task :metadata-service:restli-servlet-impl:mainDestroyStaleFiles SKIPPED
:metadata-service:restli-servlet-impl:mainDestroyStaleFiles task is a NO-OP task.

> Task :metadata-service:restli-servlet-impl:mainCopyPdscSchemas SKIPPED
:metadata-service:restli-servlet-impl:mainCopyPdscSchemas task is a NO-OP task.

> Task :metadata-events:mxe-schemas:testDestroyStaleFiles SKIPPED
:metadata-events:mxe-schemas:testDestroyStaleFiles task is a NO-OP task.

> Task :metadata-events:mxe-schemas:testCopyPdscSchemas SKIPPED
:metadata-events:mxe-schemas:testCopyPdscSchemas task is a NO-OP task.

> Task :li-utils:generateDataTemplate
[main] INFO com.linkedin.pegasus.generator.DataTemplateGeneratorCmdLineApp - Generating 33 files

> Task :li-utils:mainDestroyStaleFiles SKIPPED
:li-utils:mainDestroyStaleFiles task is a NO-OP task.

> Task :li-utils:mainCopyPdscSchemas SKIPPED
:li-utils:mainCopyPdscSchemas task is a NO-OP task.

> Task :li-utils:mainTranslateSchemas
[main] INFO com.linkedin.restli.tools.data.SchemaFormatTranslator - Translating files. Source dir: /Users/amal/linux/parsons/datahub/li-utils/src/main/pegasus, sourceFormat: pdl, destDir: /Users/amal/linux/parsons/datahub/li-utils/build/mainLegacySchemas, destFormat: pdsc, keepOriginal: true, skipVerification: true

> Task :metadata-events:mxe-schemas:generateAvroSchema
There are 362 data schema input files. Using input root folder: /Users/amal/linux/parsons/datahub/metadata-events/mxe-schemas/src/main/pegasus
[main] INFO com.linkedin.data.avro.generator.AvroSchemaGenerator - Generating 308 files

> Task :li-utils:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :metadata-events:mxe-schemas:generateDataTemplate
There are 362 data schema input files. Using input root folder: /Users/amal/linux/parsons/datahub/metadata-events/mxe-schemas/src/main/pegasus
[main] INFO com.linkedin.pegasus.generator.TemplateSpecGenerator - Class name: com.linkedin.data.template.StringArray, bound to schema:{ "type" : "array", "items" : "string" }, instead of schema: { "type" : "array", "items" : { "type" : "typeref", "name" : "SchemaFieldPath", "namespace" : "com.linkedin.dataset", "doc" : "Schema field path. TODO: Add formal documentation on normalization rules.", "ref" : "string" } }
[main] INFO com.linkedin.pegasus.generator.TemplateSpecGenerator - Class name: com.linkedin.data.template.StringArray, bound to schema:{ "type" : "array", "items" : "string" }, instead of schema: { "type" : "array", "items" : { "type" : "typeref", "name" : "SchemaFieldPath", "namespace" : "com.linkedin.dataset", "doc" : "Schema field path. TODO: Add formal documentation on normalization rules.", "ref" : "string" } }
[main] INFO com.linkedin.pegasus.generator.DataTemplateGeneratorCmdLineApp - Generating 464 files

> Task :metadata-models:generateAvroSchema
There are 362 data schema input files. Using input root folder: /Users/amal/linux/parsons/datahub/metadata-models/src/main/pegasus
[main] INFO com.linkedin.data.avro.generator.AvroSchemaGenerator - Generating 308 files

> Task :metadata-models:generateDataTemplate
There are 362 data schema input files. Using input root folder: /Users/amal/linux/parsons/datahub/metadata-models/src/main/pegasus
[main] INFO com.linkedin.pegasus.generator.TemplateSpecGenerator - Class name: com.linkedin.data.template.StringArray, bound to schema:{ "type" : "array", "items" : "string" }, instead of schema: { "type" : "array", "items" : { "type" : "typeref", "name" : "SchemaFieldPath", "namespace" : "com.linkedin.dataset", "doc" : "Schema field path. TODO: Add formal documentation on normalization rules.", "ref" : "string" } }
[main] INFO com.linkedin.pegasus.generator.TemplateSpecGenerator - Class name: com.linkedin.data.template.StringArray, bound to schema:{ "type" : "array", "items" : "string" }, instead of schema: { "type" : "array", "items" : { "type" : "typeref", "name" : "SchemaFieldPath", "namespace" : "com.linkedin.dataset", "doc" : "Schema field path. TODO: Add formal documentation on normalization rules.", "ref" : "string" } }
[main] INFO com.linkedin.pegasus.generator.DataTemplateGeneratorCmdLineApp - Generating 464 files

> Task :metadata-events:mxe-schemas:compileMainGeneratedDataTemplateJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :metadata-events:mxe-schemas:mainTranslateSchemas
[main] INFO com.linkedin.restli.tools.data.SchemaFormatTranslator - Translating files. Source dir: /Users/amal/linux/parsons/datahub/metadata-events/mxe-schemas/src/main/pegasus, sourceFormat: pdl, destDir: /Users/amal/linux/parsons/datahub/metadata-events/mxe-schemas/build/mainLegacySchemas, destFormat: pdsc, keepOriginal: true, skipVerification: true

> Task :metadata-events:mxe-avro-1.7:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :metadata-models:compileMainGeneratedDataTemplateJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :metadata-models:mainTranslateSchemas
[main] INFO com.linkedin.restli.tools.data.SchemaFormatTranslator - Translating files. Source dir: /Users/amal/linux/parsons/datahub/metadata-models/src/main/pegasus, sourceFormat: pdl, destDir: /Users/amal/linux/parsons/datahub/metadata-models/build/mainLegacySchemas, destFormat: pdsc, keepOriginal: true, skipVerification: true

> Task :metadata-service:restli-api:generateDataTemplate
There are 2 data schema input files. Using input root folder: /Users/amal/linux/parsons/datahub/metadata-service/restli-api/src/main/pegasus
[main] INFO com.linkedin.pegasus.generator.DataTemplateGeneratorCmdLineApp - Generating 5 files

> Task :metadata-events:mxe-utils-avro-1.7:compileJava
Note: /Users/amal/linux/parsons/datahub/metadata-events/mxe-utils-avro-1.7/src/main/java/com/linkedin/metadata/EventUtils.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/amal/linux/parsons/datahub/metadata-events/mxe-utils-avro-1.7/src/main/java/com/linkedin/metadata/EventUtils.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :metadata-events:mxe-registration:compileJava
Note: /Users/amal/linux/parsons/datahub/metadata-events/mxe-registration/src/main/java/com/linkedin/mxe/TopicConventionImpl.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :metadata-service:restli-api:mainTranslateSchemas
[main] INFO com.linkedin.restli.tools.data.SchemaFormatTranslator - Translating files. Source dir: /Users/amal/linux/parsons/datahub/metadata-service/restli-api/src/main/pegasus, sourceFormat: pdl, destDir: /Users/amal/linux/parsons/datahub/metadata-service/restli-api/build/mainLegacySchemas, destFormat: pdsc, keepOriginal: true, skipVerification: true

> Task :entity-registry:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :metadata-models-validator:compileJava
Note: /Users/amal/linux/parsons/datahub/metadata-models-validator/src/main/java/com/linkedin/metadata/model/validation/ModelValidationTask.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :metadata-service:restli-servlet-impl:validateModels
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See <http://www.slf4j.org/codes.html#StaticLoggerBinder> for further details.

> Task :metadata-io:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :metadata-service:restli-servlet-impl:compileJava
Note: /Users/amal/linux/parsons/datahub/metadata-service/restli-servlet-impl/src/main/java/com/linkedin/metadata/resources/entity/EntityResource.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/amal/linux/parsons/datahub/metadata-service/restli-servlet-impl/src/main/java/com/linkedin/metadata/resources/entity/EntityResource.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :metadata-service:restli-servlet-impl:generateRestModel FAILED
[main] ERROR com.linkedin.restli.tools.snapshot.gen.RestLiSnapshotExporterCmdLineApp - Error writing Snapshot files
Error writing Snapshot files:
java.lang.NoClassDefFoundError: com/sun/javadoc/Doc
java.lang.NoClassDefFoundError: com/sun/javadoc/Doc
        at com.linkedin.restli.tools.snapshot.gen.RestLiSnapshotExporter.export(RestLiSnapshotExporter.java:135)
        at com.linkedin.restli.tools.snapshot.gen.RestLiSnapshotExporterCmdLineApp.main(RestLiSnapshotExporterCmdLineApp.java:114)
Caused by: java.lang.ClassNotFoundException: com.sun.javadoc.Doc
        at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 2 more

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':metadata-service:restli-servlet-impl:generateRestModel'.
> Process 'command '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at <https://help.gradle.org>

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See <https://docs.gradle.org/6.9.2/userguide/command_line_interface.html#sec:command_line_warnings>
@helpful-optician-78938 Does this help?
o
What's the output of:
./gradlew -version
? It seems like your Java version is running into issues. We had a teammate run into this issue with the Oracle JDK and it was resolved by switching to an OpenJDK distribution on an M1 laptop. It seems like the Oracle JDK has some issues with the latest Macs.
m
Copy code
------------------------------------------------------------
Gradle 6.9.2
------------------------------------------------------------

Build time:   2021-12-21 20:18:38 UTC
Revision:     5d94aa68c0fdbe443838bb977080e3b9f273e889

Kotlin:       1.4.20
Groovy:       2.5.12
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          1.8.0_331 (Oracle Corporation 25.331-b09)
OS:           Mac OS X 12.1 x86_64
Output of gradle version and yes it's M1
Thanks, just switched to openjdk and it's building now
🙌 1