Error: class file has wrong version 55.0, should be 52.0 for \pac4j-core\5.1.0\pac4j-core-5.1.0.jar(org/pac4j/core/authorization/generator/AuthorizationGenerator.class)

322 views
Skip to first unread message

Adrian Campanaro

unread,
Jun 16, 2021, 7:55:47 AM6/16/21
to Pac4j users mailing list

Hi all
 I have tried JDK 8 and JDK 11, but when running command

mvn clean package jetty:run

I get error:

[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to c:\temp\buji-pac4j-demo\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /c:/temp/buji-pac4j-demo/src/main/java/org/pac4j/demo/shiro/RoleAdminAuthGenerator.java:[3,46] cannot access org.pac4j.core.authorization.generator.AuthorizationGenerator
  bad class file: C:\Users\acam0008\.m2\repository\org\pac4j\pac4j-core\5.1.0\pac4j-core-5.1.0.jar(org/pac4j/core/authorization/generator/AuthorizationGenerator.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.
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  15.310 s
[INFO] Finished at: 2021-06-16T13:46:52+10:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project buji-pac4j-demo: Compilation failure
[ERROR] /c:/temp/buji-pac4j-demo/src/main/java/org/pac4j/demo/shiro/RoleAdminAuthGenerator.java:[3,46] cannot access org.pac4j.core.authorization.generator.AuthorizationGenerator
[ERROR]   bad class file: C:\Users\acam0008\.m2\repository\org\pac4j\pac4j-core\5.1.0\pac4j-core-5.1.0.jar(org/pac4j/core/authorization/generator/AuthorizationGenerator.class)
[ERROR]     class file has wrong version 55.0, should be 52.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory of the classpath.
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


Regards
Adrian

Jérôme LELEU

unread,
Jun 17, 2021, 1:59:44 AM6/17/21
to Adrian Campanaro, Pac4j users mailing list
Hi,

It works with JDK11. Are you sure you tried it?
Thanks.
Best regards,
Jérôme


--
You received this message because you are subscribed to the Google Groups "Pac4j users mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pac4j-users/bcf50f24-1d00-42e7-bc4c-fd20a6e44a3en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages