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 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)
Caused by: java.net.MalformedURLException: no protocol: 5.0/shared/classes/
����������� at java.net.URL.<init>(Unknown Source)
����������� at java.net.URL.<init>(Unknown Source)
����������� at java.net.URL.<init>(Unknown Source)
����������� at sun.rmi.server.LoaderHandler.pathToURLs(Unknown Source)
����������� at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
����������� at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
����������� at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
����������� at sun.rmi.server.MarshalInputStream.resolveClass(Unknown
Source)
����������� at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
����������� at java.io.ObjectInputStream.readClassDesc(Unknown Source)
����������� at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
����������� at java.io.ObjectInputStream.readObject0(Unknown Source)
����������� at java.io.ObjectInputStream.readObject(Unknown Source)
����������� at sun.rmi.server.UnicastRef.unmarshalValue(Unknown Source)
����������� ... 7 more


Note that, in our case, if we install Tomcat to a directory without any
spaces, everything works fine.  An obvious work around and what we've
recommended to our customers until now.

But, here's the rub.
We now have a customer who is a reseller / integrator, and they have
customers who are requesting that things work with the default install, and
so we need to find a solution to the problem other than installing Tomcat
into a directory without spaces.

Since our product is shipped worldwide and installed on various systems,
we're trying to find a solution that is generic and meets the following
requirements.
1. We must be able to work with other containers, not just Tomcat (yeah, I
know...:-))
2. We must peacefully cohabitate with other web apps running in the same
container
3. Ideally, there should be no special "tweaking" needed by the person
installing our product
4. Our product must also work on a LAN or WAN without a servlet (using
direct RMI connections), so no changes that would affect that functionality
can be implemented

Thoughts?  Suggestions?  Can you point us in the right direction?

Thank you.
Greg Davis
Spicer Corporation

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

Reply via email to