[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ozone and servlets



> > I'm using ozone with servlets.
> > I have a User.java, UserImpl.java, I compile them and generate the
> > UserImpl_Proxy whith opp
> > I use a UserMannager class where I create users by calling
> > createObject()
> > When I use this UserMannager from a servlet it sends me a :
> > java.lang.ClassNotFoundException: UserImpl_Proxy
> > but if I use it in a normal app it works perfectly
> > (of course UserImpl_Proxy.class is in the CLASSPATH)
> > 
> > Any suggestions?
> 
> Just make sure that your servlet engine can access your proxy classes. Packing
> them into your *.war is maybe a good idea. (is this true? do others have
> experiences?)

Putting them in WEB-INF/lib should do the trick (unless they're already in
WEB-INF/classes).

I should say though that I did have a similar problem once. I didn't
understand it *at all*. It was all in WEB-INF/classes; but the _Impl
wasn't found (everything else was). I had no idea what was wrong; except
that if I added WEB-INF/classes to the system CLASSPATH it suddently worked.
I thought the web application class loader was broken. I then sent a
message regarding this to the Enhydra list; but no one reacted. Then when
I tried again the day after, it worked!

Either I just did something really *really* stupid (but I have no idea what
it would be), or there's some real problem at work here :) Co-incidence? :)

-- 
/ Peter Schuller, InfiDyne Technologies HB

PGP userID: 0x5584BD98 or 'Peter Schuller <peter.schuller@infidyne.com>'
Key retrival: Send an E-Mail to getpgpkey@scode.infidyne.com
E-Mail: peter.schuller@infidyne.com Web: http://scode.infidyne.com