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

class file has wrong version 61.0, should be 52.0 #303

Open
BusyLivingDota opened this issue Jun 3, 2023 · 3 comments
Open

class file has wrong version 61.0, should be 52.0 #303

BusyLivingDota opened this issue Jun 3, 2023 · 3 comments

Comments

@BusyLivingDota
Copy link

I don't know what happened while I was adding some other dependencies in pom file. Everything goes wrong and I got this message.
I tried reinstall IDEA tried open a new Clarity-Example-Master project, but the problem still there. I am pretty sure I am using JAVA8.
example2
example

C:\Users\lihao\IdeaProjects\clarity-examples-master\src\main\java\skadistats\clarity\examples\dump\Main.java:3:27 java: cannot access com.google.protobuf.GeneratedMessage bad class file: /C:/Users/lihao/.m2/repository/com/skadistats/clarity-protobuf/5.0-SNAPSHOT/clarity-protobuf-5.0-20230531.093536-2.jar!/com/google/protobuf/GeneratedMessage.class class file has wrong version 61.0, should be 52.0 Please remove or make sure it appears in the correct subdirectory of the classpath.

What shall I do?

@spheenik
Copy link
Member

spheenik commented Jun 4, 2023

I am currently working on a new major version of clarity, see csgo2 branch.
I have massively refactored the protobufs, and raised the minimum requirements to JDK 17.
The new protobufs have a new major version for that, 5.0-SNAPSHOT. It seems that the maven dependency resolution does not understand it shouldn't use that (the version range says it cannot use 5.0 and above)

Fix would be to add a dependency management section in clarity-examples/pom.xml and fix the version to 4.31.

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.skadistats</groupId>
        <artifactId>clarity-protobuf</artifactId>
        <version>4.31</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

@BusyLivingDota
Copy link
Author

I upgraded to jdk17 and added the dependency management, everything cool now. Thanks for saving my life!

@spheenik
Copy link
Member

spheenik commented Jun 5, 2023

Please leave issue open, as there may be other users running into this as well.

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