I'm trying today for the first time to use the AMF in Red5 (usually our
app server is separate and we use OpenAMF). I have run into a problem
and searched through some red5 posts but can't see what's wrong.
When I try to invoke a method like:
import mx.remoting. *;
import mx.rpc. *;
connection = NetServices.createGatewayConnection
("http://address:5080/gateway");
someService = connection.getService("com.some.path.to.some.Class",
this);
someService.someMethod(value, value);
The Flash IDE output says:
Error opening URL "http://address:5080/gateway"
The server says:
[ERROR] 28123 btpool1-2:( AMFGatewayServlet.serviceAMF ) Error handling
remoting call
java.lang.NullPointerException
at
org.red5.server.net.servlet.AMFGatewayServlet.decodeRequest(AMFGatewayServlet.java:141)
at
org.red5.server.net.servlet.AMFGatewayServlet.serviceAMF(AMFGatewayServlet.java:115)
at
org.red5.server.net.servlet.AMFGatewayServlet.service(AMFGatewayServlet.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:627)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
If I comment out the call to the method, there error doesn't occur,
which tells me that the NetServices connection is actually working -
otherwise I wouldn't get anything in the server log - but maybe it's a
type translation problem.
Any ideas?
Thanks,
Bill
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org