When attempting to send some data to the server, the server responds with "Unexpected null or empty byte array!"
Here's the full stack trace:
Code: Select all
11:06:53,971 ERROR [1634888284@qtp-480934059-7] mortbay.log - /BlueBox/BlueBox.do
java.lang.IllegalArgumentException: Unexpected null or empty byte array!
at com.smartfoxserver.v2.protocol.SFSIoHandler.onDataRead(SFSIoHandler.java:80)
at com.smartfoxserver.v2.bluebox.BlueBox.doPost(BlueBox.java:144)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
at com.smartfoxserver.v2.bluebox.SessionFilter.doFilter(SessionFilter.java:141)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
The java code that causes this error is:
Code: Select all
SFSObject obj = new SFSObject();
obj.putInt("mh", 5);
obj.putInt("mw", 5);
obj.putInt("mt", 5);
obj.putInt("ms", 5);
obj.putInt("mi', 5);
SFSArray otherArray = new SFSArray();
for(int j = 0; j< 5; j++) {
SFSArray array = new SFSArray();
for(int i = 0; i < 5; i++) {
SFSObject tileObject = new SFSObject();
tileObject.putInt("ix", i);
tileObject.putInt("iy", j);
tileObject.putInt("bt", 1);
tileObject.putInt("mt", 2);
tileObject.putInt("ft", 3);
array.addSFSObject(tileObject);
}
otherArray.addSFSArray(array);
}
obj.putSFSArray("ts",otherArray);
sfsClient.send(new ExtensionRequest(Commands.SEND_SERVER_MAP, obj, sfsClient.getLastJoinedRoom()));
Oddly, if the following two lines are deleted, the server doesn't throw the exception:
Code: Select all
tileObject.putInt("mt", 2);
tileObject.putInt("ft", 3);
The connection is blue box enabled. Could this problem be associated with the C# issue previously reported?
Thanks,
-Eric