cadence-workflow / cadence-java-samples

Other
97 stars 60 forks source link

cadence-java-client not getting build. #30

Closed gopinathankm closed 8 months ago

gopinathankm commented 4 years ago

I am referring following to develop Cadence Java client examples. https://github.com/uber/cadence-java-client. While I am executing I am getting following error: ./gradlew build --stacktrace


FAILURE: Build failed with an exception.

* What went wrong:
Failed to notify task execution listener.
> tried to access field org.gradle.api.tasks.SourceTask.source from class com.github.sherter.googlejavaformatgradleplugin.FormatTask

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

* Exception is:
org.gradle.internal.event.ListenerNotificationException: Failed to notify task execution listener.
        at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:86)
        at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324)
        at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234)
        at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140)
        at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
        at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
        at com.sun.proxy.$Proxy55.beforeExecute(Unknown Source)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:47)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:44)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:337)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:325)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:318)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:304)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: java.lang.IllegalAccessError: tried to access field org.gradle.api.tasks.SourceTask.source from class com.github.sherter.googlejavaformatgradleplugin.FormatTask
        at com.github.sherter.googlejavaformatgradleplugin.FormatTask.hasSources(FormatTask.java:12)
        at com.github.sherter.googlejavaformatgradleplugin.TaskConfigurator.configureFormatTask(TaskConfigurator.java:22)
        at com.github.sherter.googlejavaformatgradleplugin.TaskConfigurator.configure(TaskConfigurator.java:34)
        at com.github.sherter.googlejavaformatgradleplugin.GoogleJavaFormat.accept(GoogleJavaFormat.groovy:24)
        at com.github.sherter.googlejavaformatgradleplugin.GoogleJavaFormatPlugin$_apply_closure1.doCall(GoogleJavaFormatPlugin.groovy:41)
        at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:40)
        at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:25)
        at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
        at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230)
        at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149)
        at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
        ... 26 more

 #```

Can anybody help me?
ibarrajo commented 8 months ago

From the latest build, it works. I know this is a 4 year old issue, if anybody is experiencing this, please ensure you have the latest version of the repository.

➜  cadence-java-samples git:(master) ./gradlew build --stacktrace
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :googleJavaFormat NO-SOURCE

> Task :compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/jibarr21/Uber/cadence-java-samples/src/main/java/com/uber/cadence/samples/hello/HelloDataConverter.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :processResources UP-TO-DATE
> Task :classes
> Task :bootJarMainClassName
> Task :bootJar
> Task :jar UP-TO-DATE
> Task :assemble
> Task :checkLicenseMain
> Task :checkLicenseTest
> Task :checkLicenses
> Task :compileTestJava
> Task :processTestResources UP-TO-DATE
> Task :testClasses
> Task :test UP-TO-DATE
> Task :verifyGoogleJavaFormat
> Task :check
> Task :build

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.8.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 6s
11 actionable tasks: 7 executed, 4 up-to-date
➜  cadence-java-samples git:(master)