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

UnsupportedClassVersionError for Java 7 runtime #4

Closed
snallami opened this issue Jul 8, 2016 · 4 comments
Closed

UnsupportedClassVersionError for Java 7 runtime #4

snallami opened this issue Jul 8, 2016 · 4 comments
Assignees
Labels

Comments

@snallami
Copy link

snallami commented Jul 8, 2016

Getting below error

[2016-07-08 00:38:25.352 EDT] o.s.b.SpringApplication - ERROR: Application startup failed
java.lang.UnsupportedClassVersionError: com/amazonaws/services/kinesis/clientlibrary/interfaces/IRecordProcessorFactory : Unsupported major.minor version 52.0 (unable to load class com.amazonaws.services.kinesis.clientlibrary.interfaces.IRecordProcessorFactory)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:3111) ~[catalina.jar:7.0.64]
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1348) ~[catalina.jar:7.0.64]
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1828) ~[catalina.jar:7.0.64]
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1709) ~[catalina.jar:7.0.64]

Root Cause: amazon-kinesis-client 1.6.4 version is released on July 6th, 2016 and looks like it is compiled with JDK 1.8

In pom.xml , am not sure why you are defining version range for amazon-kinesis-client instead of depending on a fixed version. This is causing unexpected errors like this all of a sudden
<amazon-kinesis-client.version>[1.6.0, 1.7.0)</amazon-kinesis-client.version>

@amcp amcp added the bug label Apr 22, 2017
@amcp amcp self-assigned this Apr 22, 2017
@amcp
Copy link
Contributor

amcp commented Apr 23, 2017

looking at the 1.6.4 tag of KCL pom.xml shows that source needs to be compatible with 1.7 and the compilation target is also 1.7. I will check the JAR binary next.

@amcp
Copy link
Contributor

amcp commented Apr 23, 2017

$ mkdir temp && cd temp && wget http://central.maven.org/maven2/com/amazonaws/amazon-kinesis-client/1.6.4/amazon-kinesis-client-1.6.4.jar
$ jar xf amazon-kinesis-client-1.6.4.jar
$ file com/amazonaws/services/kinesis/clientlibrary/lib/worker/KinesisClientLibLeaseCoordinator.class
com/amazonaws/services/kinesis/clientlibrary/lib/worker/KinesisClientLibLeaseCoordinator.class: compiled Java class data, version 52.0 (Java 1.8)

@amcp
Copy link
Contributor

amcp commented Apr 23, 2017

Congratulations on finding this issue. However, this is an issue with KCL and not the dynamodb-streams-kinesis-adapter. JDK7 is deprecated and it is recommended to use JDK8. I will file this issue with the KCL project.

@amcp amcp closed this as completed Apr 23, 2017
@amcp
Copy link
Contributor

amcp commented Apr 23, 2017

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

No branches or pull requests

2 participants