powered by Jive Software

Problem running Openfire 4.5.5 with Java 8

While running the patched 4.5.5 openfire version (installed from the x64 installer) with java 8 (1.8.0_151 ).

The openfire server returns the following error when trying to login with a client:

Exception in thread "socket_c2s-thread-2" 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(Unknown Source)

Works fine when running the server with Java 11.

Probably related to cross-compilation issues: [OF-2093] JDK11: java.lang.NoSuchMethodError: java.nio.CharBuffer.flip() - Ignite Realtime Jira

Thanks for reporting this. I believe that you’re spot on: this seems to be OF-2093, which was fixed in 4.6.x, but not in 4.5.5.

I can reproduce the issue with the tar.gz distributable and a client that connects using TCP/5222 (BOSH/websocket-based clients seem unaffected), as well as with a locally-built version of Openfire based on the lastest 4.5 branch. When I cherry-pick the fix for OF-2093 then I can’t reproduce the problem anymore locally.

This problem has been addressed in Openfire 4.5.6 which was released moments ago.

Tested the 4.5.6 release and I can confirm this has fixed it. Thanks for the quick fix :slightly_smiling_face:

1 Like