i cant put my server returning the rank to my cliente
this is my code
class ccountHostedService
package server;
import org.slf4j.*;
import com.jme3.network.HostedConnection;
import com.jme3.network.MessageConnection;
import com.jme3.network.Server;
import com.jme3.network.service.AbstractHostedConnectionService;
import com.jme3.network.service.HostedServiceManager;
import com.jme3.network.service.rmi.RmiHostedService;
import com.jme3.network.service.rmi.RmiRegistry;
import connection.databaseconn;
import classes.Users;
import com.simsilica.event.EventBus;
import classes.types.UsersRank;
import server.AccountSession;
import server.AccountSessionListener;
public class AccountHostedService extends AbstractHostedConnectionService {
static Logger log = LoggerFactory.getLogger(AccountHostedService.class);
private static final String ATTRIBUTE_SESSION = "account.session";
private static final String ATTRIBUTE_PLAYER_NAME = "account.playerName";
private static final String ATTRIBUTE_PLAYER_PASSWORD = "account.password";
private static final String ATTRIBUTE_PLAYER__Ranks = "account.ranks";
private RmiHostedService rmiService;
private String serverInfo;
public AccountHostedService( String serverInfo ) {
this.serverInfo = serverInfo;
}
public static String getPlayerName( HostedConnection conn ) {
return conn.getAttribute(ATTRIBUTE_PLAYER_NAME);
}
public static String getPassword( HostedConnection conn ) {
return conn.getAttribute(ATTRIBUTE_PLAYER_PASSWORD);
}
public static UsersRank getRanks( HostedConnection conn ) {
return conn.getAttribute(ATTRIBUTE_PLAYER__Ranks);
}
@Override
protected void onInitialize( HostedServiceManager s ) {
// Grab the RMI service so we can easily use it later
this.rmiService = getService(RmiHostedService.class);
if( rmiService == null ) {
throw new RuntimeException("AccountHostedService requires an RMI service.");
}
}
@Override
public void startHostingOnConnection( HostedConnection conn ) {
log.debug("startHostingOnConnection(" + conn + ")");
AccountSessionImpl session = new AccountSessionImpl(conn);
conn.setAttribute(ATTRIBUTE_SESSION, session);
// Expose the session as an RMI resource to the client
RmiRegistry rmi = rmiService.getRmiRegistry(conn);
rmi.share(session, AccountSession.class);
}
@Override
public void stopHostingOnConnection( HostedConnection conn ) {
log.debug("stopHostingOnConnection(" + conn + ")");
String playerName = getPlayerName(conn);
String Password=getPassword(conn);
if( playerName != null ) {
log.debug("publishing playerLoggedOff event for:" + conn);
// Was really logged on before
EventBus.publish(AccountEvent.playerLoggedOff, new AccountEvent(conn, playerName, Password));
}
}
/**
* The connection-specific 'host' for the AccountSession.
*/
private class AccountSessionImpl implements AccountSession {
private HostedConnection conn;
private AccountSessionListener callback;
public AccountSessionImpl( HostedConnection conn ) {
this.conn = conn;
// Note: at this point we won't be able to look up the callback
// because we haven't received the client's RMI shared objects yet.
}
protected AccountSessionListener getCallback() {
if( callback == null ) {
RmiRegistry rmi = rmiService.getRmiRegistry(conn);
callback = rmi.getRemoteObject(AccountSessionListener.class);
if( callback == null ) {
throw new RuntimeException("Unable to locate client callback for AccountSessionListener");
}
}
return callback;
}
@Override
public String getServerInfo() {
return serverInfo;
}
@Override
public boolean login( String playerName,String password ) {
try{
databaseconn dao = new databaseconn();
dao.testconn();
log.info("login(" + playerName + ")");
conn.setAttribute(ATTRIBUTE_PLAYER_NAME, playerName);
conn.setAttribute(ATTRIBUTE_PLAYER_PASSWORD,password);
Users ola = new Users();
if(ola.retrievelogin(playerName, password))
{
// System.err.println("DEu");
getCallback().notifyLoginStatus(true);
log.debug("publishing playerLoggedOn event for:" + conn);
// Notify 'logged in' only after we've told the player themselves
EventBus.publish(AccountEvent.playerLoggedOn, new AccountEvent(conn, playerName,password));
return true;
}else{
// System.out.println("ERRO");
return false;
}
}catch(Exception ex){
System.out.println(ex);
}
// And let them know they were successful
return false;
}
@Override
public UsersRank Rank(String playerName) {
try{
databaseconn dao = new databaseconn();
dao.testconn();
Users ola = new Users();
log.info("login(" + playerName + ")");
if(ola.nivelacesso(playerName)==UsersRank.admin)
{
conn.setAttribute(ATTRIBUTE_PLAYER_NAME, playerName);
conn.setAttribute(ATTRIBUTE_PLAYER__Ranks,"");
// System.err.println("DEu");
getCallback().notifyLoginStatus(true);
log.debug("publishing playerLoggedOn event for:" + conn);
// Notify 'logged in' only after we've told the player themselves
EventBus.publish(AccountEvent.playerNivel, new AccountEvent(conn, playerName,ATTRIBUTE_PLAYER__Ranks));
return UsersRank.admin;
}else{
// System.out.println("ERRO");
return UsersRank.player;
}
}catch(Exception ex){
System.out.println(ex);
}
// And let them know they were successful
return UsersRank.Error; //To change body of generated methods, choose Tools | Templates.
}
}
}
package mygame.net.client;
import classes.types.UsersRank;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import org.slf4j.*;
import com.jme3.network.service.AbstractClientService;
import com.jme3.network.service.ClientServiceManager;
import com.jme3.network.service.rmi.RmiClientService;
import server.AccountSession;
import server.AccountSessionListener;
public class AccountClientService extends AbstractClientService
implements AccountSession {
static Logger log = LoggerFactory.getLogger(AccountClientService.class);
private RmiClientService rmiService;
private AccountSession delegate;
private String playerName;
private String password;
private AccountSessionCallback sessionCallback = new AccountSessionCallback();
private List<AccountSessionListener> listeners = new CopyOnWriteArrayList<>();
public AccountClientService() {
}
@Override
public String getServerInfo() {
return delegate.getServerInfo();
}
@Override
public boolean login( String playerName,String password ) {
this.playerName = playerName;
this.password= password;
return delegate.login(playerName,password);
}
public void addAccountSessionListener( AccountSessionListener l ) {
listeners.add(l);
}
public void removeAccountSessionListener( AccountSessionListener l ) {
listeners.remove(l);
}
@Override
protected void onInitialize( ClientServiceManager s ) {
log.debug("onInitialize(" + s + ")");
this.rmiService = getService(RmiClientService.class);
if( rmiService == null ) {
throw new RuntimeException("AccountClientService requires RMI service");
}
log.debug("Sharing session callback.");
rmiService.share(sessionCallback, AccountSessionListener.class);
}
/**
* Called during connection setup once the server-side services have been initialized
* for this connection and any shared objects, etc. should be available.
*/
@Override
public void start() {
log.debug("start()");
super.start();
this.delegate = rmiService.getRemoteObject(AccountSession.class);
log.debug("delegate:" + delegate);
if( delegate == null ) {
throw new RuntimeException("No account session found during connection setup");
}
}
@Override
public UsersRank Rank(String playerName) {
this.playerName = playerName;
return delegate.Rank(playerName); //To change body of generated methods, choose Tools | Templates.
}
/**
* Shared with the server over RMI so that it can notify us about account
* related stuff.
*/
private class AccountSessionCallback implements AccountSessionListener {
@Override
public void notifyLoginStatus( boolean loggedIn ) {
log.trace("notifyLoginStatus(" + loggedIn + ")");
for( AccountSessionListener l : listeners ) {
l.notifyLoginStatus(loggedIn);
}
}
}
}
package server;
import classes.types.UsersRank;
import com.jme3.network.service.rmi.Asynchronous;
public String getServerInfo();
@Asynchronous
public boolean login( String playerName,String Password);
public UsersRank Rank(String playerName);
}
public boolean joinserver(String userName, String password) {
log.info("join(" + userName + ")");
if (userName != null || password != null) {
userName = userName.trim();
password = password.trim();
}
if (Strings.isNullOrEmpty(userName) || Strings.isNullOrEmpty(password)) {
showError("Join Error", "Please specify a Username ou Password", null, false);
return false;
}
if(client.getService(AccountClientService.class).login(userName,password)){
if(client.getService(AccountClientService.class).Rank(userName)==UsersRank.admin){// this is where the problem
onLoggedOn1();
// javax.swing.JOptionPane.showMessageDialog(null,"DEU", "DEU", javax.swing.JOptionPane.INFORMATION_MESSAGE);
return true;
}else
return false;
}
else{
// javax.swing.JOptionPane.showMessageDialog(null,"Nao Deu", " NAO DEU", javax.swing.JOptionPane.INFORMATION_MESSAGE);
return false;
}
}
when i try make the login give this error
Setting root JUL log level to:INFO
logger config:root
Setting JUL Log: level to:INFO
logger config:mygame
Setting JUL Log:mygame level to:FINE
logger config:com.simsilica.sim
Setting JUL Log:com.simsilica.sim level to:FINER
logger config:com.simsilica.lemur.CallMethodAction
Setting JUL Log:com.simsilica.lemur.CallMethodAction level to:FINER
16:41:37,874 INFO [JmeSystem] Running on jMonkeyEngine 3.1-stable
* Branch: HEAD
* Git Hash: af04bf9
* Build Date: 2017-02-19
16:41:38,697 INFO [LwjglContext] LWJGL 2.9.3 context running on thread jME3 Main
* Graphics Adapter: null
* Driver Version: null
* Scaling Factor: 1
16:41:38,713 INFO [GLRenderer] OpenGL Renderer Information
* Vendor: NVIDIA Corporation
* Renderer: GeForce GT 640/PCIe/SSE2
* OpenGL Version: 4.5.0 NVIDIA 378.78
* GLSL Version: 4.50 NVIDIA
* Profile: Compatibility
16:41:38,738 WARN [AssetConfig] Cannot find loader com.jme3.scene.plugins.blender.BlenderModelLoader
16:41:38,787 INFO [ALAudioRenderer] Audio Renderer Information
* Device: OpenAL Soft
* Vendor: OpenAL Community
* Renderer: OpenAL Soft
* Version: 1.1 ALSOFT 1.15.1
* Supported channels: 64
* ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_loopback
* AL extensions: AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFTX_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_source_latency
16:41:38,787 WARN [ALAudioRenderer] Pausing audio device not supported.
16:41:38,787 INFO [ALAudioRenderer] Audio effect extension version: 1.0
16:41:38,788 INFO [ALAudioRenderer] Audio max auxiliary sends: 4
16:41:38,897 INFO [GuiGlobals] Initializing GuiGlobals with:com.simsilica.lemur.GuiGlobals@1827996d
16:41:38,911 INFO [GuiGlobals] Lemur build date:20170212
16:41:38,912 INFO [BaseStyles] loadStyleResource(com/simsilica/lemur/style/base/glass-styles.groovy)
16:41:39,240 INFO [BaseStyles] Loading base resource:jar:file:/C:/Users/Pedro/Dropbox/Java/lemur-1.10.1.jar!/com/simsilica/lemur/style/base/glass-styles.groovy
16:41:39,677 INFO [BaseStyles] Loading extension resources for:com/simsilica/lemur/style/base/glass-styles.groovy
16:41:39,678 INFO [BaseStyles] Loading extension resource:jar:file:/C:/Users/Pedro/Dropbox/Java/lemur-proto-1.9.1.jar!/com/simsilica/lemur/style/base/glass-styles.groovy
16:41:39,858 WARN [Material] The material parameter is not defined: WardIso. Ignoring..
16:41:39,858 WARN [Material] The material parameter is not defined: Minnaert. Ignoring..
16:41:39,870 WARN [Material] The material parameter is not defined: WardIso. Ignoring..
16:41:39,871 WARN [Material] The material parameter is not defined: Minnaert. Ignoring..
16:41:39,883 WARN [Material] The material parameter is not defined: WardIso. Ignoring..
16:41:39,884 WARN [Material] The material parameter is not defined: Minnaert. Ignoring..
16:41:39,896 WARN [Material] The material parameter is not defined: WardIso. Ignoring..
16:41:39,896 WARN [Material] The material parameter is not defined: Minnaert. Ignoring..
16:41:39,897 WARN [Material] The material parameter is not defined: WardIso. Ignoring..
16:41:39,897 WARN [Material] The material parameter is not defined: Minnaert. Ignoring..
16:41:39,935 TRACE [CallMethodAction] Finding method:connect on:class mygame.MainMenuState
16:41:39,935 TRACE [CallMethodAction] Checking method:protected void mygame.MainMenuState.connect()
16:41:39,936 TRACE [CallMethodAction] isValidArgumentList([])
16:41:39,936 TRACE [CallMethodAction] Found:protected void mygame.MainMenuState.connect()
16:41:39,938 TRACE [CallMethodAction] Finding method:options on:class mygame.MainMenuState
16:41:39,938 TRACE [CallMethodAction] Checking method:protected void mygame.MainMenuState.connect()
16:41:39,938 TRACE [CallMethodAction] Checking method:protected int mygame.MainMenuState.parseInt(java.lang.String,java.lang.String)
16:41:39,938 TRACE [CallMethodAction] Checking method:protected void mygame.MainMenuState.initialize(com.jme3.app.Application)
16:41:39,938 TRACE [CallMethodAction] Checking method:protected void mygame.MainMenuState.cleanup(com.jme3.app.Application)
16:41:39,939 TRACE [CallMethodAction] Checking method:protected void mygame.MainMenuState.options()
16:41:39,939 TRACE [CallMethodAction] isValidArgumentList([])
16:41:39,940 TRACE [CallMethodAction] Found:protected void mygame.MainMenuState.options()
16:41:39,940 TRACE [CallMethodAction] Finding method:exitGame on:class mygame.MainMenuState
16:41:39,940 TRACE [CallMethodAction] Checking method:protected void mygame.MainMenuState.connect()
16:41:39,941 TRACE [CallMethodAction] Checking method:protected int mygame.MainMenuState.parseInt(java.lang.String,java.lang.String)
16:41:39,941 TRACE [CallMethodAction] Checking method:protected void mygame.MainMenuState.initialize(com.jme3.app.Application)
16:41:39,941 TRACE [CallMethodAction] Checking method:protected void mygame.MainMenuState.cleanup(com.jme3.app.Application)
16:41:39,941 TRACE [CallMethodAction] Checking method:protected void mygame.MainMenuState.options()
16:41:39,941 TRACE [CallMethodAction] Checking method:protected void mygame.MainMenuState.showError(java.lang.String,java.lang.String)
16:41:39,941 TRACE [CallMethodAction] Checking method:protected void mygame.MainMenuState.onDisable()
16:41:39,941 TRACE [CallMethodAction] Checking method:protected void mygame.MainMenuState.onEnable()
16:41:39,941 TRACE [CallMethodAction] Checking method:public float mygame.MainMenuState.getStandardScale()
16:41:39,941 TRACE [CallMethodAction] Checking method:protected void mygame.MainMenuState.ola()
16:41:39,941 TRACE [CallMethodAction] Checking method:protected void mygame.MainMenuState.exitGame()
16:41:39,941 TRACE [CallMethodAction] isValidArgumentList([])
16:41:39,941 TRACE [CallMethodAction] Found:protected void mygame.MainMenuState.exitGame()
16:41:41,632 INFO [ConnectionState] Creating game client for:127.0.0.1 4269
16:41:41,633 INFO [GameClient] Connecting to:127.0.0.1 4269
16:41:41,663 INFO [GameClient] Adding services...
16:41:41,676 DEBUG [AccountClientService] onInitialize(com.jme3.network.service.ClientServiceManager[services=[com.jme3.network.service.serializer.ClientSerializerRegistrationsService[serviceManager.class=class com.jme3.network.service.ClientServiceManager], com.jme3.network.service.rpc.RpcClientService[serviceManager.class=class com.jme3.network.service.ClientServiceManager], com.jme3.network.service.rmi.RmiClientService[serviceManager.class=class com.jme3.network.service.ClientServiceManager], mygame.net.client.AccountClientService[serviceManager.class=class com.jme3.network.service.ClientServiceManager]]])
16:41:41,676 DEBUG [AccountClientService] Sharing session callback.
16:41:41,677 INFO [ConnectionState] Connection established:mygame.net.client.GameClient@6d3612e1
16:41:41,679 INFO [ConnectionState] Starting client...
16:41:41,679 INFO [GameClient] start()
16:41:41,682 INFO [ConnectionState] Connection established:mygame.net.client.GameClient@6d3612e1
16:41:41,683 INFO [ConnectionState] Client started.
16:41:41,693 INFO [SerializerRegistrationsMessage] Registering:Registration[-19 = com.jme3.math.Vector3f, serializer=com.jme3.network.serializing.serializers.Vector3Serializer]
16:41:41,693 INFO [SerializerRegistrationsMessage] Registering:Registration[-41 = com.jme3.network.serializing.serializers.FieldSerializer, serializer=null]
16:41:41,694 INFO [SerializerRegistrationsMessage] Registering:Registration[-43 = [I, serializer=com.jme3.network.serializing.serializers.ArraySerializer]
16:41:41,694 INFO [SerializerRegistrationsMessage] Registering:Registration[-46 = [Lcom.jme3.network.message.SerializerRegistrationsMessage$Registration;, serializer=com.jme3.network.serializing.serializers.ArraySerializer]
16:41:41,694 INFO [SerializerRegistrationsMessage] Registering:Registration[-49 = [Ljava.lang.Object;, serializer=com.jme3.network.serializing.serializers.ArraySerializer]
16:41:41,694 INFO [SerializerRegistrationsMessage] Registering:Registration[-48 = com.jme3.network.service.rpc.msg.RpcCallMessage, serializer=null]
16:41:41,694 INFO [SerializerRegistrationsMessage] Registering:Registration[-50 = com.jme3.network.service.rpc.msg.RpcResponseMessage, serializer=null]
16:41:41,695 INFO [SerializerRegistrationsMessage] Registering:Registration[-51 = com.jme3.network.service.rmi.ClassInfo, serializer=null]
16:41:41,696 INFO [SerializerRegistrationsMessage] Registering:Registration[-52 = com.jme3.network.service.rmi.MethodInfo, serializer=null]
16:41:41,729 DEBUG [AccountClientService] start()
16:41:41,729 DEBUG [AccountClientService] delegate:RemoteObject[#1, server.AccountSession]
16:41:41,729 INFO [ConnectionState] clientConnected(com.jme3.network.base.DefaultClient@106030e1)
16:41:41,744 INFO [ConnectionState] onConnected()
16:41:41,765 TRACE [CallMethodAction] Finding method:join on:class mygame.LoginState
16:41:41,765 TRACE [CallMethodAction] Checking method:protected void mygame.LoginState.join()
16:41:41,765 TRACE [CallMethodAction] isValidArgumentList([])
16:41:41,765 TRACE [CallMethodAction] Found:protected void mygame.LoginState.join()
16:41:41,766 TRACE [CallMethodAction] Finding method:join on:class mygame.LoginState
16:41:41,767 TRACE [CallMethodAction] Checking method:protected void mygame.LoginState.join()
16:41:41,767 TRACE [CallMethodAction] isValidArgumentList([])
16:41:41,767 TRACE [CallMethodAction] Found:protected void mygame.LoginState.join()
16:41:41,767 TRACE [CallMethodAction] Finding method:cancel on:class mygame.LoginState
16:41:41,767 TRACE [CallMethodAction] Checking method:protected void mygame.LoginState.join()
16:41:41,767 TRACE [CallMethodAction] Checking method:protected void mygame.LoginState.initialize(com.jme3.app.Application)
16:41:41,767 TRACE [CallMethodAction] Checking method:protected void mygame.LoginState.cleanup(com.jme3.app.Application)
16:41:41,767 TRACE [CallMethodAction] Checking method:protected void mygame.LoginState.cancel()
16:41:41,767 TRACE [CallMethodAction] isValidArgumentList([])
16:41:41,767 TRACE [CallMethodAction] Found:protected void mygame.LoginState.cancel()
16:41:47,267 INFO [ConnectionState] join(admin)
16:41:47,527 ERROR [LegacyApplication] Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.RuntimeException: Error invoking action method:join
at com.simsilica.lemur.CallMethodAction.execute(CallMethodAction.java:208) ~[lemur-proto-1.9.1.jar:?]
at com.simsilica.lemur.ActionButton$ClickCommand.execute(ActionButton.java:132) ~[lemur-proto-1.9.1.jar:?]
at com.simsilica.lemur.ActionButton$ClickCommand.execute(ActionButton.java:127) ~[lemur-proto-1.9.1.jar:?]
at com.simsilica.lemur.core.CommandMap.runCommands(CommandMap.java:61) ~[lemur-1.10.1.jar:?]
at com.simsilica.lemur.Button.runClick(Button.java:333) ~[lemur-1.10.1.jar:?]
at com.simsilica.lemur.Button$ButtonMouseHandler.mouseButtonEvent(Button.java:410) ~[lemur-1.10.1.jar:?]
at com.simsilica.lemur.event.MouseEventControl.mouseButtonEvent(MouseEventControl.java:122) ~[lemur-1.10.1.jar:?]
at com.simsilica.lemur.event.PickEventSession.buttonEvent(PickEventSession.java:624) ~[lemur-1.10.1.jar:?]
at com.simsilica.lemur.event.MouseAppState.dispatch(MouseAppState.java:98) ~[lemur-1.10.1.jar:?]
at com.simsilica.lemur.event.MouseAppState$MouseObserver.onMouseButtonEvent(MouseAppState.java:114) ~[lemur-1.10.1.jar:?]
at com.jme3.input.InputManager.processQueue(InputManager.java:831) ~[jme3-core-3.1.0-stable.jar:3.1-stable]
at com.jme3.input.InputManager.update(InputManager.java:907) ~[jme3-core-3.1.0-stable.jar:3.1-stable]
at com.jme3.app.LegacyApplication.update(LegacyApplication.java:725) ~[jme3-core-3.1.0-stable.jar:3.1-stable]
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:227) ~[jme3-core-3.1.0-stable.jar:3.1-stable]
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151) ~[jme3-lwjgl-3.1.0-stable.jar:3.1-stable]
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:193) ~[jme3-lwjgl-3.1.0-stable.jar:3.1-stable]
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:232) ~[jme3-lwjgl-3.1.0-stable.jar:3.1-stable]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
at com.simsilica.lemur.CallMethodAction.execute(CallMethodAction.java:195) ~[lemur-proto-1.9.1.jar:?]
... 17 more
Caused by: java.lang.RuntimeException: Error calling remote procedure:RpcCallMessage[#1, channel=-2, sync, objId=1, procId=0, args.length=1]
java.lang.RuntimeException: Error serializing message
at com.jme3.network.base.MessageProtocol.messageToBuffer(MessageProtocol.java:81)
at com.jme3.network.base.DefaultServer$Connection.send(DefaultServer.java:582)
at com.jme3.network.service.rpc.RpcConnection.send(RpcConnection.java:175)
at com.jme3.network.service.rpc.RpcConnection.handleMessage(RpcConnection.java:195)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.jme3.network.util.AbstractMessageDelegator.messageReceived(AbstractMessageDelegator.java:304)
at com.jme3.network.util.AbstractMessageDelegator.messageReceived(AbstractMessageDelegator.java:57)
at com.jme3.network.base.MessageListenerRegistry.messageReceived(MessageListenerRegistry.java:81)
at com.jme3.network.base.DefaultServer.dispatch(DefaultServer.java:341)
at com.jme3.network.base.DefaultServer$Redispatch.messageReceived(DefaultServer.java:674)
at com.jme3.network.base.DefaultServer$Redispatch.messageReceived(DefaultServer.java:669)
at com.jme3.network.base.KernelAdapter.dispatch(KernelAdapter.java:187)
at com.jme3.network.base.KernelAdapter.createAndDispatch(KernelAdapter.java:241)
at com.jme3.network.base.KernelAdapter.run(KernelAdapter.java:284)
Caused by: com.jme3.network.serializing.SerializerException: Error writing object for field:private java.lang.Object com.jme3.network.service.rpc.msg.RpcResponseMessage.result
at com.jme3.network.serializing.serializers.FieldSerializer.writeObject(FieldSerializer.java:209)
at com.jme3.network.serializing.Serializer.writeClassAndObject(Serializer.java:458)
at com.jme3.network.base.MessageProtocol.messageToBuffer(MessageProtocol.java:73)
... 16 more
Caused by: java.lang.IllegalArgumentException: Class has not been registered:class classes.types.UsersRank but resolved to generic serializer for:class java.lang.Enum
at com.jme3.network.serializing.Serializer.writeClassAndObject(Serializer.java:455)
at com.jme3.network.serializing.serializers.FieldSerializer.writeObject(FieldSerializer.java:204)
... 18 more
at com.jme3.network.service.rpc.RpcConnection$ResponseHolder.getResponse(RpcConnection.java:253) ~[jme3-networking-3.1.0-stable.jar:3.1-stable]
at com.jme3.network.service.rpc.RpcConnection.callAndWait(RpcConnection.java:130) ~[jme3-networking-3.1.0-stable.jar:3.1-stable]
at com.jme3.network.service.rmi.RmiRegistry.invokeRemote(RmiRegistry.java:284) ~[jme3-networking-3.1.0-stable.jar:3.1-stable]
at com.jme3.network.service.rmi.RemoteObjectHandler.invoke(RemoteObjectHandler.java:80) ~[jme3-networking-3.1.0-stable.jar:3.1-stable]
at com.sun.proxy.$Proxy24.Rank(Unknown Source) ~[?:?]
at mygame.net.client.AccountClientService.Rank(AccountClientService.java:101) ~[classes/:?]
at mygame.ConnectionState.joinserver(ConnectionState.java:80) ~[classes/:?]
at mygame.LoginState.join(LoginState.java:29) ~[classes/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
at com.simsilica.lemur.CallMethodAction.execute(CallMethodAction.java:195) ~[lemur-proto-1.9.1.jar:?]
... 17 more
16:41:47,569 INFO [GameClient] close()
16:41:47,571 INFO [ConnectionState] clientDisconnected(com.jme3.network.base.DefaultClient@106030e1, null)
BUILD SUCCESSFUL (total time: 13 seconds)