+ Reply to Thread
Results 1 to 3 of 3

Thread: CancelledKeyException for a plugin used to modify a quantity value

  1. #1
    Junior Member
    Join Date
    Apr 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CancelledKeyException for a plugin used to modify a quantity value

    would anyone happen to know what a cancelledKeyException refers to specifically? Perhaps any hints as to what they are about?

    I'm simulating a flood of calls to electroserver during a timed event. Below is the plugin script.
    Code:
    function pluginInit (hash)
    {
    	//trace ("the constant change plugin has been initialized");
    	constHolder = new Array ();
    	emptier = setInterval ("remEntries", 1000);
    	clickNums = 0;
    }
    function pluginRequest (hash)
    {
    	//trace("we are now inside of the pluginRequest for constChange");
    	var caller = hash.get ("ExecutingUserName");
    	var method = hash.get ("Method");
    	constHolder.push(hash.get("ExecutingUserName"));
    	//trace("a new value has been pushed into the constHolder array - it is: "+constHolder[constHolder.length-1]);
    }
    function remEntries (){
    	//trace("inside of remEntries");
    //	trace("constHolder.length is: "+constHolder.length);
    	clearInterval (emptier);
    	while (constHolder.length > 0){
    		
    		var sandman = constHolder.shift ();
    		increaseClickNums ();
    	}
    	emptier = setInterval ("remEntries", 1000);
    }
    function increaseClickNums(){
    	clickNums = clickNums+1;
    	var sessInf = new Object();
    	//trace("clickNums is: "+clickNums);
    	sessInf.clickNums = clickNums;
    	returnToUser(sessInf,"numUp","rando");
    	}
    function returnToUser (sessInf, retType, userNom)
    {
    	var variables = new Object ();
    	variables.clickNums = sessInf.clickNums;
    	server.sendMessage ("public",retType, variables);
    }
    and here is the error that I am recieving:

    org.mozilla.javascript.JavaScriptException: java.nio.channels.CancelledKeyExcept
    ion
    at org.mozilla.javascript.JavaScriptException.wrapExc eption(JavaScriptEx
    ception.java:70)
    at org.mozilla.javascript.NativeJavaMethod.call(Nativ eJavaMethod.java:26
    5)
    at org.mozilla.javascript.ScriptRuntime.call(ScriptRu ntime.java:1191)
    at org.mozilla.javascript.gen.c243.call(plugins/constChange.as:171)
    at org.mozilla.javascript.ScriptRuntime.call(ScriptRu ntime.java:1191)
    at org.mozilla.javascript.gen.c228.callDirect(plugins/constChange.as:76)

    at org.mozilla.javascript.gen.c227.callDirect(plugins/constChange.as:59)

    at org.mozilla.javascript.gen.c226.call(plugins/constChange.as:44)
    at com.electrotank.electroserver.plugins.ScriptPlugin .executeJavaScriptF
    unction(ScriptPlugin.java:286)
    at com.electrotank.electroserver.plugins.ScriptPlugin $FunctionRunner.run
    (ScriptPlugin.java:424)
    at java.util.TimerThread.mainLoop(Unknown Source)
    at java.util.TimerThread.run(Unknown Source)

  2. #2
    Electrotank
    Join Date
    Apr 2004
    Posts
    623
    Thanks
    0
    Thanked 5 Times in 5 Posts
    What OS are you using? Also, what version of ElectroServer? And which did you install? The tar file or RPM (or the windows installer if on Windows)? Thanks!

  3. #3
    Junior Member
    Join Date
    Apr 2006
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Good Day,

    Here is the information

    OS: Windows XP Professional
    Installer: windows installer
    Electroserver version: 3.7.2

    My appologies about the lack of title. Oversight on my part

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts