Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

NoSuchFieldError: JAVA_UPPER_CASE #170

Open
ndtreviv opened this issue Mar 8, 2019 · 12 comments
Open

NoSuchFieldError: JAVA_UPPER_CASE #170

ndtreviv opened this issue Mar 8, 2019 · 12 comments

Comments

@ndtreviv
Copy link

ndtreviv commented Mar 8, 2019

Task :minifyJs recently stopped working.

Plugin Version: id "com.eriwen.gradle.js" version "2.14.1"

$ ./gradlew --version
------------------------------------------------------------
Gradle 4.10.2
------------------------------------------------------------

Build time:   2018-09-19 18:10:15 UTC
Revision:     b4d8d5d170bb4ba516e88d7fe5647e2323d791dd

Kotlin DSL:   1.0-rc-6
Kotlin:       1.2.61
Groovy:       2.4.15
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          1.8.0_202 (Oracle Corporation 25.202-b08)
OS:           Mac OS X 10.14.3 x86_64

Root Error:

Caused by: java.lang.NoSuchFieldError: JAVA_UPPER_CASE
        at com.google.javascript.jscomp.parsing.JsDocInfoParser.validTemplateTypeName(JsDocInfoParser.java:1208)

Build Stack Trace:

...
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':minifyJs'.
> JAVA_UPPER_CASE

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

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':minifyJs'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:110)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
        at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
        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.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
        at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
        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.NoSuchFieldError: JAVA_UPPER_CASE
        at com.google.javascript.jscomp.parsing.JsDocInfoParser.validTemplateTypeName(JsDocInfoParser.java:1208)
        at com.google.javascript.jscomp.parsing.JsDocInfoParser.parseAnnotation(JsDocInfoParser.java:938)
        at com.google.javascript.jscomp.parsing.JsDocInfoParser.parseHelperLoop(JsDocInfoParser.java:282)
        at com.google.javascript.jscomp.parsing.JsDocInfoParser.parse(JsDocInfoParser.java:272)
        at com.google.javascript.jscomp.parsing.IRFactory.createJsDocInfoParser(IRFactory.java:889)
        at com.google.javascript.jscomp.parsing.IRFactory.handleJsDoc(IRFactory.java:656)
        at com.google.javascript.jscomp.parsing.IRFactory.handleJsDoc(IRFactory.java:670)
        at com.google.javascript.jscomp.parsing.IRFactory.transform(IRFactory.java:733)
        at com.google.javascript.jscomp.parsing.IRFactory.access$300(IRFactory.java:163)
        at com.google.javascript.jscomp.parsing.IRFactory$TransformDispatcher.processAstRoot(IRFactory.java:1013)
        at com.google.javascript.jscomp.parsing.IRFactory$TransformDispatcher.process(IRFactory.java:2591)
        at com.google.javascript.jscomp.parsing.IRFactory.justTransform(IRFactory.java:931)
        at com.google.javascript.jscomp.parsing.IRFactory.transformTree(IRFactory.java:339)
        at com.google.javascript.jscomp.parsing.ParserRunner.parse(ParserRunner.java:117)
        at com.google.javascript.jscomp.JsAst.parse(JsAst.java:89)
        at com.google.javascript.jscomp.JsAst.getAstRoot(JsAst.java:50)
        at com.google.javascript.jscomp.CompilerInput.getAstRoot(CompilerInput.java:113)
        at com.google.javascript.jscomp.Compiler.parseInputs(Compiler.java:1305)
        at com.google.javascript.jscomp.Compiler.parse(Compiler.java:713)
        at com.google.javascript.jscomp.Compiler.compileInternal(Compiler.java:674)
        at com.google.javascript.jscomp.Compiler.access$000(Compiler.java:83)
        at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:645)
        at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:642)
        at com.google.javascript.jscomp.CompilerExecutor$2.call(CompilerExecutor.java:93)
@oyvindhorneland
Copy link

I've also encountered this. In my case I'm also using build-info-extractor-gradle and I found that minfyJs works if I'm using build-info-extractor-gradle 4.9.0, but fails with 4.9.1+. Diff between build-info-extractor-gradle 4.9.0 and 4.9.1 (jfrog/build-info@661a208#diff-c197962302397baf3a4cc36463dce5ea) shows that Guava has been upgraded and JAVA_UPPER_CASE was removed in google/guava@f1249c4#diff-bb82a7aa349f7e24d96641a41e92757d.

@PaulJamesMoran
Copy link

I have just upgraded AndroidStudio and hit the same problem. It now seems to require the use of the 4.10.1 gradle distribution.

Is there a work-around for this?
Eric, do you have a timeframe for when you may be able to look at this?
Paul

@raskolnikov
Copy link

I am having same issue. Is there any work around for this ? Thanks

@pavloPL
Copy link

pavloPL commented May 2, 2019

Any progress? Does anyone has workaround? I am stuck at the moment.

@ubivent-seuffert
Copy link

having the same problem in combination with jib-gradle-plugin >= 1.0.1 (uses guava>=26) 🙁 updating the google closure compiler dep is inevitable

@ubivent-seuffert
Copy link

ubivent-seuffert commented May 15, 2019

we managed to republish the plugin with updated closure/guava dependencies
https://plugins.gradle.org/plugin/eu.butter.gradle.js

plugins {
  id "eu.butter.gradle.js" version "2.15.1"
}

@slominskir
Copy link

Has eriwen abandoned this project? It hasn't been updated in years.

@ndtreviv
Copy link
Author

ndtreviv commented May 16, 2019 via email

@ubivent-seuffert
Copy link

the mentioned fork solves at least the problem at hand
https://github.com/tbutter/gradle-js-plugin/

@mattburns
Copy link

the mentioned fork solves at least the problem at hand
https://github.com/tbutter/gradle-js-plugin/

Thanks! Fixed for me

@mattburns
Copy link

Actually, that fork works until you want to use Gradle 6.0... 😭
image

@ubivent-seuffert
Copy link

Actually, that fork works until you want to use Gradle 6.0...

yes you are right, Gradle 6 is not (yet) supported in our branch. I will let you know if we find the time to commit some changes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants