Skip to content

Conversation

@martinda
Copy link

@martinda martinda commented Jan 5, 2020

I am attempting to upgrade the build system to use Gradle 6.x. So far so good, but I hit a snag with the constraint solver tests. To run this PR, use Gradle 6.x, and Java 1.8. The sourceCompatibility = '1.5' is set in the build.gradle. To build what I have so far, type:

gradle build

The tests fail with:

> Task :randsolver:test FAILED

com.newisys.randsolver.TestCyclic > testTwoVars FAILED
    java.lang.ExceptionInInitializerError at TestCyclic.java:89
        Caused by: java.lang.ClassCastException at TestCyclic.java:89

com.newisys.randsolver.TestCyclic > testCyclic FAILED
    java.lang.NoClassDefFoundError at TestCyclic.java:63

com.newisys.randsolver.TestMapperFactory > initializationError FAILED
    java.lang.NoClassDefFoundError at TestMapperFactory.java:156
...

Because of the java.lang.ExceptionInInitializerError I suspect this has to do with the static method call in TestCyclic.java. What do you think?

@martinda
Copy link
Author

martinda commented Jan 9, 2022

Using

------------------------------------------------------------
Gradle 7.3.3
------------------------------------------------------------

Build time:   2021-12-22 12:37:54 UTC
Revision:     6f556c80f945dc54b50e0be633da6c62dbe8dc71

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          17.0.1 (Eclipse Adoptium 17.0.1+12)
OS:           Linux 5.4.0-92-generic amd64

Then run:

cd jove
gradle build

The errors are due to casting, but I don't know how to solve it because I don't understand the intent of the code.

Caused by: java.lang.ClassCastException: class com.newisys.langschema.java.JavaTypeVariable cannot be cast to class com.newisys.langschema.java.JavaClass (com.newisys.langschema.java.JavaTypeVariable and com.newisys.langschema.java.JavaClass are in unnamed module of loader 'app')
	at com.newisys.langschema.java.JavaSchema.buildMethod(JavaSchema.java:644)
...

Looks like the error is in JavaSchema.java.

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

Successfully merging this pull request may close these issues.

1 participant