View Full Version : LoginEventHandler in ES 4.0.6 acts as a Server Level Plugin!!!!
ajjoraj
02-24-2009, 02:29 PM
LoginEventHandler displays as a Server Level Plugin in the web admin page when I deploy it in 4.0.6. However it works fine in 4.0.4.
I extended BaseLoginEventHandler and used the electroserver4.jar file of 4.0.6.
The server error log is as follows
ERROR com.electrotank.electroserver4.servers.registry.Re gistryServer - Error occured during init: Unable to create server plugin [Extension Name = LoginEventHandlerExt, Plugin Name=LoginEventHandler, Plugin Handle=LoginEventHandler, Error Message=Unable to find the 'LoginEventHandler' plugin!]
tcarr
02-24-2009, 06:42 PM
What does your Extension.xml look like (the EventHandlers section, not the Plugins section)? The only time I've seen a LoginEventHandler showing in the plugins is when it was placed in Plugins in Extension.xml instead of in EventHandlers.
ajjoraj
02-24-2009, 11:49 PM
This is how the Extension.xml looks like
<Extension>
<Name>LoginEventHandlerExt</Name>
<EventHandlers>
<LoginHandlers>
<LoginHandler>
LoginEventHandler
Java
LoginEventHandler</Path>
</LoginHandler>
</LoginHandlers>
</EventHandlers>
</Extension>
tcarr
02-24-2009, 11:51 PM
Are you sure that it's saying it's a Server Level PLUGIN on the web admin? And not a server level COMPONENT?
ajjoraj
02-25-2009, 11:59 AM
Yes. This is what it shows in the web admin page
Extension Name : LoginEventHandlerExt
Plugin Name : LoginEventHandler
Plugin Handle : LoginEventHandler
Plugin Type : Server Level Plugin
ajjoraj
02-25-2009, 03:58 PM
Any idea Teresa???
tcarr
02-25-2009, 06:50 PM
I'm stumped. Perhaps Mike Parks will have an idea.
ajjoraj
03-05-2009, 05:18 PM
Any help please????
MikeParks
03-05-2009, 09:47 PM
I'm looking into this right now. It sounds strange that it's not seeing it as a login event handler.
MikeParks
03-05-2009, 09:53 PM
Could you give me a directory listing of your extension? It sounds like the LoginEventHandler class isn't in the correct location for your package.
ajjoraj
03-06-2009, 12:01 PM
Electroserver installation folder -> Server -> Extensions - > LoginEventHandler ->
Inside this folder is a classes folder and the extension.xml file. The classes folder has the LoginEventHandler.class file.
The extension.xml has the following information
<Extension>
<Name>LoginEventHandler</Name>
<EventHandlers>
<LoginHandlers>
<LoginHandler>
LoginEventHandlerExample
Java
LoginEventHandler</Path>
</LoginHandler>
</LoginHandlers>
</EventHandlers>
</Extension>
And the LoginEventHandler.java file has the following code.
import com.electrotank.electroserver4.extensions.BaseLogi nEventHandler;
import com.electrotank.electroserver4.extensions.ChainAct ion;
import com.electrotank.electroserver4.extensions.LoginCon text;
import com.electrotank.electroserver4.extensions.api.valu e.EsObjectRO;
public class LoginEventHandler extends BaseLoginEventHandler
{
@Override
public void init(EsObjectRO parameters) {
// TODO Auto-generated method stub
System.out.println("Init called");
}
@Override
public ChainAction executeLogin(LoginContext context) {
// if no user name is specified, create one
if ("".equals(context.getUserName())) {
}
System.out.println("The execute login method is called");
return ChainAction.OkAndContinue;
}
}
MikeParks
03-06-2009, 10:29 PM
I've built a test case based on all that you provided me and still can't duplicate what you're seeing. Could I get you to zip the extension directory complete with extension.xml and email it to the address listed in my profile? I'll give it a shot on my end to see if I can duplicate it.
ajjoraj
03-07-2009, 12:16 PM
I have sent you the needed.
ajjoraj
03-07-2009, 12:32 PM
Hi Mike,
It works now. :confused:
I cleaned up the server folder and re-created everything afresh and it worked. Thanks a lot for your time.
Thanks.
MikeParks
03-07-2009, 01:44 PM
I'm glad it worked out for you. I had a feeling it would've been something silly like that. I just wanted to cut out any chance of it being a bigger issue before resorting to that. I wish you luck with it now that it's working.
Powered by vBulletin® Version 4.1.6 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.