Re: RMI in Tomcat - last try

2005-06-13 Thread Woodchuck
hihi Nikola,

where are you placing your JAR files?  are any in TC/commons/lib or
TC/shared/lib?

try placing everything together, just as a test.  put *all* your
classes and JAR files under TC/commons for example and give it a try...
they should be able to see each other if they are at the same
classloading hierarchy level... this is what i suspect your problem is

http://struts.apache.org/userGuide/configuration.html#config_add

hth,
woodchuck


--- Nikola Milutinovic [EMAIL PROTECTED] wrote:

 Hi all.
 
 Me and the team have given up on RMI and went to RPC, but I thought
 I'd 
 make one last educational attempt.
 
 Is anyone using RMI in TC where TC is acting as a RMI client to a
 remote 
 RMI, general-purpose, server?
 
 I have seen tons of (rather old) examples of Applet being a RMI
 client 
 and they do not help me one bit.
 
 To remind the group of my problems, I'll recap. I have a working RMI 
 client and server packages, plus command line test client application
 
 which uses RMI client lib successfully against the server. When the
 same 
 lib is used in Tomcat from a servlet, it throws ClassCastException.
 
 Further investigation has shown that the class that Servlet gets from
 
 RMI subsystem implements the desired interface, to which it is being 
 cast. It also showed that the classloader of the class was RMI 
 ClassLoader, while other classes in the servlet, including servlet 
 itself werefrom TC's ClassLoader. It lead me to believe that *that*
 is 
 the source of the problem. It has occured to me that, since TC web 
 application has several classloaders, bound into a hierarchy, maybe
 RMI 
 classloader should be somehow introduced into it.
 
 QUESTIONS
 
 Am I on the right track?
 If yes, how do I bind in RMI ClassLoader into TC's ClassLoader
 hierarchy?
 And, lastly, who should do it - Servlet or RMI client?
 
 The last question is more a design question, but it could also be a 
 feasibility question, too. Can RMI client detect a classloader it
 should 
 bind into? It could be dome from the Servlet, but I would like to
 have a 
 general purpose Servlet that would be oblivious of underlying 
 implementation.
 
 I thought that at least JBoss developers would have something to say
 on 
 this question, since, as I recall, JBoss uses or has been using a lot
 of 
 RMI. There was one article or was it JBoss docs, which explained some
 
 problems of classloading, which were very similar to mine. I don't 
 recall those docs saying anything to solve the problem in TC.
 
 Nix.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 




__ 
Discover Yahoo! 
Stay in touch with email, IM, photo sharing and more. Check it out! 
http://discover.yahoo.com/stayintouch.html

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



Re: RMI in Tomcat - last try

2005-06-13 Thread Nikola Milutinovic

Woodchuck wrote:


hihi Nikola,

where are you placing your JAR files?  are any in TC/commons/lib or
TC/shared/lib?

try placing everything together, just as a test.  put *all* your
classes and JAR files under TC/commons for example and give it a try...
they should be able to see each other if they are at the same
classloading hierarchy level... this is what i suspect your problem is

http://struts.apache.org/userGuide/configuration.html#config_add
 



Hi Woodchuck.

I forgot to mention that, when I place ALL classes inside 
WEB-INF/classes, including the *_Stub classes, then it works. I guess in 
that case TC's classloader picks up the classes before RMI classloader 
and, since it is teh same CL, it works.


This solution is a patch, as far as I am concerned, since copying all 
those classes to clients classpath (TC's webapp WEB-INF/classes) is 
actually what RMI is supposed to root out. If I cannot have server 
classes in RMI codebase (one place), then I can as well go use RPC or 
pure sockets/serialization.


All of this still makes me believe that somehow RMI classloader should 
be introduced into TC's CL hierarchy. Or maybe install JBoss altogehter?


Nix.



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



Re: RMI on Tomcat

2003-07-09 Thread Sanjay
Anybody has any ideas on this,
Thanks again,
Sanjay
--- Sanjay [EMAIL PROTECTED] wrote:
 I am trying to set a RMI-IIOP server on Tomcat.
 Getting some issues. 
 MY RMI Server works fine if I start it standalone-
 without Tomcat. I think have been able to set
 security
 codebase etc correctly.
 
 Environment : Tomcat 4.1, Win NT4, JDK1.4.1
 I have issues when I start the RMIServer in Tomcat.
 I can start tomcat in the secured mode and start my
 RMI server successfully but then I run into two
 different kinds of problems:
 
 1. If I run the client from the same m/c as Tomcat
 then I can do the lookup and also do the
 PortableRemoteObject.narrow(). But a client on a
 difffrent m/c (in the same LAN) can not execute the
 narrow() - gives classcast Exception.
 
 2. I can not execute a method on the server (even
 when
 I get the narrow() to succeeed). Gives error:
 java.rmi.NoSuchObjectException: CORBA
 OBJECT_NOT_EXIST
 1398079692 No
 
 Has anyone done this. Any ideas suggestions would be
 welcome
 Thanks
 Sanjay


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: RMI on Tomcat

2003-07-09 Thread Bodycombe, Andrew
You may problems using RMI if tomcat is installed in a directory containing
whitespace. (e.g. C:\Program Files\Apache Group\...). 

-Original Message-
From: Sanjay [mailto:[EMAIL PROTECTED] 
Sent: 09 July 2003 14:02
To: Tomcat Users List
Subject: Re: RMI on Tomcat


Anybody has any ideas on this,
Thanks again,
Sanjay
--- Sanjay [EMAIL PROTECTED] wrote:
 I am trying to set a RMI-IIOP server on Tomcat.
 Getting some issues. 
 MY RMI Server works fine if I start it standalone-
 without Tomcat. I think have been able to set
 security
 codebase etc correctly.
 
 Environment : Tomcat 4.1, Win NT4, JDK1.4.1
 I have issues when I start the RMIServer in Tomcat.
 I can start tomcat in the secured mode and start my
 RMI server successfully but then I run into two
 different kinds of problems:
 
 1. If I run the client from the same m/c as Tomcat
 then I can do the lookup and also do the
 PortableRemoteObject.narrow(). But a client on a
 difffrent m/c (in the same LAN) can not execute the
 narrow() - gives classcast Exception.
 
 2. I can not execute a method on the server (even
 when
 I get the narrow() to succeeed). Gives error:
 java.rmi.NoSuchObjectException: CORBA
 OBJECT_NOT_EXIST
 1398079692 No
 
 Has anyone done this. Any ideas suggestions would be
 welcome
 Thanks
 Sanjay


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-
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]



RE: RMI on Tomcat

2003-07-09 Thread Sanjay
I have it set in a simple directory called tomcat.
Thanks
Sanjay
--- Bodycombe, Andrew [EMAIL PROTECTED]
wrote:
 You may problems using RMI if tomcat is installed in
 a directory containing
 whitespace. (e.g. C:\Program Files\Apache
 Group\...). 
 
 -Original Message-
 From: Sanjay [mailto:[EMAIL PROTECTED] 
 Sent: 09 July 2003 14:02
 To: Tomcat Users List
 Subject: Re: RMI on Tomcat
 
 
 Anybody has any ideas on this,
 Thanks again,
 Sanjay
 --- Sanjay [EMAIL PROTECTED] wrote:
  I am trying to set a RMI-IIOP server on Tomcat.
  Getting some issues. 
  MY RMI Server works fine if I start it standalone-
  without Tomcat. I think have been able to set
  security
  codebase etc correctly.
  
  Environment : Tomcat 4.1, Win NT4, JDK1.4.1
  I have issues when I start the RMIServer in
 Tomcat.
  I can start tomcat in the secured mode and start
 my
  RMI server successfully but then I run into two
  different kinds of problems:
  
  1. If I run the client from the same m/c as Tomcat
  then I can do the lookup and also do the
  PortableRemoteObject.narrow(). But a client on a
  difffrent m/c (in the same LAN) can not execute
 the
  narrow() - gives classcast Exception.
  
  2. I can not execute a method on the server (even
  when
  I get the narrow() to succeeed). Gives error:
  java.rmi.NoSuchObjectException: CORBA
  OBJECT_NOT_EXIST
  1398079692 No
  
  Has anyone done this. Any ideas suggestions would
 be
  welcome
  Thanks
  Sanjay
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
 

-
 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]
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: RMI and Tomcat

2002-11-27 Thread Greg Trasuk

You don't want your remote application's classes to be resident in the
access webapp.  I'd suggest we go back to the original problem and try to
solve that; take the application classes out of examples/WEB-IF/classes.
(Aside-- While you're at it, it's worth taking an hour or two to download
Ant, look at the Application Developer docs and sample build.xml included in
the Tomcat distribution, and set up your own webapp to get out of /examples.
It's not that hard, and it makes development much smoother!)

The original problem looks like the RMIClassLoader can't find the code for
MyAppStarter.  Are you passing or returning an instance of MyAppStarter as
an argument in the RMI call to the server app, or is the server object an
instance of MyAppStarter?  In either case, do you have the codebase property
set on the RMI server JVM?  The system property java.rmi.server.codebase
needs to refer to a set of URLs from which classes used in the RMI call can
be downloaded.  By extension, you need to have those classes available on
some sort of a server, typically ftp or http.  Tomcat'll do it!

If the codebase is set properly and the download files are available, a
webapp in Tomcat can execute RMI calls on a remote object.  There's one
not-so-small detail left, though; the class loader (RMIClassLoader) that
wants to load the remote bytecode will refuse to work if there's no security
manager, so you need to run Tomcat with the security manager enabled, which
will also require setting up the security.properties file to allow whatever
permissions your application needs.  See the Security Manager HOWTO in the
Tomcat docs.  In your case, you didn't get RMIClassLoader's exception, so I
suspect the codebase problem.

Note that it's a little awkward to set the codebase on a webapp, so it's
difficult (i.e. possible, but not elegant and not portable) to export remote
objects from a webapp.  I'd say this isn't a Tomcat limitation, so much as a
case of the servlet spec not being written with RMI in mind.  If you need to
support callbacks from the remote application, you need to employ a proxy
strategy.  You might want to look at jini.org for more information on the
proxy concept.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

-Original Message-
From: news [mailto:[EMAIL PROTECTED]]On Behalf Of Bill Barker
Sent: November 27, 2002 00:47
To: [EMAIL PROTECTED]
Subject: Re: RMI and Tomcat


This is starting to look like a classic case of bad design.
But to get your
app working, try adding servlet.jar to the CLASSPATH of rmiregistry.

Sarah L. Moore [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Well, I just moved the application classes over to the
 examples/WEB-INF/classes directory and re-ran my servlet.  I get a
slightly
 different message:

 java.rmi.ServerError: Error occurred in server thread;
nested exception
is:
 java.lang.NoClassDefFoundError: javax/servlet/ServletRequest

  From the output of my application, it looks as though the
application
 begins to run, but it is the servlet that is throwing the
above exception
 upon the call to the RMI application.  I did a search for
servlet.jar, and
 it looks as though it is where it should be in the Tomcat directory
 structure (i.e. catalina_home/common/lib).  Any other
advice?  I'm at a
 total loss.

 Thanks again!

 Sarah

 At 11:30 AM 11/27/2002 +0800, you wrote:
 Sorry, did not correctly see which class it was complaining
about. Try
and
 move MyApplicationStarter to the said directories.
 
 Sarah L. Moore wrote:
 
 Thanks for your reply.  My servlet class is in
 examples/WEB-INF/classes.  If I comment out the RMI step,
the servlet
 runs fine, so I'm left to think that the servlet location,
etc. are OK,
 but something relating to RMI is the culprit.
 
 At 11:01 AM 11/27/2002 +0800, you wrote:
 
  Cannot allocate servlet instance for path
/examples/servlet/MyServlet
  means that it can't find the requested servlet for that
web app which
 implies that your servlet class isn't where it should be.
Servlets 
 classes go in /examples/WEB-INF/classes or
 /examples/WEB-INF/lib for jar packages.
 
 Sarah L. Moore wrote:
 
 Hello all.
 
 I am new to Tomcat, and am having a problem with RMI.  I
have a Java
 application that basically just sits on my server
waiting for a data
 vector to be passed to it from my servlet. However, when
I run the
 servlet and try to have it pass the data to the
application through
RMI, I get:
 
 javax.servlet.ServletException: Cannot allocate servlet
instance for
 path /examples/servlet/MyServlet
 java.lang.NoClassDefFoundError: MyApplicationStarter
 
 The application resides in a directory on the root of the c drive
(i.e.
 c:\MyApplication), and the servlet I am working with is in
 catalina_home/webapps/examples.  Could it be that my
problem is due to
 the fact tha

Re: RMI and Tomcat

2002-11-26 Thread Kwok Peng Tuck
 Cannot allocate servlet instance for path /examples/servlet/MyServlet 
 means that it can't find the requested servlet for that web app which 
implies that your servlet class isn't where it should be. Servlets  
classes go in /examples/WEB-INF/classes or
/examples/WEB-INF/lib for jar packages.

Sarah L. Moore wrote:

Hello all.

I am new to Tomcat, and am having a problem with RMI.  I have a Java 
application that basically just sits on my server waiting for a data 
vector to be passed to it from my servlet. However, when I run the 
servlet and try to have it pass the data to the application through 
RMI, I get:

javax.servlet.ServletException: Cannot allocate servlet instance for 
path /examples/servlet/MyServlet
java.lang.NoClassDefFoundError: MyApplicationStarter

The application resides in a directory on the root of the c drive 
(i.e. c:\MyApplication), and the servlet I am working with is in 
catalina_home/webapps/examples.  Could it be that my problem is due to 
the fact that Tomcat can't locate the classes that are in the 
c:\MyApplication directory?  How can I remidy that problem, if that 
is, in fact, the problem.

I am running Tomcat 4 with jdk 1.3.1 on Win2K.

Please let me know if you need any more information. Any help would be 
appreciated.

Thanks!

Sarah

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





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




Re: RMI and Tomcat

2002-11-26 Thread Sarah L. Moore
Thanks for your reply.  My servlet class is in 
examples/WEB-INF/classes.  If I comment out the RMI step, the servlet runs 
fine, so I'm left to think that the servlet location, etc. are OK, but 
something relating to RMI is the culprit.

At 11:01 AM 11/27/2002 +0800, you wrote:
 Cannot allocate servlet instance for path /examples/servlet/MyServlet  
means that it can't find the requested servlet for that web app which 
implies that your servlet class isn't where it should be. Servlets  
classes go in /examples/WEB-INF/classes or
/examples/WEB-INF/lib for jar packages.

Sarah L. Moore wrote:

Hello all.

I am new to Tomcat, and am having a problem with RMI.  I have a Java 
application that basically just sits on my server waiting for a data 
vector to be passed to it from my servlet. However, when I run the 
servlet and try to have it pass the data to the application through RMI, I get:

javax.servlet.ServletException: Cannot allocate servlet instance for path 
/examples/servlet/MyServlet
java.lang.NoClassDefFoundError: MyApplicationStarter

The application resides in a directory on the root of the c drive (i.e. 
c:\MyApplication), and the servlet I am working with is in 
catalina_home/webapps/examples.  Could it be that my problem is due to 
the fact that Tomcat can't locate the classes that are in the 
c:\MyApplication directory?  How can I remidy that problem, if that is, 
in fact, the problem.

I am running Tomcat 4 with jdk 1.3.1 on Win2K.

Please let me know if you need any more information. Any help would be 
appreciated.

Thanks!

Sarah

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




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



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




Re: RMI and Tomcat

2002-11-26 Thread Kwok Peng Tuck
Sorry, did not correctly see which class it was complaining about. Try 
and move MyApplicationStarter to the said directories.

Sarah L. Moore wrote:

Thanks for your reply.  My servlet class is in 
examples/WEB-INF/classes.  If I comment out the RMI step, the servlet 
runs fine, so I'm left to think that the servlet location, etc. are 
OK, but something relating to RMI is the culprit.

At 11:01 AM 11/27/2002 +0800, you wrote:

 Cannot allocate servlet instance for path 
/examples/servlet/MyServlet  means that it can't find the requested 
servlet for that web app which implies that your servlet class isn't 
where it should be. Servlets  classes go in 
/examples/WEB-INF/classes or
/examples/WEB-INF/lib for jar packages.

Sarah L. Moore wrote:

Hello all.

I am new to Tomcat, and am having a problem with RMI.  I have a Java 
application that basically just sits on my server waiting for a data 
vector to be passed to it from my servlet. However, when I run the 
servlet and try to have it pass the data to the application through 
RMI, I get:

javax.servlet.ServletException: Cannot allocate servlet instance for 
path /examples/servlet/MyServlet
java.lang.NoClassDefFoundError: MyApplicationStarter

The application resides in a directory on the root of the c drive 
(i.e. c:\MyApplication), and the servlet I am working with is in 
catalina_home/webapps/examples.  Could it be that my problem is due 
to the fact that Tomcat can't locate the classes that are in the 
c:\MyApplication directory?  How can I remidy that problem, if that 
is, in fact, the problem.

I am running Tomcat 4 with jdk 1.3.1 on Win2K.

Please let me know if you need any more information. Any help would 
be appreciated.

Thanks!

Sarah

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




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



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





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




Re: RMI and Tomcat

2002-11-26 Thread Sarah L. Moore
Well, I just moved the application classes over to the 
examples/WEB-INF/classes directory and re-ran my servlet.  I get a slightly 
different message:

java.rmi.ServerError: Error occurred in server thread; nested exception is: 
java.lang.NoClassDefFoundError: javax/servlet/ServletRequest

From the output of my application, it looks as though the application 
begins to run, but it is the servlet that is throwing the above exception 
upon the call to the RMI application.  I did a search for servlet.jar, and 
it looks as though it is where it should be in the Tomcat directory 
structure (i.e. catalina_home/common/lib).  Any other advice?  I'm at a 
total loss.

Thanks again!

Sarah

At 11:30 AM 11/27/2002 +0800, you wrote:
Sorry, did not correctly see which class it was complaining about. Try and 
move MyApplicationStarter to the said directories.

Sarah L. Moore wrote:

Thanks for your reply.  My servlet class is in 
examples/WEB-INF/classes.  If I comment out the RMI step, the servlet 
runs fine, so I'm left to think that the servlet location, etc. are OK, 
but something relating to RMI is the culprit.

At 11:01 AM 11/27/2002 +0800, you wrote:

 Cannot allocate servlet instance for path /examples/servlet/MyServlet 
 means that it can't find the requested servlet for that web app which 
implies that your servlet class isn't where it should be. Servlets  
classes go in /examples/WEB-INF/classes or
/examples/WEB-INF/lib for jar packages.

Sarah L. Moore wrote:

Hello all.

I am new to Tomcat, and am having a problem with RMI.  I have a Java 
application that basically just sits on my server waiting for a data 
vector to be passed to it from my servlet. However, when I run the 
servlet and try to have it pass the data to the application through RMI, I get:

javax.servlet.ServletException: Cannot allocate servlet instance for 
path /examples/servlet/MyServlet
java.lang.NoClassDefFoundError: MyApplicationStarter

The application resides in a directory on the root of the c drive (i.e. 
c:\MyApplication), and the servlet I am working with is in 
catalina_home/webapps/examples.  Could it be that my problem is due to 
the fact that Tomcat can't locate the classes that are in the 
c:\MyApplication directory?  How can I remidy that problem, if that is, 
in fact, the problem.

I am running Tomcat 4 with jdk 1.3.1 on Win2K.

Please let me know if you need any more information. Any help would be 
appreciated.

Thanks!

Sarah

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



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



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





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



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




Re: RMI and Tomcat

2002-11-26 Thread Bill Barker
This is starting to look like a classic case of bad design.  But to get your
app working, try adding servlet.jar to the CLASSPATH of rmiregistry.

Sarah L. Moore [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Well, I just moved the application classes over to the
 examples/WEB-INF/classes directory and re-ran my servlet.  I get a
slightly
 different message:

 java.rmi.ServerError: Error occurred in server thread; nested exception
is:
 java.lang.NoClassDefFoundError: javax/servlet/ServletRequest

  From the output of my application, it looks as though the application
 begins to run, but it is the servlet that is throwing the above exception
 upon the call to the RMI application.  I did a search for servlet.jar, and
 it looks as though it is where it should be in the Tomcat directory
 structure (i.e. catalina_home/common/lib).  Any other advice?  I'm at a
 total loss.

 Thanks again!

 Sarah

 At 11:30 AM 11/27/2002 +0800, you wrote:
 Sorry, did not correctly see which class it was complaining about. Try
and
 move MyApplicationStarter to the said directories.
 
 Sarah L. Moore wrote:
 
 Thanks for your reply.  My servlet class is in
 examples/WEB-INF/classes.  If I comment out the RMI step, the servlet
 runs fine, so I'm left to think that the servlet location, etc. are OK,
 but something relating to RMI is the culprit.
 
 At 11:01 AM 11/27/2002 +0800, you wrote:
 
  Cannot allocate servlet instance for path /examples/servlet/MyServlet
  means that it can't find the requested servlet for that web app which
 implies that your servlet class isn't where it should be. Servlets 
 classes go in /examples/WEB-INF/classes or
 /examples/WEB-INF/lib for jar packages.
 
 Sarah L. Moore wrote:
 
 Hello all.
 
 I am new to Tomcat, and am having a problem with RMI.  I have a Java
 application that basically just sits on my server waiting for a data
 vector to be passed to it from my servlet. However, when I run the
 servlet and try to have it pass the data to the application through
RMI, I get:
 
 javax.servlet.ServletException: Cannot allocate servlet instance for
 path /examples/servlet/MyServlet
 java.lang.NoClassDefFoundError: MyApplicationStarter
 
 The application resides in a directory on the root of the c drive
(i.e.
 c:\MyApplication), and the servlet I am working with is in
 catalina_home/webapps/examples.  Could it be that my problem is due to
 the fact that Tomcat can't locate the classes that are in the
 c:\MyApplication directory?  How can I remidy that problem, if that
is,
 in fact, the problem.
 
 I am running Tomcat 4 with jdk 1.3.1 on Win2K.
 
 Please let me know if you need any more information. Any help would be
 appreciated.
 
 Thanks!
 
 Sarah
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]





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




RE: RMI and Tomcat

2001-03-09 Thread Andrew Gilbert

I have made two posts to the list about similar problems with 3.2.1 and
using JNDI/RMI (EJB's) and not figured much out. Not having the time to
delve further I backed off to Tomcat 3.1. You may try that for the interim.
Any feedback from any of the implementors that would help us start to figure
this out?


-Original Message-
From: Gerard BORREILL [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 09, 2001 12:01 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RMI and Tomcat


Hello,

 Sorry, but I have not found any answer in the mailing list archive.
 I am using Tomcat 3.2.1. I have a web application based on servlets
that communicates with a server using RMI, so I have set the
SecurityManager when starting Tomcat.
 I get a java.lang.ClassNotFoundException on a class that is under the
WEB-INF/classes/ directory, or in *.jar file located in WEB-INF/lib. The
class file is at the right place.

 I have made two attempts:
 1) put every classes in jar files. I have 2 jar files.
myApplication.jar and com.jar. The class not found is in the com.jar,
and the servlet class is in the myApplication.jar file.
 2) expand those .jar files under WEB-INF/classes, The class file not
found is not in the same package as the servlet class. (com.xxx and
fr.xxx.).

 I do not understand why tomcat is not able to find this class. I have
no SecurityException.Why is it finding my servlet and performing it, and
not my com.xx classes.
 I think it is a matter of class loader (?)
 How can I know the class loader used by tomcat for my application ? Do
I need this ?

 Does anyone have a solution ? In advance thank you.

Grard


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


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




Re: RMI and Tomcat

2001-03-09 Thread David Wall

 I have made two posts to the list about similar problems with 3.2.1 and
 using JNDI/RMI (EJB's) and not figured much out. Not having the time to
 delve further I backed off to Tomcat 3.1. You may try that for the
interim.
 Any feedback from any of the implementors that would help us start to
figure
 this out?

I've also reported this as "it makes no sense" that it can find a JSP bean
in the classpath, but if that bean calls other classes and those classes
call others, things get screwed up, as if those other beans have forgotten
the classloader/classpath that was in effect at the time the original JSP
page bean was referenced.

I have found a temporary solution that will likely help you.  In your Tomcat
startup file, put those two jar files in your CLASSPATH so that when Tomcat
itself starts up it will also have the same classpath that your webapp is
using.  I just set the CLASSPATH in Tomcat's startup script to use te
WEB-INF/classes and each jar in my WEB-INF/lib.  That does the trick, though
it's certainly not what I'd expect, and it would be worse if there was some
sort of conflict between jars/classes in two webapps running under the same
tomcat process.

David


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




Re: rmi amd tomcat

2001-01-19 Thread William Brogden



wendy wang wrote:
 
 Hi there,
 
 Does anyone know how to set up tomcat3.2.1 to run servlet which look up
 remote object using rmi?
 
 Wendy

There is nothing special required in the Tomcat setup. A servlet
talking to a RMI object is just like an application doing the same.
I would suggest that you write a "Bean" type component to do the
actual RMI so you can test it without a servlet interface first.

-- 
WBB - [EMAIL PROTECTED]
Java Cert mock exams http://www.lanw.com/java/javacert/
Author of Java Developer's Guide to Servlets and JSP 
ISBN 0-7821-2809-2

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