Java 14 Support

My development team recently upgraded to OpenJDK 14 (requirement), which broke our working version of Openfire 4.3.2. Currently, running openfire.bat throw the following errors

The Openfire starts, and the admin console is accessible, but ports 5222 and 5223 (client connection ports) as well as a few others fail. bellow is the error log (relevant errors start at the bottom at time 14:27:21)

----------------------------------------------------------error.txt------------------------------------------------------------------
2020.08.07 14:27:21 org.jivesoftware.openfire.spi.MINAConnectionAcceptor[socket_c2s] - Error starting: 5222
java.lang.IllegalArgumentException: null
at java.util.concurrent.ThreadPoolExecutor.setCorePoolSize(ThreadPoolExecutor.java:1537) ~[?:?]
at org.apache.mina.filter.executor.OrderedThreadPoolExecutor.(OrderedThreadPoolExecutor.java:199) ~[mina-core-2.0.7.jar:?]
at org.apache.mina.filter.executor.ExecutorFilter.createDefaultExecutor(ExecutorFilter.java:441) ~[mina-core-2.0.7.jar:?]
at org.apache.mina.filter.executor.ExecutorFilter.(ExecutorFilter.java:206) ~[mina-core-2.0.7.jar:?]
at org.jivesoftware.openfire.spi.MINAConnectionAcceptor.start(MINAConnectionAcceptor.java:102) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.spi.ConnectionListener.start(ConnectionListener.java:216) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.spi.ConnectionManagerImpl.startListeners(ConnectionManagerImpl.java:314) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.spi.ConnectionManagerImpl.access$100(ConnectionManagerImpl.java:46) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.spi.ConnectionManagerImpl$1.pluginsMonitored(ConnectionManagerImpl.java:303) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.container.PluginManager.firePluginsMonitored(PluginManager.java:1234) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.container.PluginManager.firePluginsMonitored(PluginManager.java:1227) [xmppserver-4.3.2.jar:4.3.2]
at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor.java:401) [xmppserver-4.3.2.jar:4.3.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?]
at java.lang.Thread.run(Thread.java:832) [?:?]

2020.08.07 14:27:21 org.jivesoftware.openfire.spi.MINAConnectionAcceptor[socket_c2s_ssl] - Error starting: 5223
java.lang.IllegalArgumentException: null
at java.util.concurrent.ThreadPoolExecutor.setCorePoolSize(ThreadPoolExecutor.java:1537) ~

2020.08.07 14:27:21 org.jivesoftware.openfire.spi.MINAConnectionAcceptor[component] - Error starting: 5275
java.lang.IllegalArgumentException: null
at java.util.concurrent.ThreadPoolExecutor.setCorePoolSize(ThreadPoolExecutor.java:1537) ~

2020.08.07 14:27:21 org.jivesoftware.openfire.spi.MINAConnectionAcceptor[component_ssl] - Error starting: 5276
java.lang.IllegalArgumentException: null
at java.util.concurrent.ThreadPoolExecutor.setCorePoolSize(ThreadPoolExecutor.java:1537) ~

2020.08.07 14:27:21 org.jivesoftware.openfire.spi.MINAConnectionAcceptor[connection_manager] - Error starting: 5262
java.lang.IllegalArgumentException: null
at java.util.concurrent.ThreadPoolExecutor.setCorePoolSize(ThreadPoolExecutor.java:1537) ~

2020.08.07 14:27:21 org.jivesoftware.openfire.spi.MINAConnectionAcceptor[connection_manager_ssl] - Error starting: 5263
java.lang.IllegalArgumentException: null
at java.util.concurrent.ThreadPoolExecutor.setCorePoolSize(ThreadPoolExecutor.java:1537) ~

---------------------------------------------------------/error.txt------------------------------------------------------------------
We have the ability to move to Openfire version 4.5.2 (the latest version) (although it is not preferred), however, when openfire.bat in 4.5.2 is executed, the command line opens and immediately closes with no error report. Running C:/…/ openfire.bat > output.txt yields an empty output file.

Any help related to updating the Openfire code base to work with JDK 14 would be greatly appreciated.

The issue that you’re experiencing with Openfire 4.3.2 is most likely https://issues.apache.org/jira/browse/DIRMINA-1088

This was addressed in Openfire 4.4.0.

I have not done any analysis on running the latest release with Java 14. I’m unsure what the problem is there. I’ll need to find time to investigate.

Are there going to be any updates for the monitoring and or certificatemanager plugins for openfire? they say they only support Java 1.8, and I cant find any updates on the ignite realtime website

We do not specify pinned versions of java, only minimum version numbers They require java 1.8 or higher, not specifically 1.8. Note that we do not explicitly test for compatibility with specific versions. Your mileage may vary.

For the archive: I solved the port opening errors by downloading the newest version of mina-core.jar from https://mina.apache.org/mina-project/downloads_2_1.html.
That solved the problem with getting Openfire to launch, now just trying to fix the non-compatible plugins

MARK AS SOLVED:

Also went into the source code of the plugins and simply changed the “Java version required” line in the pom.xml files to 14 instead of 1.8. Everything seems to be working now

It is not expected that such a change makes a functional difference: that line refers to the minimum version required. It serves no purpose other than stopping plugins from being installed in Openfire instances that run on lower versions of Java.