You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Bodycombe, Andrew" <an...@siemens.com> on 2003/02/28 17:57:46 UTC

Tomcat/RMI and Spaces in Filenames

I am having a problem with Tomcat 4.1.18 running on Windows NT 4, and JDK
1.4

I have a servlet accessing a remote server via RMI, and the RMI calls fail
with an UnmarshallException, 
but only when the tomcat install directory contains spaces. e.g. C:\Program
Files\Apache Group\Tomcat 4.1\,
the default install directory.

I enclose the stack trace:

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: Files/Apache
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception
is:
        java.net.MalformedURLException: no protocol: Files/Apache
java.net.MalformedURLException: no protocol: Files/Apache
        at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
all.java:240)
        at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:117)
        at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown
Source)
        at
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProx
y.java:128)
        at
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108)
        at
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73
)
        at
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
        at
org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:185)
        at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
        at $Proxy0.create(Unknown Source)
        at
uk.co.siemenscomms.eng.j2ee.model.GazetteerManager.getStreet(GazetteerManage
r.java:103)
        at
uk.co.siemenscomms.eng.j2ee.action.MoreDetailsAction.perform(MoreDetailsActi
on.java:90)
        at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja
va:1786)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1585)
        at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
        at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1027)
        at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
)
        at java.lang.Thread.run(Thread.java:479)


In this case, the servlet is accessing an EJB on a remote machine when the
exception occurs,
but the same happens when accessing an RMI server on the same machine, in a
different VM.

Note the "Files/Apache" text appearing in the exception, which led me to
believe this was a 
problem with the directory name. 

Should tomcat be using a URLEncoder to generate the classpath for the RMI
call?
Or, is this a problem with the sun RMI implementation?
Has anybody noticed anything similar?

This isn't really a serious issue for us right now, we just need to make
sure that tomcat
is installed in a directory containing no whitespace.

Regards,
	Andy

> Andrew Bodycombe
> Software Engineer
> s Communications
> ) mailto:andrew.bodycombe@siemens.com
> & TEL: 780 2186 or externally +44 115 9432186
> "Internet communications are not secure and therefore Siemens
> Communications Limited does not accept legal responsibility for the
> contents of this message. Any views or opinions presented are solely those
> of the author and do not necessarily represent those of Siemens
> Communications Limited unless otherwise specifically stated".
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Jakarta Tomcat on Solaris

Posted by Oleksiy Podopryhora <al...@dcs.kcl.ac.uk>.
 Hi there,
I am configuring a Jakarta Tomcat on Solaris for our students. Since I 
have no experience with subject I decided to ask for your help and 
advice in order to avoid unnecessary mistakes. I have installed Tomcat 
on the port 8080. On our system everybody has an account so I added 
listener:

<!--
Web server can automatically map a request URI starting
with a tilde character ("~") and a username to a directory
(commonly named public_html) in that user's home directory
on the server. we accomplish the same thing in Catalina by
using a special Listener element like this (on a Unix system
that uses the /etc/passwd file to identify valid users):
-->

<Listener className="org.apache.catalina.startup.UserConfig"
directoryName="public_html"
userClass="org.apache.catalina.startup.PasswdUserDatabase"/>

our users can put their JSP stuff into their public_html directory. Also 
I added

<DefaultContext reloadable="true"/>

because I would like Catalina automatically reload the web application 
if a change is detected.

but it does not work ;-( and it's not convinient to restart a whole 
server after making simple change to the script.

How can I put log files in the user's public_html directories, so users 
can see errors that belong to their scripts only? What shell I configure 
as well? What can be useful?

Please advice.

Thanks to all





---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org