Thread: wierd error when logging in, what does it mean?

Results 1 to 5 of 5
  1. #1 wierd error when logging in, what does it mean? 
    Perplexity owner

    Join Date
    Feb 2011
    Posts
    171
    Thanks given
    32
    Thanks received
    15
    Rep Power
    0
    So when logging in to my server it throws this error in the eclipse log? can anyone point me in the direction of what this error is telling me is going wrong

    Code:
    [World] Registering player - [username, host] : [Porce, 127.0.0.1]
    java.lang.NullPointerException
    	at mysql.impl.Login.login(Login.java:15)
    	at com.ruthlessps.world.entity.impl.player.PlayerHandler.handleLogin(PlayerHandler.java:159)
    	at com.ruthlessps.world.World.sequence(World.java:120)
    	at com.ruthlessps.engine.GameEngine.run(GameEngine.java:62)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    I can post them lines if any are needed but I can presume inteligent people can point me in the right direction of what is wrong without them?
    Reply With Quote  
     

  2. #2  
    Extreme Donator


    Join Date
    Mar 2009
    Age
    29
    Posts
    956
    Thanks given
    29
    Thanks received
    15
    Rep Power
    215
    Line 15 in Login.java

    I’m going to assume that the MySQL database is returning null because the username doesn’t exist. Then the NPE is thrown because you’re trying to read attributes from the returned null

    If you need more help you can post the method that’s throwing the exception
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Perplexity owner

    Join Date
    Feb 2011
    Posts
    171
    Thanks given
    32
    Thanks received
    15
    Rep Power
    0
    Quote Originally Posted by Note View Post
    Line 15 in Login.java

    I’m going to assume that the MySQL database is returning null because the username doesn’t exist. Then the NPE is thrown because you’re trying to read attributes from the returned null

    If you need more help you can post the method that’s throwing the exception
    Code:
    	public static void login() {
    		MySQLDatabase playersonline = MySQLController.getController().getDatabase(Database.RECOVERY);
    		if (!playersonline.active || playersonline.getConnection() == null) {
    			return;

    looking at that I presume I want to stop it trying to connect to a mysql database.... is that correct?
    Reply With Quote  
     

  5. #4  
    Registered Member Tom Ford's Avatar
    Join Date
    Aug 2018
    Posts
    18
    Thanks given
    0
    Thanks received
    5
    Rep Power
    11
    Quote Originally Posted by Perplexity View Post
    Code:
    	public static void login() {
    		MySQLDatabase playersonline = MySQLController.getController().getDatabase(Database.RECOVERY);
    		if (!playersonline.active || playersonline.getConnection() == null) {
    			return;

    looking at that I presume I want to stop it trying to connect to a mysql database.... is that correct?
    Do you want to stop from connecting to the MYSQL?

    If you do, then yes. Remove that. If you don't then consider fixing the connection. (Make sure the MYSQL details are correct).
    Attached image
    Reply With Quote  
     

  6. Thankful user:


  7. #5  
    Perplexity owner

    Join Date
    Feb 2011
    Posts
    171
    Thanks given
    32
    Thanks received
    15
    Rep Power
    0
    thanks I have now worked out how to fix this, thanks guys
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Error when logging in
    By TheeRash in forum Help
    Replies: 13
    Last Post: 08-17-2011, 08:17 AM
  2. Client error when logging in
    By Eesti10 in forum Help
    Replies: 1
    Last Post: 09-06-2010, 05:33 PM
  3. T2 error when logging in:
    By Jattio in forum Help
    Replies: 2
    Last Post: 01-28-2010, 12:25 AM
  4. Error when log in
    By SODIO in forum Help
    Replies: 1
    Last Post: 01-07-2010, 06:27 AM
  5. Error when logging in.
    By iZAjz in forum Help
    Replies: 0
    Last Post: 02-04-2009, 06:17 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •