Hello everyone,
Our application server. is : Oracle GlassFish Server 3.1.2.2 (build 5), java 1.7 Running.
Erlang version : erlang-21.0.6
RabbitMq version : rabbitmq-server-3.7.8
From the official rabbitMq website ,it says "4.x release series support JDK 6 ". So I get, amqp-client 4.9.0, to put in my application to deploy on Glassfish. But the error get during deployment basically says I need java 8 to run the com/rabbitmq/client/Consumer class(which belongs to amqp-client supposed to compatible with java 7)
Error log :
WARNING|oracle-glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=1183;_ThreadName=Thread-2;|java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.UnsupportedClassVersionError: com/rabbitmq/client/Consumer : Unsupported major.minor version 52.0
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.UnsupportedClassVersionError: com/rabbitmq/client/Consumer : Unsupported major.minor version 52.0
- I realize that amqp-client 4.9.0 that I download from mvnrepository is compiled with jdk 1.8.
- So I checkout the source code of amqp-client to build the code(release 4.9.0) with java 7, this time I get compile error saying that ToDoubleFunctions.class(a jdk 1.8 class) not found in java.util
Error log:
.../src/main/java/com/rabbitmq/client/impl/MicrometerMetricsCollector.java:[160,32] cannot access java.util.function.ToDoubleFunction
class file for java.util.function.ToDoubleFunction not found
My question is how 4.x releases are compatible with java 7, if so how can I fix my problem to Run a rabbitmqClient on my application server?
Thanks for reading this long:)