简体   繁体   English

Hazelcast 与 openjdk-15

[英]Hazelcast with openjdk-15

How I can run hazelcast with java15?如何使用 java15 运行 hazelcast? I am using usercodedeployment so I need to install my own classes in java 15. Now I got error:我正在使用 usercodedeployment,所以我需要在 java 15 中安装我自己的类。现在我收到错误:

{"@timestamp":"2021-04-08T23:34:43.129+02:00","@version":"1","message":"Hazelcast nepripojen","logger_name":"org.my.data.HazelcastInstanceWrapper","thread_name":"main","level":"ERROR","level_value":40000,"stack_trace":"com.hazelcast.client.UndefinedErrorCodeException: Class name: java.lang.UnsupportedClassVersionError, Message: org/my/data/MyData has been compiled by a more recent version of the Java Runtime (class file version 59.0), this version of the Java Runtime only recognizes class file versions up to 55.0\n\tat java.lang.ClassLoader.defineClass1(Native Method)\n\tat java.lang.ClassLoader.defineClass(ClassLoader.java:1017)\n\tat java.lang.ClassLoader.defineClass(ClassLoader.java:878)\n\tat com.hazelcast.internal.usercodedeployment.impl.ClassSource.define(ClassSource.java:52)\n\tat com.hazelcast.internal.usercodedeployment.impl.ClassLocator.defineClassFromClient(ClassLocator.java:135)\n\tat com.hazelcast.internal.usercodedeployment.impl.ClassLocator.defineClassesFromClient(ClassLocator.java:107)\n\tat com.hazelcast.internal.usercodedeployment.UserCodeDeploymentService.defineClasses(UserCodeDeploymentService.java:74)\n\tat com.hazelcast.internal.usercodedeployment.impl.operation.DeployClassesOperation.run(DeployClassesOperation.java:49)\n\tat com.hazelcast.spi.impl.operationservice.Operation.call(Operation.java:184)\n\tat com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.call(OperationRunnerImpl.java:256)\n\tat com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:237)\n\tat com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:452)\n\tat com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:166)\n\tat com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:136)\n\tat com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.executeRun(OperationThread.java:123)\n\tat com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:102)\n","SERVERNAME":"rob-cache-8448d476d6-l9k2j"}

I check that hazelcast support this version and when I check official dockerfile there is java11.我检查 hazelcast 是否支持这个版本,当我检查官方dockerfile时,有 java11。 Is there also version with java 15 or I need to create my own dockerfile with java 15?是否还有带有 java 15 的版本,或者我需要使用 java 15 创建自己的 dockerfile?

As you mention, the official Docker image uses Java 11. Note that your link points to the Enterprise version, the OSS version is here .正如您所提到的,官方 Docker 镜像使用 Java 11。注意您的链接指向企业版,OSS 版本在这里

Because your code has been compiled with Java 15, it's not possible for the Java 11 runtime on the server-side to execute it.因为您的代码是使用 Java 15 编译的,所以服务器端的 Java 11 运行时无法执行它。

Creating your own Dockerfile with a Java runtime 15+ will solve this issue.使用 Java 运行时 15+ 创建您自己的 Dockerfile 将解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM