Closed Maxdola closed 6 years ago
The issue keeps spamming the Console besides the Class is in the compiled/shaded jar.
Sorry for being blunt, but man, what on earth are you doing? It looks like you're running dozens of queries at once, aren't rate limiting them despite not being whitelisted, and aren't even correctly selecting a virtual server. Finally, how on earth is it possible that the query is running (or at least trying to run), and just seconds later you're getting NoClassDefFoundError
s??
First of all, make sure that you didn't copy your JAR into Bukkit's plugins folder a dozen times by accident. After that, I'll need to see your code to help you any further.
It is only one querry an that is the reason why am confused and the plugin is there only once
and the bot actually does what he sould buy throws these errors
In which case I really need to see your code to help you any further :smile:
config.setHost("127.0.0.1");
config.setDebugLevel(Level.ALL);
config.setFloodRate(TS3Query.FloodRate.UNLIMITED);
config.setCommandTimeout(500);
query.connect();
api.login("xxx", "xxx");
//api.selectVirtualServerById(1);
api.selectVirtualServerByPort(9987);
api.setNickname("Hausmeister");
this is how the bot is constructed and the errors also happen while he is idling
Can you make sure that that code snippet is really only called once? And what I mean by that is, put in some code to log an error when that function is called more than once, and test it by running the server with that JAR.
After you've done that, I'm sure there's some kind of command to list all the plugins currently running, right? Please use that to verify that there are no duplicates.
the code is only called once because its in the startup and there are no dublicates like I said
Please actually test it or give me more code to work with. This is beyond reasonable doubt not caused by this API, but by user error. And I can't help with that if I have no clue what code you're running in what environment.
I actually was just reworking the code of a friend and I over saw that he forgott to exit the querry but thanks anyways
In which case you're probably still doing something wrong. You almost certainly only need to have one query object for the entire time your Minecraft server is running. So you also only need to call TS3Query#exit
once on that one object.
no after a reload the old thread of the querry wasent terminated and to produced the class not found errors
So in other words, the method to set up the query was actually called multiple times :smile:
Anyway, since you've found the cause of your problem, I'll close this issue.
So in other words, the method to set up the query was actually called multiple times 😄.
Yes but after a reload because he forgott to close it :)
` [16:14:28 INFO]: [2018-03-26 16:14:28.906] [SEVERE] TS3 command error: {msg=invalid serverID, id=1024} [16:14:28 INFO]: [2018-03-26 16:14:28.906] [SEVERE] TS3 command error: {msg=invalid serverID, id=1024} [16:14:28 INFO]: [2018-03-26 16:14:28.906] [SEVERE] TS3 command error: {msg=invalid serverID, id=1024} [16:14:28 INFO]: [2018-03-26 16:14:28.906] [SEVERE] TS3 command error: {msg=invalid serverID, id=1024} [16:14:28 INFO]: [2018-03-26 16:14:28.906] [SEVERE] TS3 command error: {msg=invalid serverID, id=1024} [16:14:28 INFO]: [2018-03-26 16:14:28.906] [SEVERE] TS3 command error: {msg=invalid serverID, id=1024} [16:14:28 INFO]: [2018-03-26 16:14:28.906] [SEVERE] TS3 command error: {msg=invalid serverID, id=1024} [16:14:28 INFO]: [2018-03-26 16:14:28.908] [WARNING] KeepAlive thread has stopped! com.github.theholywaffle.teamspeak3.api.exception.TS3Exception: Unhandled exception at com.github.theholywaffle.teamspeak3.api.CommandFuture.checkForFailure(CommandFuture.java:389) at com.github.theholywaffle.teamspeak3.api.CommandFuture.get(CommandFuture.java:271) at com.github.theholywaffle.teamspeak3.KeepAliveThread.run(KeepAliveThread.java:51) Caused by: com.github.theholywaffle.teamspeak3.api.exception.TS3CommandFailedException: A command returned with a server error. invalid serverID (ID 1024) at com.github.theholywaffle.teamspeak3.TS3ApiAsync.hasFailed(TS3ApiAsync.java:5144) at com.github.theholywaffle.teamspeak3.TS3ApiAsync.access$000(TS3ApiAsync.java:79) at com.github.theholywaffle.teamspeak3.TS3ApiAsync$59.handle(TS3ApiAsync.java:5072) at com.github.theholywaffle.teamspeak3.SocketReader$2.run(SocketReader.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
[16:14:28 INFO]: [2018-03-26 16:14:28.909] [WARNING] KeepAlive thread has stopped! com.github.theholywaffle.teamspeak3.api.exception.TS3Exception: Unhandled exception at com.github.theholywaffle.teamspeak3.api.CommandFuture.checkForFailure(CommandFuture.java:389) at com.github.theholywaffle.teamspeak3.api.CommandFuture.get(CommandFuture.java:271) at com.github.theholywaffle.teamspeak3.KeepAliveThread.run(KeepAliveThread.java:51) Caused by: com.github.theholywaffle.teamspeak3.api.exception.TS3CommandFailedException: A command returned with a server error. invalid serverID (ID 1024) at com.github.theholywaffle.teamspeak3.TS3ApiAsync.hasFailed(TS3ApiAsync.java:5144) at com.github.theholywaffle.teamspeak3.TS3ApiAsync.access$000(TS3ApiAsync.java:79) at com.github.theholywaffle.teamspeak3.TS3ApiAsync$59.handle(TS3ApiAsync.java:5072) at com.github.theholywaffle.teamspeak3.SocketReader$2.run(SocketReader.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
[16:14:28 INFO]: [2018-03-26 16:14:28.909] [WARNING] KeepAlive thread has stopped! com.github.theholywaffle.teamspeak3.api.exception.TS3Exception: Unhandled exception at com.github.theholywaffle.teamspeak3.api.CommandFuture.checkForFailure(CommandFuture.java:389) at com.github.theholywaffle.teamspeak3.api.CommandFuture.get(CommandFuture.java:271) at com.github.theholywaffle.teamspeak3.KeepAliveThread.run(KeepAliveThread.java:51) Caused by: com.github.theholywaffle.teamspeak3.api.exception.TS3CommandFailedException: A command returned with a server error. invalid serverID (ID 1024) at com.github.theholywaffle.teamspeak3.TS3ApiAsync.hasFailed(TS3ApiAsync.java:5144) at com.github.theholywaffle.teamspeak3.TS3ApiAsync.access$000(TS3ApiAsync.java:79) at com.github.theholywaffle.teamspeak3.TS3ApiAsync$59.handle(TS3ApiAsync.java:5072) at com.github.theholywaffle.teamspeak3.SocketReader$2.run(SocketReader.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
[16:14:28 INFO]: [2018-03-26 16:14:28.909] [WARNING] KeepAlive thread has stopped! com.github.theholywaffle.teamspeak3.api.exception.TS3Exception: Unhandled exception at com.github.theholywaffle.teamspeak3.api.CommandFuture.checkForFailure(CommandFuture.java:389) at com.github.theholywaffle.teamspeak3.api.CommandFuture.get(CommandFuture.java:271) at com.github.theholywaffle.teamspeak3.KeepAliveThread.run(KeepAliveThread.java:51) Caused by: com.github.theholywaffle.teamspeak3.api.exception.TS3CommandFailedException: A command returned with a server error. invalid serverID (ID 1024) at com.github.theholywaffle.teamspeak3.TS3ApiAsync.hasFailed(TS3ApiAsync.java:5144) at com.github.theholywaffle.teamspeak3.TS3ApiAsync.access$000(TS3ApiAsync.java:79) at com.github.theholywaffle.teamspeak3.TS3ApiAsync$59.handle(TS3ApiAsync.java:5072) at com.github.theholywaffle.teamspeak3.SocketReader$2.run(SocketReader.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
[16:14:28 INFO]: [2018-03-26 16:14:28.909] [WARNING] KeepAlive thread has stopped! com.github.theholywaffle.teamspeak3.api.exception.TS3Exception: Unhandled exception at com.github.theholywaffle.teamspeak3.api.CommandFuture.checkForFailure(CommandFuture.java:389) at com.github.theholywaffle.teamspeak3.api.CommandFuture.get(CommandFuture.java:271) at com.github.theholywaffle.teamspeak3.KeepAliveThread.run(KeepAliveThread.java:51) Caused by: com.github.theholywaffle.teamspeak3.api.exception.TS3CommandFailedException: A command returned with a server error. invalid serverID (ID 1024) at com.github.theholywaffle.teamspeak3.TS3ApiAsync.hasFailed(TS3ApiAsync.java:5144) at com.github.theholywaffle.teamspeak3.TS3ApiAsync.access$000(TS3ApiAsync.java:79) at com.github.theholywaffle.teamspeak3.TS3ApiAsync$59.handle(TS3ApiAsync.java:5072) at com.github.theholywaffle.teamspeak3.SocketReader$2.run(SocketReader.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
[16:14:28 INFO]: [2018-03-26 16:14:28.909] [WARNING] KeepAlive thread has stopped! com.github.theholywaffle.teamspeak3.api.exception.TS3Exception: Unhandled exception at com.github.theholywaffle.teamspeak3.api.CommandFuture.checkForFailure(CommandFuture.java:389) at com.github.theholywaffle.teamspeak3.api.CommandFuture.get(CommandFuture.java:271) at com.github.theholywaffle.teamspeak3.KeepAliveThread.run(KeepAliveThread.java:51) Caused by: com.github.theholywaffle.teamspeak3.api.exception.TS3CommandFailedException: A command returned with a server error. invalid serverID (ID 1024) at com.github.theholywaffle.teamspeak3.TS3ApiAsync.hasFailed(TS3ApiAsync.java:5144) at com.github.theholywaffle.teamspeak3.TS3ApiAsync.access$000(TS3ApiAsync.java:79) at com.github.theholywaffle.teamspeak3.TS3ApiAsync$59.handle(TS3ApiAsync.java:5072) at com.github.theholywaffle.teamspeak3.SocketReader$2.run(SocketReader.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
[16:14:28 INFO]: [2018-03-26 16:14:28.909] [WARNING] KeepAlive thread has stopped! com.github.theholywaffle.teamspeak3.api.exception.TS3Exception: Unhandled exception at com.github.theholywaffle.teamspeak3.api.CommandFuture.checkForFailure(CommandFuture.java:389) at com.github.theholywaffle.teamspeak3.api.CommandFuture.get(CommandFuture.java:271) at com.github.theholywaffle.teamspeak3.KeepAliveThread.run(KeepAliveThread.java:51) Caused by: com.github.theholywaffle.teamspeak3.api.exception.TS3CommandFailedException: A command returned with a server error. invalid serverID (ID 1024) at com.github.theholywaffle.teamspeak3.TS3ApiAsync.hasFailed(TS3ApiAsync.java:5144) at com.github.theholywaffle.teamspeak3.TS3ApiAsync.access$000(TS3ApiAsync.java:79) at com.github.theholywaffle.teamspeak3.TS3ApiAsync$59.handle(TS3ApiAsync.java:5072) at com.github.theholywaffle.teamspeak3.SocketReader$2.run(SocketReader.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
[16:14:52 SEVERE]: Mar 26, 2018 4:14:52 PM com.mongodb.diagnostics.logging.JULLogger log INFO: Opened connection [connectionId{localValue:563, serverValue:4129}] to 127.0.0.1:27017
[16:15:01 SEVERE]: Mar 26, 2018 4:15:01 PM com.mongodb.diagnostics.logging.JULLogger log INFO: Opened connection [connectionId{localValue:565, serverValue:4131}] to 127.0.0.1:27017
[16:15:01 SEVERE]: Mar 26, 2018 4:15:01 PM com.mongodb.diagnostics.logging.JULLogger log INFO: Opened connection [connectionId{localValue:564, serverValue:4130}] to 127.0.0.1:27017
[16:15:22 INFO]: [2018-03-26 16:15:22.196] [WARNING] Connection closed by the server. [16:15:22 INFO]: [2018-03-26 16:15:22.196] [WARNING] Connection closed by the server. [16:15:22 INFO]: [2018-03-26 16:15:22.196] [WARNING] Connection closed by the server. [16:15:22 INFO]: [2018-03-26 16:15:22.196] [WARNING] Connection closed by the server. [16:15:22 INFO]: [2018-03-26 16:15:22.196] [WARNING] Connection closed by the server. [16:15:22 INFO]: [2018-03-26 16:15:22.196] [WARNING] Connection closed by the server. [16:15:22 INFO]: [2018-03-26 16:15:22.196] [WARNING] Connection closed by the server. [16:15:22 INFO]: [2018-03-26 16:15:22.197] [WARNING] SocketReader has stopped! [16:15:22 INFO]: [2018-03-26 16:15:22.197] [WARNING] SocketReader has stopped! [16:15:22 INFO]: [2018-03-26 16:15:22.197] [WARNING] SocketReader has stopped! [16:15:22 INFO]: [2018-03-26 16:15:22.197] [WARNING] SocketReader has stopped! [16:15:22 INFO]: [2018-03-26 16:15:22.197] [WARNING] SocketReader has stopped! [16:15:22 INFO]: [2018-03-26 16:15:22.197] [WARNING] SocketReader has stopped! [16:15:22 INFO]: [2018-03-26 16:15:22.197] [WARNING] SocketReader has stopped! [16:15:22 SEVERE]: Exception in thread "[TeamSpeak-3-Java-API] SocketReader" [16:15:22 SEVERE]: java.lang.NoClassDefFoundError: com/github/theholywaffle/teamspeak3/TS3Query$1 [16:15:22 SEVERE]: at com.github.theholywaffle.teamspeak3.TS3Query.fireDisconnect(TS3Query.java:189) [16:15:22 SEVERE]: at com.github.theholywaffle.teamspeak3.SocketReader.run(SocketReader.java:150) [16:15:22 SEVERE]: Caused by: java.lang.ClassNotFoundException: com.github.theholywaffle.teamspeak3.TS3Query$1 [16:15:22 SEVERE]: at java.net.URLClassLoader.findClass(URLClassLoader.java:381) [16:15:22 SEVERE]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:102) [16:15:22 SEVERE]: at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:87) [16:15:22 SEVERE]: at java.lang.ClassLoader.loadClass(ClassLoader.java:424) [16:15:22 SEVERE]: at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [16:15:22 SEVERE]: ... 2 more `