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

Re: creatObject exception




Hi Raul,

On Mit, 09 Aug 2000, Fiedler.Raul wrote:
> Hi ozone
> 
> I have implemented my little ozone app, testDB, copying the Car example
> sources from tutorial html docs.
> 
> At:
> Car car = (Car)db.createObject(CarImp.class.getName(), 0);
> 
> the Exception, org.ozoneDB.ClassNotFoundExc, is thrown.

I assume this exception is thrown at server side? Am I right? You have to add
the path of your test application to the CLASSPATH of the server too. Without
this ozone could not create your class - and an exception is thrown.

> I think that I haven't set up all paths correct, but I have no clue really.

Just add the path to your test application to the CLASSPATH of your server.

> My own sources are in directory /home/testDB.
> I have not given my sources and the package a name or added anything to

A package name ist not really needed. But if you write larger application a
package name would be more practically.

> classpath, because I don't know what that means. An example of this or hint
> where this is described would be most welcome.

export CLASSPATH=$CLASSPATH:/home/testDB

> I compile the project with 'ant' and, a modified build.xml. It compiles my
> sources and generates the _proxy, but I don't get the *.ocd file.

This isn't an error, it is a warning. There are two ways to create proxy:
1. OPP (ozone post processor) reads the interface of your implementation
2. OPP reads the additional OCD (ozone class descriptor) file of your
implementation. If this is not found, the first solution is used by OPP.

> 
> I execute my app with invoking:
> ojvm testDB

Ok.

> 
> Additional, I am using sun, Solaris 2.5.1, and Korn shell
> 
> Thank you very much
> Raul Fiedler

Regards,
Lars
-- 
___________________________________________________________________
Lars Martin                                 mailto:lars@smb-tec.com
SMB GmbH                                     http://www.smb-tec.com