RMIClassLoader causes MalformedURLException when Tomcat install d irectory contains spaces

2005-05-18 Thread GDavis
Hi.

We're having an issue with a Tomcat servlet making RMI calls.
 
Background:
We have a Java based client-server product.  For web deployment, the client
converts its RMI calls into http posts encoded in XML and we have a servlet
that processes the posts, converts them back into the RMI calls and calls
out to the server.

We have a problem with Tomcat (4.x and 5.x versions) when it is installed in
a directory path that contains spaces (the default install), and it results
in a MalformedURLException indicating no protocol.

Some details:
Platform - various, mostly Windows XP
Tomcat Version - various, currently 5.0.30
Component - Catalina (I think)

To function, we install a .jar file into the Tomcat  shared\lib directory
that contains the classes of our Java server.  Our servlet uses the
RMIClassLoader to load the required classes from the .jar file we have in
shared\lib.

I have been unable to find an answer, but the nature of our problem is
described very well by the comments of Greg Trasuk (comment #6) in the
following bug.
http://issues.apache.org/bugzilla/show_bug.cgi?id=7082
And our specific exception details are as follows.

java.rmi.ServerException: RemoteException occurred in server thread; nested
exception is: 
    java.rmi.UnmarshalException: error unmarshalling arguments;
nested exception is: 
    java.net.MalformedURLException: no protocol: 5.0/shared/classes/
    at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown
Source)
    at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
all.java:247)
    at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
    at
com.spicer.jdl.bosInterfaceImpl_Stub.allocClientWrapperServer(Unknown
Source)
    at
com.spicer.jdl.MatrixXMLDispatch.dispatch(MatrixXMLDispatch.java:60)
    at com.spicer.servlet.MatrixXMLServlet.doPost(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
    at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
    at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:198)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:152)
    at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
    at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
)
    at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
)
    at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
    at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
    at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
    at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)
    at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)
    at java.lang.Thread.run(Thread.java:595)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments;
nested exception 

RE: error-page not working for error-code 503?

2005-05-18 Thread GDavis
You might want to take a look at

http://www.experts-exchange.com/Web/Application_Servers/Q_20654602.html 

it seems to include several ways to override error pages. A friend has done
custom error pages for his own webapps, but never tried to override every
error page.

-Original Message-
From: Raymond [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 18, 2005 9:54 AM
To: Tomcat Users
Subject: error-page not working for error-code 503?

Hi,

I have these in my tomcat server's global web.xml file:

error-page
  error-code404/error-code
  location/http404.jsp/location
/error-page

error-page
  error-code503/error-code
  location/maintenance.html/location
/error-page

It works for the 404 but not the 503 error code. What's wrong with it?
I want to redirect users to a maintenance in progress page when I stop 
any webapp with the tomcat manager. But it always gives me the default 
tomcat HTTP status page when I request a stopped webapp.

Please help. Thanks.
Raymond 

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

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