Thanks for your reply.

Unfortunately shutting down the registry seems not to work (although I
tried hard I could not find a way to do this). Instead, on shutdown (i.e.
in my ServletContextListener.contextDestroyed()-method), I unexport my
remote objects and unbind them in the registry.

Does anyone know of a better way to do this?

Chris


On Tue, 25 May 2004, Shapira, Yoav wrote:

>
> Hi,
> You have to shutdown your RMI registery properly during the webapp's
> shutdown (the first part of the reload is a shutdown).  Use a
> ServletContextListener's contextDestroyed method for this.
>
> Yoav Shapira
> Millennium Research Informatics
>
>
> >-----Original Message-----
> >From: Christoph Mangold [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, May 25, 2004 3:22 AM
> >To: [EMAIL PROTECTED]
> >Subject: RMI Problem
> >
> >
> >I am trying to run an rmi registry as part of a servlet context in
> tomcat
> >5.0.19. When I startup tomcat the first time everything works fine.
> >However, if I redeploy my application using tomcat's ant-reload-target
> I
> >get the following exception (server side) when trying to connect from
> the
> >(RMI) client:
> >
> >Exception dispatching call to [0:0:0, 0] in thread "RMI TCP
> >Connection(7)-129.69.216.97" at Wed May 19 15:45:06 CEST 2004:
> >java.lang.NullPointerException
> >        at
> >org.apache.catalina.loader.WebappClassLoader.getURLs(WebappClassLoader.
> java
> >:1431)
> >        at
> >sun.rmi.server.LoaderHandler.getClassAnnotation(LoaderHandler.java:221)
> >        at
> >java.rmi.server.RMIClassLoader$2.getClassAnnotation(RMIClassLoader.java
> :650
> >)
> >        at
> >java.rmi.server.RMIClassLoader.getClassAnnotation(RMIClassLoader.java:3
> 80)
> >        at
> >sun.rmi.server.MarshalOutputStream.annotateClass(MarshalOutputStream.ja
> va:7
> >8)
> >        at
> >java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:11
> 47)
> >        at
> >java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1100)
> >        at
> >java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:
> 1241
> >)
> >        at
> >java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
> >        at
> >java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
> >        at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
> >        at
> >sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:342)
> >        at
> >sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
> >        at sun.rmi.transport.Transport$1.run(Transport.java:148)
> >        at java.security.AccessController.doPrivileged(Native Method)
> >        at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
> >        at
> >sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460
> )
> >        at
> >sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.j
> ava:
> >701)
> >        at java.lang.Thread.run(Thread.java:534)
> >
> >Exception dispatching call to [0:0:0, 0] in thread "RMI TCP
> >Connection(7)-129.69.216.97" at Wed May 19 15:45:06 CEST 2004:
> >java.rmi.UnmarshalException: error unmarshalling call header; nested
> >exception is:
> >        java.io.StreamCorruptedException: result already in progress
> >        at
> >sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:217)
> >        at sun.rmi.transport.Transport$1.run(Transport.java:148)
> >        at java.security.AccessController.doPrivileged(Native Method)
> >        at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
> >        at
> >sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460
> )
> >        at
> >sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.j
> ava:
> >701)
> >        at java.lang.Thread.run(Thread.java:534)
> >Caused by: java.io.StreamCorruptedException: result already in progress
> >        at
> >sun.rmi.transport.StreamRemoteCall.getResultStream(StreamRemoteCall.jav
> a:16
> >1)
> >        at
> >sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:347)
> >        at
> >sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
> >        ... 6 more
> >
> >
> >Any idea how I can deal with this?
> >Chris
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> This e-mail, including any attachments, is a confidential business communication, 
> and may contain information that is confidential, proprietary and/or privileged.  
> This e-mail is intended only for the individual(s) to whom it is addressed, and may 
> not be saved, copied, printed, disclosed or used by anyone else.  If you are not 
> the(an) intended recipient, please immediately delete this e-mail from your computer 
> system and notify the sender.  Thank you.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-----------------
Christoph Mangold



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to