Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle build sometimes fails #26

Open
silvae86 opened this issue Oct 15, 2019 · 1 comment
Open

Gradle build sometimes fails #26

silvae86 opened this issue Oct 15, 2019 · 1 comment

Comments

@silvae86
Copy link

Hello!

We really want to use this mapping library, but we are running into all sorts of issues.

First, the build sometimes fails when running the command gradle clean build test, just after cloning.

Example:

Run 1:

➜  orientdb-groovy git:(master) gradle clean; gradle build; gradle test

BUILD SUCCESSFUL in 690ms
1 actionable task: 1 executed

> Task :compileTestGroovy
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/Users/joaorocha/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy-all/2.4.15/423a17aeb2f64bc6f76e8e44265a548bec80fd42/groovy-all-2.4.15.jar) to method java.util.AbstractCollection.hugeCapacity(int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

> Task :test
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/Users/joaorocha/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy-all/2.4.15/423a17aeb2f64bc6f76e8e44265a548bec80fd42/groovy-all-2.4.15.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

BUILD SUCCESSFUL in 10s
8 actionable tasks: 8 executed

BUILD SUCCESSFUL in 731ms
5 actionable tasks: 5 up-to-date

build 2 (right after build 1):

➜  orientdb-groovy git:(master) gradle clean build test

> Task :compileGroovy
startup failed:
/Users/joaorocha/Desktop/orientdb-groovy/src/main/groovy/com/github/eugene/kamenev/orient/graph/OrientGraphHelper.groovy: 175: [Static type checking] - Cannot find matching method java.lang.Object#countClass(java.lang.String). Please check if the declared type is right and if the method exists.
 @ line 175, column 16.
           return OrientGraph.activeGraph.rawGraph.countClass(className)
                  ^

/Users/joaorocha/Desktop/orientdb-groovy/src/main/groovy/com/github/eugene/kamenev/orient/graph/OrientGraphHelper.groovy: 187: [Static type checking] - Cannot find matching method java.lang.Object#browseClass(java.lang.String). Please check if the declared type is right and if the method exists.
 @ line 187, column 37.
           return new GraphIterator<T>(OrientGraph.activeGraph.rawGraph.browseClass(className), clazz)
                                       ^

/Users/joaorocha/Desktop/orientdb-groovy/src/main/groovy/com/github/eugene/kamenev/orient/graph/OrientGraphHelper.groovy: 187: [Static type checking] - Cannot find matching method com.github.eugene.kamenev.orient.graph.GraphIterator#<init>(java.lang.Object, java.lang.Class). Please check if the declared type is right and if the method exists.
 @ line 187, column 16.
           return new GraphIterator<T>(OrientGraph.activeGraph.rawGraph.browseClass(className), clazz)
                  ^

3 errors


> Task :compileGroovy FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileGroovy'.
> Compilation failed; see the compiler error output for details.

* 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

BUILD FAILED in 3s
3 actionable tasks: 3 executed

Output of gradle -v:

➜  orientdb-groovy git:(master) gradle -v

------------------------------------------------------------
Gradle 5.6.2
------------------------------------------------------------

Build time:   2019-09-05 16:13:54 UTC
Revision:     55a5e53d855db8fc7b0e494412fc624051a8e781

Kotlin:       1.3.41
Groovy:       2.5.4
Ant:          Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM:          11.0.2 (Oracle Corporation 11.0.2+9)
OS:           Mac OS X 10.15 x86_64

Any ideas?

Thanks!

@eugene-kamenev
Copy link
Owner

eugene-kamenev commented Oct 17, 2019

Hi @silvae86 , the following environment works for me:

------------------------------------------------------------
Gradle 4.0
------------------------------------------------------------

Build time:   2017-06-14 15:11:08 UTC
Revision:     316546a5fcb4e2dfe1d6aa0b73a4e09e8cecb5a5

Groovy:       2.4.11
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_222 (Private Build 25.222-b10)
OS:           Linux 4.15.0-65-generic amd64

I havent tested how these transformations work for JDK > 1.8

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

No branches or pull requests

2 participants