Few Issues I can't find a basis for [v83 setup]

Results 1 to 11 of 11
  1. #1
    Apprentice Campio is offline
    MemberRank
    Sep 2019 Join Date
    5Posts

    Few Issues I can't find a basis for [v83 setup]

    Hi, I've set up a server 3 times or so before with similar sources (zenthosdev, moopledev, tried helios)I am having some issues with my SQL database and connecting to it when launching my server. I can compile and build successfully. Can provide any more information, because I am having trouble with these errors: Thanks for any insight


  2. #2
    Enthusiast PirateKing is offline
    MemberRank
    Sep 2019 Join Date
    25Posts

    Re: Few Issues I can't find a basis for [v83 setup]

    How did you update the database information in ServerConstants? They need to look exactly like you tested your connection (hostname, username, port and schema).

    If you're sure they look the same, make sure the new .jar file generated after you compile replaced the old one (with default database connection).

    Post how you configured your ServerConstants file just to make sure it's configured like it should be.

  3. #3
    Apprentice Campio is offline
    MemberRank
    Sep 2019 Join Date
    5Posts

    Re: Few Issues I can't find a basis for [v83 setup]

    Quote Originally Posted by PirateKing View Post
    How did you update the database information in ServerConstants?
    I believe I compiled correctly, here's what I have atm though in my netbeans project

    I turned off junit and junit 4 checks because it used to give me issues cause it could not find the class. not sure if relevant whatsoever.
    Last edited by Campio; 02-10-19 at 08:41 PM.

  4. #4
    Enthusiast PirateKing is offline
    MemberRank
    Sep 2019 Join Date
    25Posts

    Re: Few Issues I can't find a basis for [v83 setup]

    Isn't your database server located in your own computer? Replace the ip 67.169... to localhost in DB_URL constant.

    In your test connection you used localhost as your hostname, you should do the same here.

    Code:
    public static final String DB_URL = "jdbc:mysql://localhost:3306/MoopleDEV?autoReconnect=true";
    After replacing the connection ip, compile, make sure the .jar file was replaced and check if it works.

    If you're willing to understand more about localhost, take a read in this link: https://www.ionos.com/digitalguide/s...how/localhost/

  5. #5
    Apprentice Campio is offline
    MemberRank
    Sep 2019 Join Date
    5Posts

    Re: Few Issues I can't find a basis for [v83 setup]

    Quote Originally Posted by PirateKing View Post
    Isn't your database server located in your own computer? Replace the ip 67.169... to localhost in DB_URL constant.
    I changed all connection named to read localhost, re-compiled (junit error again) and relaunched. Error again. Funny thing is I've gotten different errors before and then it launched the server. any ideas? is my path messed up? are my server constants still wrong somehow? did I mess up compiling

  6. #6
    Enthusiast PirateKing is offline
    MemberRank
    Sep 2019 Join Date
    25Posts

    Re: Few Issues I can't find a basis for [v83 setup]

    Quote Originally Posted by Campio View Post
    I changed all connection named to read localhost, re-compiled (junit error again) and relaunched. Error again. Funny thing is I've gotten different errors before and then it launched the server. any ideas? is my path messed up? are my server constants still wrong somehow? did I mess up compiling
    You can turn off junit. Can you show your new ServerConstants after you changed it? It should be because you messed the constants configuration or the old .jar file is not being replaced by the new one (could be the way you configured the project to be compiled).

    To be sure the .jar is being replaced, go to the dist folder remove the MoopleDEV.jar and then compile the project again. If after compiling there's no new MoopleDEV.jar your new compiled source code is not replacing the default one and your changes are not being applied.


    Also, do you use password in your database? If you don't use, you shouldn't set a password in your ServerConstants file. You need to replace there the exact same configuration you used in your test connection.

  7. #7
    Apprentice Campio is offline
    MemberRank
    Sep 2019 Join Date
    5Posts

    Re: Few Issues I can't find a basis for [v83 setup]


    Recompiled, got a new file after turning junit off, the password is what I've been using for this database so idk what I could be doing wrong.

    still same OS error though
    Last edited by Campio; 02-10-19 at 08:42 PM.

  8. #8
    Enthusiast PirateKing is offline
    MemberRank
    Sep 2019 Join Date
    25Posts

    Re: Few Issues I can't find a basis for [v83 setup]

    Quote Originally Posted by Campio View Post
    still same OS error though
    This OS error looks more a MySQL Workbench connection problem and not related to the connection failing in the launcher. Just to be sure, try to connect to your database via CLI.

    If you're using xampp:

    1. Open GUI control panel
    2. Click shell
    3. A console will open, type mysql -u <user> -p<password> <schema>, in your case mysql -u root -p<pass> MoopleDEV

    I don't think it's a connection problem, since you have tested connection through MySQL Workbench. If the connection is working, double check if the new .jar file is being placed at dist folder and not in any other folder (it can change depending the way you configure your netbeans project).

  9. #9
    Apprentice Campio is offline
    MemberRank
    Sep 2019 Join Date
    5Posts

    Re: Few Issues I can't find a basis for [v83 setup]

    Quote Originally Posted by PirateKing View Post
    This OS error looks more a MySQL Workbench connection problem and not related to the connection failing in the launcher. Just to be sure, try to connect to your database via CLI.
    I used the command line client and was able to access the moopledev database. Jar's in dist, not sure what the heck is wrong

  10. #10
    Enthusiast PirateKing is offline
    MemberRank
    Sep 2019 Join Date
    25Posts

    Re: Few Issues I can't find a basis for [v83 setup]

    Quote Originally Posted by Campio View Post
    I used the command line client and was able to access the moopledev database. Jar's in dist, not sure what the heck is wrong
    That's in fact weird. Mind to private message me so we team viewer or something to try to figure out the problem? Everything looks fine, but I'd like to take a closer look, if you don't mind.

  11. #11
    Enthusiast PirateKing is offline
    MemberRank
    Sep 2019 Join Date
    25Posts

    Re: Few Issues I can't find a basis for [v83 setup]

    We team viewer and managed to find the issue. The issue in specific here, was problably related to MySQL version not supporting something related to encoding.

    In case you're dealing with the same issue, make sure you have tried:

    1. Configured and compiled ServerConstants with the same information you use to connect in MySQL.
    2. Make sure the compiled .jar file is being replaced in your dist source folder (if not automatically, do it manually)
    3. If you're still getting the "MAKE SURE YOU'VE CHANGED YOUR SERVER CONSTANTS" and you're sure both above solutions are happening as it should be. Go to the DatabaseConnection file, which is the file responsible to make database connection. Find the try{} catch{} where the same "MAKE SURE..." message is being printed. There, you can add a sql.printStackTrace() into the catch block. After that, compile and run again the server launch and the real exception will be thrown there. This way, you can search on google or better understand what's the real problem.

    Hope it helps someone in future. :)



Advertisement