You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sucharitha Panthika <sp...@certivo.net> on 2002/02/07 02:16:36 UTC

RMI remote Method which returns File object.

Hey

I have a qution using RMI to return files . If I have a a remote method 
public File getFile();  
method in a Server and I implemented this method to return one file from
my local drive C:\.  When the remote Client from different system calls
this method should it return the my File 
to that Client or not.  i have give allpermission in the policy files.

I have similar example. When I run the Client from a different system I
don't get the File
object instead when I run the Client from myy system in another window
without the required classes in the classpath I get the File.  

Can Any one let me know what could be the problem? I am attaching the
Server, ServerImpl, Client and policy files for review if required.


Sucharitha



-----Original Message-----
From: Gearoid Coughlan [mailto:gearoid.coughlan@kapookigames.com]
Sent: Wednesday, February 06, 2002 3:32 PM
To: 'Tomcat Users List'
Subject: tomcat 4.0 + apache 1.3.12 + mod_jk


Hi

I am getting the following error reported in mod_jk.log when
executing servlets
--
[Wed Feb 06 23:14:56 2002]  [jk_connect.c (143)]: jk_open_socket,
connect() 
failed errno = 146
[Wed Feb 06 23:14:56 2002]  [jk_ajp13_worker.c (196)]: In 
jk_endpoint_t::connect_to_tomcat, failed errno = 146
[Wed Feb 06 23:14:56 2002]  [jk_ajp13_worker.c (635)]: Error connecting
to 
the Tomcat process.
[Wed Feb 06 23:14:56 2002]  [jk_ajp13_worker.c (848)]: In 
jk_endpoint_t::service, send_request failed in send loop 2
---

Im running apache version 1.3.12
with tomcat 4.0.x

when I run tomcat 3.0 everything is fine.
BTW im running this on a Sparc Solaris SunOS 8

Any ideas..

thanks
gearoid



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: RMI remote Method which returns File object.

Posted by Tom Drake <rt...@pobox.com>.
Sucharitha:

A File object represents a files name (and location).
It does not represent or store the contents of a file.
Therefore, using RMI to pass a File object around doesn't
make much sense. It is likely that a File object
that points to a valid file on the client is completely
invalid on the server. Worse yet, it is valid, but points
to a different copy of the file.

If you need to transfer a file from one side of an RMI
connection to another, you'll need to read the file into
a buffer of some sort and pass that across your RMI
interface.

This explains why your client program only works when
you run it on the same computer as your server.

Tom

----- Original Message -----
From: "Sucharitha Panthika" <sp...@certivo.net>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, February 06, 2002 5:16 PM
Subject: RMI remote Method which returns File object.


Hey

I have a qution using RMI to return files . If I have a a remote method
public File getFile();
method in a Server and I implemented this method to return one file from
my local drive C:\.  When the remote Client from different system calls
this method should it return the my File
to that Client or not.  i have give allpermission in the policy files.

I have similar example. When I run the Client from a different system I
don't get the File
object instead when I run the Client from myy system in another window
without the required classes in the classpath I get the File.

Can Any one let me know what could be the problem? I am attaching the
Server, ServerImpl, Client and policy files for review if required.


Sucharitha



-----Original Message-----
From: Gearoid Coughlan [mailto:gearoid.coughlan@kapookigames.com]
Sent: Wednesday, February 06, 2002 3:32 PM
To: 'Tomcat Users List'
Subject: tomcat 4.0 + apache 1.3.12 + mod_jk


Hi

I am getting the following error reported in mod_jk.log when
executing servlets
--
[Wed Feb 06 23:14:56 2002]  [jk_connect.c (143)]: jk_open_socket,
connect()
failed errno = 146
[Wed Feb 06 23:14:56 2002]  [jk_ajp13_worker.c (196)]: In
jk_endpoint_t::connect_to_tomcat, failed errno = 146
[Wed Feb 06 23:14:56 2002]  [jk_ajp13_worker.c (635)]: Error connecting
to
the Tomcat process.
[Wed Feb 06 23:14:56 2002]  [jk_ajp13_worker.c (848)]: In
jk_endpoint_t::service, send_request failed in send loop 2
---

Im running apache version 1.3.12
with tomcat 4.0.x

when I run tomcat 3.0 everything is fine.
BTW im running this on a Sparc Solaris SunOS 8

Any ideas..

thanks
gearoid



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>




----------------------------------------------------------------------------
----


| --
| To unsubscribe:   <ma...@jakarta.apache.org>
| For additional commands: <ma...@jakarta.apache.org>
| Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>