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

Can't build project #9

Closed
Tomczik76 opened this issue Apr 20, 2021 · 5 comments
Closed

Can't build project #9

Tomczik76 opened this issue Apr 20, 2021 · 5 comments

Comments

@Tomczik76
Copy link
Contributor

Hello, I'm trying to build this project but am getting the following error.

./gradlew build

> Task :s3-backed-serde:compileTestJava FAILED
/Users/ryan.tomczik/Dev/kafka-s3-backed-serde/s3-backed-serde/src/test/java/com/bakdata/kafka/S3BackedDeserializerTest.java:32: error: cannot access TestTopology
import com.bakdata.fluent_kafka_streams_tests.TestTopology;
                                             ^
  bad class file: /Users/ryan.tomczik/.gradle/caches/modules-2/files-2.1/com.bakdata.fluent-kafka-streams-tests/fluent-kafka-streams-tests/2.0.4/6884c7dff35da93f26a35cf405188cbdb009202b/fluent-kafka-streams-tests-2.0.4.jar(com/bakdata/fluent_kafka_streams_tests/TestTopology.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':s3-backed-serde:compileTestJava'.
> 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 1s
17 actionable tasks: 1 executed, 16 up-to-date

I'm not too familiar with Gradle so I'm not sure if there is something I'm missing here.

Thanks,
Ryan

@philipp94831
Copy link
Member

Hi @Tomczik76, the project is built using Java 8. However, the dependency that is referenced is built using Java 11. I don't quite understand why it doesn't work though, because everything is built automatically in our CI https://dev.azure.com/bakdata/public/_build?definitionId=20&_a=summary. What Java and Gradle version do you use?

@Tomczik76
Copy link
Contributor Author

Hi @philipp94831,
Thanks for getting back to me so fast. Here the versions of my environment.

./gradlew --version

------------------------------------------------------------
Gradle 5.4.1
------------------------------------------------------------

Build time:   2019-04-26 08:14:42 UTC
Revision:     261d171646b36a6a28d5a19a69676cd098a4c19d

Kotlin:       1.3.21
Groovy:       2.5.4
Ant:          Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM:          1.8.0_262 (AdoptOpenJDK 25.262-b10)
OS:           Mac OS X 10.15.7 x86_64

@philipp94831
Copy link
Member

Hi @Tomczik76,
mine shows

------------------------------------------------------------
Gradle 5.4.1
------------------------------------------------------------

Build time:   2019-04-26 08:14:42 UTC
Revision:     261d171646b36a6a28d5a19a69676cd098a4c19d

Kotlin:       1.3.21
Groovy:       2.5.4
Ant:          Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM:          11.0.1 (Oracle Corporation 11.0.1+13-LTS)
OS:           Windows 10 10.0 amd64

Maybe you should try Java 11

@Tomczik76
Copy link
Contributor Author

@philipp94831 upgrading to java 11 worked! This will be used in the context of the confluentinc/cp-kafka-connect Docker image and that is running Java 8. I will test to see if it still works compiled with java 11. I also added a PR for adding the STS assume role Credentials provider. Could you please review it? We need that credentials provider for use to authenticate with s3 at my org. Thanks again!

@philipp94831
Copy link
Member

@Tomczik76 we also use it in a Kafka connect image with java 8. The java 11 dependency is only used for tests so that shouldn't be an issue. I will have a look at the PR

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