These are chat archives for TheHolyWaffle/TeamSpeak-3-Java-API

27th
Jul 2016
undefin3dd
@undefin3dd
Jul 27 2016 00:18
Exception in thread "main" java.lang.NullPointerException
        at com.github.theholywaffle.teamspeak3.TS3Query.doCommand(TS3Query.java:161)
        at com.github.theholywaffle.teamspeak3.TS3Api.getServerGroups(TS3Api.java:2228)
        at me.undefin3d.ts3.Main.userAssistanceSGID(Main.java:243)
        at me.undefin3d.ts3.Main.main(Main.java:155)
Guys i have this problem, i've searched over the net but i can't resolve this :/
Henny022
@Henny022
Jul 27 2016 00:22
Post the source of your main class somewhere ( obfuscate your login information) , without i can't find the error
Pastebin for example
undefin3dd
@undefin3dd
Jul 27 2016 00:25
Sent Privately
Roger Baumgartner
@rogermb
Jul 27 2016 00:27
wtf, the QueryIO instance is null?
Are you somehow creating your TS3Query instances in a strange way?
Are there any exceptions or strange behavior prior to the one you've sent?
undefin3dd
@undefin3dd
Jul 27 2016 00:28
No, bot works perfectly on IDE
when i export it on jar that appears
i send you too my main
Henny022
@Henny022
Jul 27 2016 00:31
First export as a jar or did you have working jars before?
Roger Baumgartner
@rogermb
Jul 27 2016 00:31
undefin3dd
@undefin3dd
Jul 27 2016 00:32
first
ahaha
Henny022
@Henny022
Jul 27 2016 00:33
Then I'd say theres something worng with your export configuration
Roger Baumgartner
@rogermb
Jul 27 2016 00:33
Yeah, that's probably it. I don't know why it wouldn't include QueryIO specifically, though
Maybe some kind of version mismatch?
Henny022
@Henny022
Jul 27 2016 00:33
Maybe
undefin3dd
@undefin3dd
Jul 27 2016 00:34
I'm using maven
Roger Baumgartner
@rogermb
Jul 27 2016 00:34
Oh, and by the way @undefin3dd
The real case of "wat" is line 43 and 44 of your source code
May I introduce you to the wonderful concept of a HashMap<Integer, Client>? :stuck_out_tongue:
Henny022
@Henny022
Jul 27 2016 00:34
Are you running the jar on the same computer as you IDE?
undefin3dd
@undefin3dd
Jul 27 2016 00:35
@Firedroide never knowed how HashMap Works xD
@Henny022 Yeah
Roger Baumgartner
@rogermb
Jul 27 2016 00:36
Just wanted to say, that's 2 * 10^6 * 8 bytes, aka 16 MB of completely wasted RAM
Henny022
@Henny022
Jul 27 2016 00:36
Jre same/newer version than jdk?
undefin3dd
@undefin3dd
Jul 27 2016 00:37
@Henny022 maybe, i just upgraded jre after the holiday, now i will update jdk
Henny022
@Henny022
Jul 27 2016 00:37
I also just started working with hash maps and they are just great
Jre must be the newer one if not same version
Which IDE do you use?
undefin3dd
@undefin3dd
Jul 27 2016 00:38
Intellij
Jre is newer
Roger Baumgartner
@rogermb
Jul 27 2016 00:38
As long as his pom.xml is set up correctly, the client JRE shouldn't actually matter. Then again, who actually configures that
like passing source and target version to the compiler plugin, etc
undefin3dd
@undefin3dd
Jul 27 2016 00:39
i recheck pom
Roger Baumgartner
@rogermb
Jul 27 2016 00:39
Are you using any snapshot builds @undefin3dd?
Henny022
@Henny022
Jul 27 2016 00:40
Can you send an sxreenshot of tour jar artifact configuration?
undefin3dd
@undefin3dd
Jul 27 2016 00:40
I'm doing a pastebin with my pom
Roger Baumgartner
@rogermb
Jul 27 2016 00:41
l 232 - 238 of your main class O.o
You're doing regex on the toString version of a non-generic list??
Sorry, but: dafuq
undefin3dd
@undefin3dd
Jul 27 2016 00:42
@Firedroide xD, i'm pretty new on java, this is my 2nd project :P
Roger Baumgartner
@rogermb
Jul 27 2016 00:42
That explains some things, I guess :stuck_out_tongue:
Roger Baumgartner
@rogermb
Jul 27 2016 00:43
But who would think of doing regex before doing a simple for-loop, lol
What goals do you build your jar with?
Sorry. "With what goals do you run maven"
undefin3dd
@undefin3dd
Jul 27 2016 00:44
single?
Roger Baumgartner
@rogermb
Jul 27 2016 00:45
no, something like "package", "install", "clean install", "deploy"
undefin3dd
@undefin3dd
Jul 27 2016 00:45
oh, clean install
Henny022
@Henny022
Jul 27 2016 00:46
I dont know anything about maven
Roger Baumgartner
@rogermb
Jul 27 2016 00:46
so it's not just a missing clean either, then
Henny022
@Henny022
Jul 27 2016 00:47
Again, can you send a screenshot of your jar artifact configuration?
undefin3dd
@undefin3dd
Jul 27 2016 00:47
sure
Henny022
@Henny022
Jul 27 2016 00:48
May i can find an error there
undefin3dd
@undefin3dd
Jul 27 2016 00:48
Roger Baumgartner
@rogermb
Jul 27 2016 00:51
The amount of image hosting sites these days, damn ^^
undefin3dd
@undefin3dd
Jul 27 2016 00:51
ahaha
Henny022
@Henny022
Jul 27 2016 00:52
I mean your configuration in intellij
undefin3dd
@undefin3dd
Jul 27 2016 00:53
ah whoops
Roger Baumgartner
@rogermb
Jul 27 2016 00:53
Honestly, I don't think we'll find the culprit there
undefin3dd
@undefin3dd
Jul 27 2016 00:54
Roger Baumgartner
@rogermb
Jul 27 2016 00:54
If he's building the JARs with Maven and is grabbing them out of the /target folder, IntelliJ shouldn't really mess with that
Henny022
@Henny022
Jul 27 2016 00:55
I fail at this ponit at least once in every single project
undefin3dd
@undefin3dd
Jul 27 2016 00:56
So i can't resolve that error? :worried:
Roger Baumgartner
@rogermb
Jul 27 2016 00:56
I don't know the reason this is happening yet
But this obviously shouldn't happen and doesn't happen to the vast majority
Something I notice is that you're using snapshot versions, at least in IntelliJ
And I'm too tired to figure out if your Maven config should even allow snapshot
undefin3dd
@undefin3dd
Jul 27 2016 00:58
so i remove that
Roger Baumgartner
@rogermb
Jul 27 2016 00:58
Do me a favor and set the version string of the dependency in pom.xml to "1.0.13"
Nothing else needs to go
And then re-run mvn clean install
or clean package or whatever
undefin3dd
@undefin3dd
Jul 27 2016 00:58
ok
Henny022
@Henny022
Jul 27 2016 00:58
I have to sleep now, 3 o'clock in the morning and haven't slept a bit. Have to get up early so i will look into tomorrow, well later today so good night
Roger Baumgartner
@rogermb
Jul 27 2016 00:59
Yeah, same here. Except for the have-to-get-up-early part
undefin3dd
@undefin3dd
Jul 27 2016 00:59
Good Night @Henny022
Roger Baumgartner
@rogermb
Jul 27 2016 00:59
So I think I'll sign off for today as well
I'll get back to your issue tomorrow @undefin3dd
undefin3dd
@undefin3dd
Jul 27 2016 00:59
Thanks you @Firedroide
Roger Baumgartner
@rogermb
Jul 27 2016 00:59
Cyas and good luck
undefin3dd
@undefin3dd
Jul 27 2016 00:59
Good night you too
Thanks xD
Roger Baumgartner
@rogermb
Jul 27 2016 09:57
Have you been able to find the cause of your issues @undefin3dd?
undefin3dd
@undefin3dd
Jul 27 2016 11:05
nope
undefin3dd
@undefin3dd
Jul 27 2016 11:12
i tried too with "1.0.13" version
but its the same
Henny022
@Henny022
Jul 27 2016 12:06
go to "file" > "project structure" and send me a screenshot of the Artifacs page
undefin3dd
@undefin3dd
Jul 27 2016 12:07
@Henny022 Henny, i'm using maven, that its not important, but i can try to export as artifact...
Henny022
@Henny022
Jul 27 2016 12:07
ok i dont how it works with maven
undefin3dd
@undefin3dd
Jul 27 2016 12:11
So i'm trying with artifacts but how i can export the com.theholywaffle etc... instead of the jar? this is a screenshot https://scr.hu/8d7JAJ
Henny022
@Henny022
Jul 27 2016 12:14
go to artifacits, click the green + select jar>"from modules with dependencies", select your main class and hit ok
then everything should work
undefin3dd
@undefin3dd
Jul 27 2016 12:16
i dont have that https://scr.hu/Mrp6vd
Henny022
@Henny022
Jul 27 2016 12:16
in the projet structure window
undefin3dd
@undefin3dd
Jul 27 2016 12:17
i'm on the project structure window and artifacts tab
Henny022
@Henny022
Jul 27 2016 12:18
new artifact
undefin3dd
@undefin3dd
Jul 27 2016 12:18
ah ok
sorry ç.ç
ok, with artifacts i have the same error
Henny022
@Henny022
Jul 27 2016 12:20
then its not the jar file
Roger Baumgartner
@rogermb
Jul 27 2016 17:33
yo @undefin3dd, I have an idea
Can you do a normal maven build and send me the generated .jar file (via private chat)?
It should be much easier to find out what's actually going wrong if I can see what happens to the included API files by looking into the .jar file instead of just trying everything without knowing what's actually wrong :stuck_out_tongue: