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

RE: Servlet problem



I managed to get it working by moving the classes to the classpath of the
server, rather than as a repository (which means I have to restart the
server every time I recompile something).

It works, I guess it'll have to do!

Thanks for your help.

Henry

> -----Original Message-----
> From: ozone-users-owner@ozone-db.org
> [mailto:ozone-users-owner@ozone-db.org]On Behalf Of Falko Braeutigam
> Sent: March 26, 2001 3:55 AM
> To: Henry Stern; ozone-users@ozone-db.org
> Subject: Re: Servlet problem
>
>
> On Sun, 25 Mar 2001, Henry Stern wrote:
> > I'm having a problem using Ozone with Apache JServ.  It's very
> similar to
> > the problem that Charilaos Pasantonopoulos had a few weeks ago.
>
> Not really. If I remember right, Charilaos tried to run the ozone
> server inside
> the servlet engine (via LocalDatabase). This caused problem because
> the server used its own ClassLoader which did not work with the
> CLassLoader of the servlet engine.
>
> You are just trying to contact a separate server from the
> servlet. In this case
> (client side) ozone does not fiddle around with class loading
> stuff. The proxy
> is instantiated just by deserializing it from the stream.
>
> So I beliefe that your servlet engine hasn't access to any of the
> classes in
> your users/cs/vulcan/servlets/vulcan/repository directory.
>
>
> Falko
>
>
> >  The JVM
> > isn't finding my proxy classes.  The thing is, they are in the correct
> > classpath (they are sitting along side of the implementation
> classes) and I
> > did remember to build them (forgot that one the first time!).
> >
> > On a fresh database, it dies on line 7, otherwise it dies on
> line 5 of the
> > snippit below.
> >
> > Does anyone have any ideas as to what might be wrong?
> >
> > Thanks,
> > Henry
> >
> > Output from Ozone:
> > [info] (440) InvokeServer: connection established...
> > [info] (032) InvokeServer: user logged in: vulcan
> > [info] (032) ClusterStore: loadCluster(): load cluster from disk: 105
> > [info] (032) InvokeServer: connection closed (user: vulcan)
> >
> > borg:~/apache/conf/jserv$ grep repositories zone.properties
> > # The list of servlet repositories controlled by this servlet zone
> > # Syntax: repositories=[repository],[repository]...
> > repositories=/users/cs/vulcan/servlets
> >
> > borg:~/vulcan$ find ~/servlets -name "Repository*"
> > /users/cs/vulcan/servlets/vulcan/repository/RepositoryImpl.class
> > /users/cs/vulcan/servlets/vulcan/repository/Repository.class
> > /users/cs/vulcan/servlets/vulcan/repository/RepositoryImpl_Proxy.class
> >
> > DatabaseWrapper.java:
> > 1:    public DatabaseWrapper () throws Exception {
> > 2:	    db = ExternalDatabase.openDatabase(
> > "ozonedb:remote://localhost:3333" );
> > 3:	    db.reloadClasses();
> > 4:
> > 5:	    repository = (Repository)db.objectForName( "repository" );
> > 6:	    if (repository == null) {
> > 7:	        repository = (Repository)db.createObject(
> > RepositoryImpl.class.getName(), OzoneInterface.Public, "repository" );
> > 8:            repository.init ();
> > 9:	    }
> > 10:    }
> >
> > The exception in the error_log:
> > java.lang.ClassNotFoundException: vulcan.repository.RepositoryImpl_Proxy
> >         at java.io.ObjectInputStream.inputObject(ObjectInputStream.java,
> > Compiled Code)
> >         at java.io.ObjectInputStream.readObject(ObjectInputStream.java,
> > Compiled Code)
> >         at java.io.ObjectInputStream.readObject(ObjectInputStream.java,
> > Compiled Code)
> >         at
> org.ozoneDB.DxLib.net.DxClient.receive(DxClient.java, Compiled
> > Code)
> >         at
> > org.ozoneDB.core.DbRemote.DbRemoteClient.receive(DbRemoteClient.java,
> > Compiled Code)
> >         at
> org.ozoneDB.ExternalDatabase.sendCommand(ExternalDatabase.java,
> > Compiled Code)
> >         at
> org.ozoneDB.ExternalDatabase.sendCommand(ExternalDatabase.java,
> > Compiled Code)
> >         at
> org.ozoneDB.ExternalDatabase.createObject(ExternalDatabase.java,
> > Compiled Code)
> >         at
> org.ozoneDB.ExternalDatabase.createObject(ExternalDatabase.java,
> > Compiled Code)
> >         at
> vulcan.ui.DatabaseWrapper.<init>(DatabaseWrapper.java, Compiled
> > Code)
> >         at vulcan.ui.ListCategories.init(ListCategories.java,
> Compiled Code)
> >         at
> > org.apache.jserv.JServServletManager.load_init(JServServletManager.java,
> > Compiled Code)
> >         at
> >
> org.apache.jserv.JServServletManager.loadServlet(JServServletManager.java,
> > Compiled Code)
> >         at
> > org.apache.jserv.JServConnection.processRequest(JServConnection.java,
> > Compiled Code)
> >         at org.apache.jserv.JServConnection.run(JServConnection.java,
> > Compiled Code)
> >         at java.lang.Thread.run(Thread.java, Compiled Code)
> >
> > ---
> > Flon's Law:
> > 	There is not now, and never will be, a language in
> > 	which it is the least bit difficult to write bad programs.
> --
> ______________________________________________________________________
> Falko Braeutigam                              mailto:falko@smb-tec.com
> SMB GmbH                                        http://www.smb-tec.com
>