Hello. I'm storing a String with and thats a UUID but I want to convert it to a UUID from java. I use UUID.fromString(<myUUID>); but it gives UnexpectedNumberException or something like that Why does this happen. oh yeah and there are '-''s in the UUID regards Funergy
BetaNyan Ill try in a sec Skionz You guys were to late with answering I tried something else. I'll try to get it back how it was EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Funergy How do you convert the UUID to a String? Are you sure it is throwing an UnexpectedNumberException? Are you sure that line of code is the problem?
Make sure you're using UUID.toString when you store it. You probably are, but worth checking. The "-" in the string should be fine, but all of the other characters should be hex values, 0 - F. It sounds like there's something in your string which isn't one of those. Maybe post the string itself, so that we can see it?
Shaggy67 teej107 Skionz BetaNyan mine-care I'm trying to get the error back. but when I'm trying this I'm getting also this java.io.IOException: Server returned HTTP response code: 429 for URL: https://sessionserver.mojang.com/session/minecraft/profile/"ed25e78b9c634f67b278519f99d0d24b" The code 429 is "Too many requests" Shaggy67 teej107 Skionz BetaNyan mine-care Here is the error Code: 26.11 18:04:46 [Server] INFO at com.thehype.thc.Command.Friend.execute(Friend.java:56) 26.11 18:04:46 [Server] INFO at com.thehype.thc.MongoDB.DataSelector.parseToListUUID(DataSelector.java:268) 26.11 18:04:46 [Server] INFO at java.util.UUID.fromString(Unknown Source) 26.11 18:04:46 [Server] INFO at java.lang.Long.decode(Unknown Source) 26.11 18:04:46 [Server] INFO at java.lang.Long.valueOf(Unknown Source) 26.11 18:04:46 [Server] INFO at java.lang.Long.parseLong(Unknown Source) 26.11 18:04:46 [Server] INFO at java.lang.NumberFormatException.forInputString(Unknown Source) 26.11 18:04:46 [Server] INFO java.lang.NumberFormatException: For input string: ""ed25e78b" BetaNyan I did that and it gave Invalid UUID exception
Funergy Ok. Now I'm confused. Post the exact code where the exception is happening? I never had a NumberFormatException with using UUID#fromString().
I believe the NumberFormatException is thrown when the fromString() method tries to parse it to a long.
teej107 Skionz I think I found the problem. if I broadcast the UUID it says it in quotes but normally it isn't doing that. How to I replace the "" in a string. it underlines red if I do it
Skionz No the problem is in where I get the UUID. if I would analyse the String it would be ""Hello"" It has an extra quote. How would I remove the extra quotes?