Could not create a validated object.

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

Post Reply
CTucker1327
Posts: 8
Joined: 23 Oct 2013, 01:30

Could not create a validated object.

Post by CTucker1327 »

I'm following this tutorial series on Smart-Fox and it's getting to the point where it's going on about SQL Login using the JDBC, which I completely understand, I've been using JDBC in my java applications for as-long as I can remember, however, I'm getting some errors that I have never seen before. I know that the connection the the Database is good, because like my last problem, I wrote my own code to verify that it was working correctly. I'm actually starting to debate writing my own server instead of using SmartFox, although that's going to take a very long time and have it's own issues. Here's my error.

Image


Here's the code provided by the tutorial, I don't quite understand it because I haven't looked at the back-stage programming, although if it worked on his videos, i don't see why it shouldn't work for me.

Code: Select all

package LoginExt;

import com.smartfoxserver.v2.components.login.LoginAssistantComponent;
import com.smartfoxserver.v2.extensions.SFSExtension;

/**
 *
 * @author Christian
 */
public class ZoneExtension extends SFSExtension  {

    private LoginAssistantComponent _loginAssistant;
    
    @Override
    public void init() {
        _loginAssistant = new LoginAssistantComponent(this);
        _loginAssistant.getConfig().loginTable = "accounts";
        _loginAssistant.getConfig().userNameField = "UserName";
        _loginAssistant.getConfig().passwordField = "PassWord";
    }
    
    @Override
    public void destroy() {
        super.destroy();
    }
}

I have the database set up with the table 'accounts' using "UserName" and "PassWord" <--- Just like that, case matching and everything, so I'm not sure what the problem is.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Could not create a validated object.

Post by Lapo »

Make sure you have specified a valid SQL expression for the "Test SQL statement" in the DB configuration.
It is required to validate connections from the DB connection pool.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply