I have a Tigase cluster working for some time, now I decided to migrate to 7.1.6 version
(I have some extensions that need changes to fit Tigase 8.x)
I would like to use JDK11 as well since the rest of my platform is in that version and Tigase documentation doesn't suggest it's restricted to JDK8
Tigase-server bootstrap correctly and seems to accept connections and delivering messages.
However, I noticed the migrated server didn't join the cluster.
Looking at the logs I can see this:
java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Boolean (java.lang.String and java.lang.Boolean are in module java.base of loader 'bootstrap')
tigase.cluster.repo.ClConConfigRepository.setProperties(ClConConfigRepository.java:226)
tigase.cluster.repo.ClConSQLRepository.setProperties(ClConSQLRepository.java:303)
tigase.cluster.ClusterConnectionManager.setProperties(ClusterConnectionManager.java:897)
tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:519)
tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:152)
tigase.conf.Configurator.componentAdded(Configurator.java:50)
tigase.conf.Configurator.componentAdded(Configurator.java:33)
tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
tigase.server.MessageRouter.addComponent(MessageRouter.java:115)
tigase.server.MessageRouter.addRouter(MessageRouter.java:152)
tigase.server.MessageRouter.setProperties(MessageRouter.java:745)
tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:519)
tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:152)
tigase.conf.Configurator.componentAdded(Configurator.java:50)
This seems to happens only with Java11 ... the same 7.1.6 version on Java 8 works.
I would appreciate any advice on how to proceed here.
Are you aware of Tigase-server 7.1.6 having problems with OpenJDK11?
Should I stick to JDK8?
Unknown commented 4 years ago
There shouldn't be a problem with running on JDK11.
Can you share your (obfuscated) configuration file (etc/init.properties)? From the stacktrace it seems that you have some error in your configuration (around repo-auto-remove-obsolete-items option). It should has following format:
This might actually be a JDK11 compatibility issue (??) ...
Java 9 and later:
// sun.nio.ch.DirectBuffer methods are not accessible,
// so the new sun.misc.Unsafe.theUnsafe.invokeCleaner(ByteBuffer) is used.
// See https://bugs.openjdk.java.net/browse/JDK-8171377
Unknown commented 4 years ago
I can see at tigase.net.IOUtil.java there is this inner class BufferCache
it calling
is INCORRECT - you can't have two lines about same configuration and init.properties requires specifying value type (i.e. [B])
As for the issue itself - you could try adding -XaddExports:java.base/jdk.internal.ref=ALL-UNNAMED to your java command, which should grant you access to this API.
If not I'd stick with JDK8 or, better yet, update to more recent Tigase version.
Unknown commented 4 years ago
Cool, thanks for the clarification.
We will try and get back here with the outcome.
I have a Tigase cluster working for some time, now I decided to migrate to 7.1.6 version (I have some extensions that need changes to fit Tigase 8.x)
I would like to use JDK11 as well since the rest of my platform is in that version and Tigase documentation doesn't suggest it's restricted to JDK8
Tigase-server bootstrap correctly and seems to accept connections and delivering messages.
However, I noticed the migrated server didn't join the cluster. Looking at the logs I can see this:
This seems to happens only with Java11 ... the same 7.1.6 version on Java 8 works.
I would appreciate any advice on how to proceed here.
Are you aware of Tigase-server 7.1.6 having problems with OpenJDK11? Should I stick to JDK8?