+ Reply to Thread
Results 1 to 5 of 5

Thread: sending a pluginRequest produces weird Errors...

  1. #1
    Junior Member
    Join Date
    Aug 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    sending a pluginRequest produces weird Errors...

    Hi there

    I used the code-snippet from this forum to have a room-level plugin call aserver-level plugin.
    I'm using ES 3.5 on Mac OS X 10.3.4 with Java VM 1.4.2_03

    Well, my plugins work just fine - SOMETIMES...

    But very often I get errors from the server like this:

    2004/08/02 17:50:54.730 SEVERE [10] (ExecutePluginTransaction.execute): Trouble with ExecutePluginTransaction: JavaScriptException occured while calling pluginRequest: java.lang.NullPointerException
    com.electrotank.electroserver.plugins.PluginExcept ion: JavaScriptException occured while calling pluginRequest: java.lang.NullPointerException
    com.electrotank.electroserver.plugins.ScriptPlugin .pluginRequest(ScriptPlugin.java:193)
    com.electrotank.electroserver.transactions.Execute PluginTransaction.execute(ExecutePluginTransaction .java:54)
    com.electrotank.electroserver.transactions.Transac tionHandler.handleTransaction(TransactionHandler.j ava:94)
    com.electrotank.electroserver.ChatProtocol.process Message(ChatProtocol.java:235)
    org.ronsoft.protoplex.generic.AbstractGenericServe r.drainQueuedMessages(AbstractGenericServer.java:1 44)
    org.ronsoft.protoplex.nioimpl.server.NioServer.dra inQueuedMessages(NioServer.java:471)
    org.ronsoft.protoplex.nioimpl.server.NioConnection .handleReadySelection(NioConnection.java:177)
    org.ronsoft.protoplex.nioimpl.server.Dispatcher$Ha ndlerAdapter.run(Dispatcher.java:448)
    EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Wo rker.run(Unknown Source)
    java.lang.Thread.run(Thread.java:552)


    Both my plugins have a pluginRequest handler specified but the one in the room-level plugin has only a trace command (with double quotes!) in it, since it is only used to track when a user exits the application while in a room...

    My Flash movie calls the server-level plugin and as I said: SOMETIMES everything works smoothly but on other times I get this error and afterwards the servers goes off-track, I have to restart it then... I have absolutely no clue in which cases it fails, the same code sometimes works, often it doesn't...


    Thanks for any hints
    (this is quite Urgent, I'm working on a project for Beat Zimmerli who recently registered the Server...)

    Michael

  2. #2
    Junior Member
    Join Date
    Aug 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, sometimes it works for half an hour, I can enter and exit with several clients wildly, and everything is just fine. On other times I get the Errors right away... e.g. it seems that when all clients are exited and one of them reconnects, ist starts right away.

    Here is the other typical error I'm getting:

    2004/08/02 19:46:39.091 SEVERE [10] (Places.leave): [Room=chat, User=hamburg] JavaScriptException occured while calling pluginUserExit: com.electrotank.electroserver.plugins.PluginExcept ion: JavaScriptException occured while calling pluginUserEnter: java.lang.NullPointerException
    com.electrotank.electroserver.plugins.PluginExcept ion: [Room=chat, User=hamburg] JavaScriptException occured while calling pluginUserExit: com.electrotank.electroserver.plugins.PluginExcept ion: JavaScriptException occured while calling pluginUserEnter: java.lang.NullPointerException
    com.electrotank.electroserver.plugins.ScriptPlugin .pluginUserExit(ScriptPlugin.java:267)
    com.electrotank.electroserver.plugins.utilities.Ru nPluginHelper.runUserExit(RunPluginHelper.java:36)
    com.electrotank.electroserver.entities.Room.plugin UserExit(Room.java:375)
    com.electrotank.electroserver.entities.Room.remove User(Room.java:107)
    com.electrotank.electroserver.entities.Places.leav eRoom(Places.java:216)
    com.electrotank.electroserver.entities.Places.leav e(Places.java:186)
    com.electrotank.electroserver.ChatProtocol.cleanup Connection(ChatProtocol.java:212)
    com.electrotank.electroserver.ChatProtocol.connect ionStopping(ChatProtocol.java:196)
    org.ronsoft.protoplex.generic.AbstractGenericServe r.doDisconnect(AbstractGenericServer.java:212)
    org.ronsoft.protoplex.generic.AbstractGenericServe r.disconnect(AbstractGenericServer.java:199)
    org.ronsoft.protoplex.nioimpl.server.NioConnection .readInput(NioConnection.java:231)
    org.ronsoft.protoplex.nioimpl.server.NioConnection .handleReadySelection(NioConnection.java:175)
    org.ronsoft.protoplex.nioimpl.server.Dispatcher$Ha ndlerAdapter.run(Dispatcher.java:448)
    EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Wo rker.run(Unknown Source)
    java.lang.Thread.run(Thread.java:552)

  3. #3
    Electrotank jobem's Avatar
    Join Date
    Apr 2004
    Posts
    996
    Thanks
    0
    Thanked 24 Times in 17 Posts
    Hi,

    Can we see some of the code that you are using? Paste in the pluginUserEnter/Exit functions if you would, thanks!
    ------
    Jobe Makar
    @jobemakar
    http://www.electrotank.com

    YouTube ElectroServer video tutorials
    http://www.youtube.com/user/ElectrotankInc

  4. #4
    Junior Member
    Join Date
    Aug 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Jobe

    Thanks for asking for my plugin-code but it seems the problem is solved, I was actually just comming back to note that...

    Late at night I found that the problem rises when the server-level plugin sends a message to a user of which it stored the user-name before but which is not acctually logged in anymore.
    The annoying and confusing thing was that it works seemlessly often but now and then it makes these nasty errors. Also, sending a public message to all users did not work for me, that's why I send the user-room information to all individual users separately and with an explicit user name...

    I now do the entire management of who is in which room (for what I need the plugins actually, to see who is in the other rooms) via the room-level plugins, avoiding to send messages to users who are not registered to any room.
    I set their state-variable reflecting the current room they're in to "none" when they exit a room and set it up to the room name when they enter a room...

    This helped me streamline the code in the client quite a bit...

    btw: we are using ElectroServer for an installation with terminals in about 10 museums europe-wide, a pretty complex project in about 7 languages. ElectroServer works great (besides yesterday). However, the documentation could be more complete/precise in certain points but I know you're working on it...

    Cheers, MV

  5. #5
    Electrotank jobem's Avatar
    Join Date
    Apr 2004
    Posts
    996
    Thanks
    0
    Thanked 24 Times in 17 Posts
    Sweet! I'd love to hear more about what you guys are doing so that we can include it in our "what people are doing with ElectroServer" stories. It would be great if you could fill me in a little either here or via email.
    ------
    Jobe Makar
    @jobemakar
    http://www.electrotank.com

    YouTube ElectroServer video tutorials
    http://www.youtube.com/user/ElectrotankInc

+ 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