# ktor

Joe Altidore

08/01/2022, 8:54 AM
Hello, I am new to ktor. I have built a restful API service with ktor and is working well when run locally but after deploying to Heroku, I get the error below and I am lost on how to resolve the issue.
Error: A JNI error has occurred, please check your installation and try again
2022-08-01T00:00:03.922254+00:00 app[web.1]: Exception in thread "main" java.lang.UnsupportedClassVersionError: com/impact/ApplicationKt has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
2022-08-01T00:00:03.922349+00:00 app[web.1]: at java.lang.ClassLoader.defineClass1(Native Method)
2022-08-01T00:00:03.922384+00:00 app[web.1]: at java.lang.ClassLoader.defineClass(
2022-08-01T00:00:03.922539+00:00 app[web.1]: at
2022-08-01T00:00:03.922575+00:00 app[web.1]: at <|>.URLClassLoader.defineClass(
2022-08-01T00:00:03.922623+00:00 app[web.1]: at <|>.URLClassLoader.access$100(
2022-08-01T00:00:03.922664+00:00 app[web.1]: at <|>.URLClassLoader$
2022-08-01T00:00:03.922700+00:00 app[web.1]: at <|>.URLClassLoader$
2022-08-01T00:00:03.922740+00:00 app[web.1]: at Method)
2022-08-01T00:00:03.922774+00:00 app[web.1]: at <|>.URLClassLoader.findClass(
2022-08-01T00:00:03.922808+00:00 app[web.1]: at java.lang.ClassLoader.loadClass(
2022-08-01T00:00:03.922842+00:00 app[web.1]: at sun.misc.Launcher$AppClassLoader.loadClass(
2022-08-01T00:00:03.922883+00:00 app[web.1]: at java.lang.ClassLoader.loadClass(
2022-08-01T00:00:03.922922+00:00 app[web.1]: at sun.launcher.LauncherHelper.checkAndLoadMain(

Aleksei Tirman [JB]

08/01/2022, 12:14 PM
Please try to configure Heroku to use JAVA 11

Joe Altidore

08/01/2022, 8:37 PM
@Aleksei Tirman [JB] Thanks a lot. This solved my problem.