Nope.  I'm afraid that's not it.  Yes, using
PortableRemoteObject would be a bit more correct, but
that doesn't have anything to do with the class
loading.  Also, I'm calling a plain RMI server, so the
session object comments don't really apply here.

Here's what I found.  The needed class was contained
in a jar file in my WEB-INF/lib directory, but Orion
(silently) refused to load it.  I extracted the jar
into WEB-INF/classes, but Orion still could not find
the class.  I even put the class in my main
application jar with the code that was trying to use
it, and *still* no luck.

I finally noticed that the jar file containing the
class had no manifest.  I rebuilt the jar making sure
the new version had a manifest, and *finally* Orion
found my class.

With my experiences over the past couple of days, IMHO
Orion's classloader has a few fairly significant bugs.
 The two that have affected me have been 1) Orion
doesn't seem to load jar files unless they contain
manifests, and 2) Orion seems to have difficulty
reading classes and resources from the WEB-INF/classes
directory.

roger


--- [EMAIL PROTECTED] wrote:
> This is not a bug :)
> You should use the narrow method to do this, or you
> are not ejb2.0
> compatible or corba to be more spesific.
> Here is an example on how i would do it:
> ************************* SNIP START
> Context ctx = new InitialContext();
> MyRemoteHome home = (MyRemoteHome)
>          
>
PortableRemoteObject.narrow(ctx.lookup("java:comp/env/myserver"),
>                                                 
> MyRemoteHome.class);
> MyRemote remote = home.create(); // for session
> beans ofcourse :)
> ************************* SNIP END
> This is the way you should do it....Btw to be corba
> aware with session beans
> do a remote.remove() when done with the session bean
> in the client...Many
> dont do this, and then they get humongus memory
> problems very fast
> :)....remember corba dont do distributed GC like RMI
> does....
> 
> Now have fun!! Hope you get it working :)
> 
> Regards
> Klaus Myrseth
> 
> 
> -----Opprinnelig melding-----
> Fra: Roger Vaughn [mailto:[EMAIL PROTECTED]]
> Sendt: 30. januar 2001 14:47
> Til: Orion-Interest
> Emne: Disregard: Re: BUG: Can't cast RMI interfaces
> in 1.4.5
> 
> 
> Oops.  My bad.  This isn't working under 1.3.8
> either.
>  I still don't know why - it's a valid cast, the
> class
> is there, and I *compiled* with it after all.
> 
> --- Roger Vaughn <[EMAIL PROTECTED]> wrote:
> > In one of my webapps, I have to do an RMI call to
> an
> > outside RMI server.  I'm locating the server with
> a
> > plain old traditional lookup like this:
> > 
> >   MyRemote server =
> > (MyRemote)Naming.lookup("myserver");
> > 
> > But Orion 1.4.5 complains that it can't load the
> > class
> > MyRemote, even though it is included in my
> > application
> > jars in WEB-INF/lib.
> > 
> > This works correctly in 1.3.8.
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Auctions - Buy the things you want at great
> > prices. 
> > http://auctions.yahoo.com/
> > 
> 
> 
> __________________________________________________
> Get personalized email addresses from Yahoo! Mail -
> only $35 
> a year!  http://personal.mail.yahoo.com/
> 


__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Reply via email to