When trying to login with the “Start debugger on startup” option enabled in Spark 3.0.0-beta, logging in results in an error.
java.lang.IllegalArgumentException: Can't initialize the configured debugger!
at org.jivesoftware.smack.debugger.ReflectionDebuggerFactory.create(ReflectionDebuggerFactory.java:89)
at org.jivesoftware.smack.AbstractXMPPConnection.<init>(AbstractXMPPConnection.java:357)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.<init>(XMPPTCPConnection.java:324)
at org.jivesoftware.gui.LoginUIPanel.login(LoginUIPanel.java:1185)
at org.jivesoftware.gui.LoginUIPanel.access$1000(LoginUIPanel.java:134)
at org.jivesoftware.gui.LoginUIPanel$6.construct(LoginUIPanel.java:1023)
at org.jivesoftware.spark.util.SwingWorker.lambda$new$0(SwingWorker.java:139)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jivesoftware.smack.debugger.ReflectionDebuggerFactory.create(ReflectionDebuggerFactory.java:87)
... 7 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 4, Size: 1
at java.util.ArrayList.rangeCheckForAdd(ArrayList.java:667)
at java.util.ArrayList.add(ArrayList.java:479)
at javax.swing.JTabbedPane.insertTab(JTabbedPane.java:718)
at javax.swing.JTabbedPane.add(JTabbedPane.java:858)
at org.jivesoftware.smackx.debugger.EnhancedDebuggerWindow.showNewDebugger(EnhancedDebuggerWindow.java:144)
at org.jivesoftware.smackx.debugger.EnhancedDebuggerWindow.addDebugger(EnhancedDebuggerWindow.java:131)
at org.jivesoftware.smackx.debugger.EnhancedDebugger.<init>(EnhancedDebugger.java:248)
... 12 more
I was sure i don’t have anymore as i did a purge recently. But i checked another drive and here’s the result.
If you need them, i can upload them somewhere. Also, you can check Github commit history and see which commit was on which date and maybe figure out the cause.
I was successfully able to debug in Spark 2.9.5 from 21/01/2021, but unfortunately in Spark 2.9.5 from 23/01/2021 the debug does not start.
I only see one commit that could break it.
I’m not sure what this “scroll” policy is needed for, but I do not think we can use it before the bug in Smack is fixed (and we’ve updated Spark to use a version of Smack that includes that fix).
If we update Smack in Spark to the latest version 4.4.X then we will face the problem that Spark will not be able to connect to the Openfire server below 4.6.0
Check out my comments here.
I’ve made some head-way in that PR, but there’s at least one other issue with the upgrade to Smack 4.4.0. It is in places more strict than the older version, which causes a stanza sent by older versions of Openfire to be ignored, which prevents the logging in from completing. I’m not sure if I’m fully correct, and in case I am, if that can be worked around - but I’ve already spend more time on this that what I have available.
Unfortunately I am only able to support one stable branch of Smack as part of my (unpaid) spare time maintenance of Smack. That said, I think, due to Smack’s modular architecutre, you may be able to replace the faulty Smack component in Spark without upgrading Smack
java.lang.IllegalArgumentException: Can't initialize the configured debugger!
at org.jivesoftware.smack.debugger.ReflectionDebuggerFactory.create(ReflectionDebuggerFactory.java:89)
at org.jivesoftware.smack.AbstractXMPPConnection.<init>(AbstractXMPPConnection.java:357)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.<init>(XMPPTCPConnection.java:324)
at org.jivesoftware.gui.LoginUIPanel.login(LoginUIPanel.java:1185)
at org.jivesoftware.gui.LoginUIPanel.access$1000(LoginUIPanel.java:134)
at org.jivesoftware.gui.LoginUIPanel$6.construct(LoginUIPanel.java:1023)
at org.jivesoftware.spark.util.SwingWorker.lambda$new$0(SwingWorker.java:139)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.jivesoftware.smack.debugger.ReflectionDebuggerFactory.create(ReflectionDebuggerFactory.java:87)
... 7 more
Caused by: java.lang.NoClassDefFoundError: org/jivesoftware/smack/Smack
at org.jivesoftware.smackx.debugger.EnhancedDebuggerWindow.createDebug(EnhancedDebuggerWindow.java:235)
at org.jivesoftware.smackx.debugger.EnhancedDebuggerWindow.showNewDebugger(EnhancedDebuggerWindow.java:141)
at org.jivesoftware.smackx.debugger.EnhancedDebuggerWindow.addDebugger(EnhancedDebuggerWindow.java:131)
at org.jivesoftware.smackx.debugger.EnhancedDebugger.<init>(EnhancedDebugger.java:248)
... 12 more
Caused by: java.lang.ClassNotFoundException: org.jivesoftware.smack.Smack
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 16 more