You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Brian Dobby <bd...@nobilis.com> on 2002/06/21 13:31:07 UTC
NullPointerException on server close
Hi, I'm just trying xmlrpc for the first time. I'm impressed with its
ease of use, but I do have one problem with it; I always get a null
pointer exception reported when the WebServer closes, and this doesn't
look good in a production system.
I create the WebServer like this:
myserver = new WebServer(m_apiPort);
myserver.addHandler("MyRPC", myClass);
myserver.start();
I stop it like this:
myserver.removeHandler("MyRPC");
myserver.shutdown();
I get this at the console:
Closing XML-RPC server socket.
Exception in XML-RPC listener loop (java.net.SocketException: Socket
closed).
Closing XML-RPC server socket.
Hit uncaught exception java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.xmlrpc.WebServer.run(WebServer.java)
at java.lang.Thread.run(Thread.java:484)
This happens whether or not I actually run a client. I'm running with
JDK 1.3 under Windows 2000 Server. Does anyone know what I'm doing
wrong?
TIA
Brian
Re: NullPointerException on server close
Posted by Jason van Zyl <ja...@zenplex.com>.
On Fri, 2002-06-21 at 07:31, Brian Dobby wrote:
> Hi, I'm just trying xmlrpc for the first time. I'm impressed with its
> ease of use, but I do have one problem with it; I always get a null
> pointer exception reported when the WebServer closes, and this doesn't
> look good in a production system.
>
> I create the WebServer like this:
> myserver = new WebServer(m_apiPort);
> myserver.addHandler("MyRPC", myClass);
> myserver.start();
>
> I stop it like this:
> myserver.removeHandler("MyRPC");
> myserver.shutdown();
Try just doing the myserver.shutdown() and don't remove the handlers.
I'm taking a peek now at what's going on.
> I get this at the console:
> Closing XML-RPC server socket.
> Exception in XML-RPC listener loop (java.net.SocketException: Socket
> closed).
> Closing XML-RPC server socket.
> Hit uncaught exception java.lang.NullPointerException
> java.lang.NullPointerException
> at org.apache.xmlrpc.WebServer.run(WebServer.java)
> at java.lang.Thread.run(Thread.java:484)
>
> This happens whether or not I actually run a client. I'm running with
> JDK 1.3 under Windows 2000 Server. Does anyone know what I'm doing
> wrong?
>
> TIA
> Brian
>
--
jvz.
Jason van Zyl
jason@apache.org
http://tambora.zenplex.org
In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
-- Jacques Ellul, The Technological Society
Re: NullPointerException on server close
Posted by Jason van Zyl <ja...@zenplex.com>.
On Fri, 2002-06-21 at 07:31, Brian Dobby wrote:
> Hi, I'm just trying xmlrpc for the first time. I'm impressed with its
> ease of use, but I do have one problem with it; I always get a null
> pointer exception reported when the WebServer closes, and this doesn't
> look good in a production system.
>
> I create the WebServer like this:
> myserver = new WebServer(m_apiPort);
> myserver.addHandler("MyRPC", myClass);
> myserver.start();
>
> I stop it like this:
> myserver.removeHandler("MyRPC");
> myserver.shutdown();
Try just doing the myserver.shutdown() and don't remove the handlers.
I'm taking a peek now at what's going on.
> I get this at the console:
> Closing XML-RPC server socket.
> Exception in XML-RPC listener loop (java.net.SocketException: Socket
> closed).
> Closing XML-RPC server socket.
> Hit uncaught exception java.lang.NullPointerException
> java.lang.NullPointerException
> at org.apache.xmlrpc.WebServer.run(WebServer.java)
> at java.lang.Thread.run(Thread.java:484)
>
> This happens whether or not I actually run a client. I'm running with
> JDK 1.3 under Windows 2000 Server. Does anyone know what I'm doing
> wrong?
>
> TIA
> Brian
>
--
jvz.
Jason van Zyl
jason@apache.org
http://tambora.zenplex.org
In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
-- Jacques Ellul, The Technological Society