Hi all,
I tried to upgrade my openfire this morning. I was on 4.9.2 and upgrading to 5.0. I have this on a windows server 2022 machine. I made it in and it complained about a service that wasn’t compatible with the new version. I saw that plugin had an update so I updated. The update was successful, but it still said it wasn’t compatible. I uninstalled the plugin. I can’t remember the exact plugin but it had something to do with keeping chat history.
While in the plugin page I added Ohun plugin.
All was good until a reboot. I see the service running, but the admin console will not open. I have tried reverting back to 4.9.2, but I am getting the following error:
java.lang.NullPointerException: Cannot invoke "javax.swing.ImageIcon.getImage()" because "this.offIcon" is null
at org.jivesoftware.openfire.launcher.Launcher.<init>(Launcher.java:302)
at org.jivesoftware.openfire.launcher.Launcher.main(Launcher.java:411)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)
at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:81)
at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:31)
At this point I would just like to get it back on. Any help is appreciated.
I’m sorry to hear about this. It appears that you are using the old Launcher application to start Openfire. Does this problem also occur when you install and start/stop Openfire as a service?
I was indeed using an old shortcut on my taskbar. I deleted that and tried the new updated one from start menu. I believe I got the same result:
java.lang.NullPointerException: Cannot invoke "javax.swing.ImageIcon.getImage()" because "this.offIcon" is null
at org.jivesoftware.openfire.launcher.Launcher.<init>(Launcher.java:302)
at org.jivesoftware.openfire.launcher.Launcher.main(Launcher.java:411)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)
at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:81)
at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:31)
When I run as a service the service does start, but the admin page says Err refused to connect. I checked my log file, but it hasn’t updated since my last version update in December.
I’m guessing that you’re seeing a couple of different issues. One of them is that Openfire can’t find some images that it uses for the ‘launcher’ application.
It is a bit of a long shot, but perhaps you can ‘restore’ those images by placing the file named openfire500quickfix.jar that I’m linking to this post in the lib directory inside Openfire’s installation directory. Please make sure that the file permissions are set correctly (they should match the permissions of the other files in that directory).
I do not think that this affects Openfire starting as a service. If that’s not working either, then something else may be at play. Openfire, since 5.0.0, requires Java 17 or later. Maybe you have an older version?
I added the file to C:\Openfire and checked permissions. All looks good. I restarted service and tried admin console again, but same result.
I am running newest java (1.8.0_451). I updated in case the older version was not working with 5.0
That file should be placed in C:\Openfire\lib not C:\Openfire
Java 1.8.0_451 (“Java 8”) is incompatible. Openfire needs a newer version. Note that the version of Openfire that you were using (4.9.2) also requires a newer version than what you appear to have (it required 11). Openfire 5.0.0 requires Java 17.
It is quite common to have multiple versions of Java installed on one system. Maybe you are looking at the wrong one?
Okay. Thank you for the attempt. I don’t mind a complete wipe and reinstall. I only hope I can salvage the current user list as to not have to renter them all.
Users are stored in the database (or are obtained from AD). That generally can be restored from older versions, with some amount of work. In any case, create backups of everything before wiping things, if you go down that road.
I believe I use the built in database. maybe sql. And I have a copy of openfire folder from december, as well as one from right before the attempted 5.0 upgrade.
Update:
For some reason the 5.0 update installed under Program Files and not to the existing folder on the C:. That is why the logs weren’t updating and the jar file wasn’t doing anything. I reinstalled to the correct location and now I see this:
DEartoar bsatsaerr istge ttuhpe osre rcvoennr. Pefaisgeu lcahteirkoc ten leorgr ofri:l ePsl efaosre hvmeorrief iyn fyoorumra tdiaotn a.
base settings and check the logs/openfire.log file for detailed error messages.
java.lang.IllegalArgumentException: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 attempts. The exception from the last attempt is as follows: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:1024)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:668)
at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:220)
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:501)
at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:132)
at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:259)
at java.base/java.lang.Class.newInstance(Class.java:804)
at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:92)
at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:56)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)
at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:94)
at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:25)
Caused by: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 attempts. The exception from the last attempt is as follows: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager.java:204)
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:1014)
... 14 more
I have no idea what this bit is. Does this make any sense to you?
The second error is something that I recognize: it is a failure to connect to the database.
If Openfire is now installed in another database as where you originally installed it, then it is likely that the configuration (which is also in that old database) is not being read. That may cause Openfire to try and connect to a non-existing database, which would explain that error.
Can you reinstall Openfire in the correct location? Or, alternatively, can you place a copy of your old Openfire installation in the ‘new’ location, and then install the new version of Openfire on top of that?
I did completely uninstall openfire. I then installed, and since it wasn’t there, it let me pick the install folder. I chose the “old” location, C:/Openfire. Now I get that. I don’t know about the first part.
Spark and Openfire admin console needed firewall rules set back up too. I am now back to “as normal” except for the 5.0 upgrade. I might be brave enough to try again during some down time. Thanks for your help.