Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
While using (some versions of?) Java 8 to to run Openfire that is compilied with (some versions of?) Java 11, the following stacktrace is printed to standard out when a client tries to connect:
Exception in thread "socket_c2s-thread-3" java.lang.NoSuchMethodError: java.nio.CharBuffer.flip()Ljava/nio/CharBuffer;
at org.jivesoftware.openfire.nio.XMLLightweightParser.read(XMLLightweightParser.java:200)
at org.jivesoftware.openfire.nio.XMPPDecoder.doDecode(XMPPDecoder.java:38)
at org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:180)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:254)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128)
at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:106)
at org.apache.mina.core.session.IoEvent.run(IoEvent.java:89)
at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:766)
at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:758)
at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:697)
at java.lang.Thread.run(Thread.java:748)
The client connection attempt silently files (time-out)
The issue is that Openfire's build system does not perform sound cross compilation, hence generating "invalid" bytecode when used with newer Java runtime libraries. Smack ran into the same issue, which was fixed with SMACK-651.
While using (some versions of?) Java 8 to to run Openfire that is compilied with (some versions of?) Java 11, the following stacktrace is printed to standard out when a client tries to connect:
Exception in thread "socket_c2s-thread-3" java.lang.NoSuchMethodError: java.nio.CharBuffer.flip()Ljava/nio/CharBuffer; at org.jivesoftware.openfire.nio.XMLLightweightParser.read(XMLLightweightParser.java:200) at org.jivesoftware.openfire.nio.XMPPDecoder.doDecode(XMPPDecoder.java:38) at org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:180) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:254) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128) at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:106) at org.apache.mina.core.session.IoEvent.run(IoEvent.java:89) at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:766) at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:758) at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:697) at java.lang.Thread.run(Thread.java:748)
The client connection attempt silently files (time-out)
The problem is documented in greater detail in https://stackoverflow.com/a/61267496