[ZOO-Discuss] Java based Service: <ows:ExceptionText>can't find class ZooWrapper.class</ows:ExceptionText>

Gérald Fenoy gerald.fenoy at geolabs.fr
Sat May 7 07:03:21 PDT 2011


Dear Matthias,
Thanks for your feedbacks.

Setting ZooWrapper for the service provider is correct.

The class file should be located in the same directory as zoo_loader.cgi as you try at the begining.
Indeed, the ZOO-Kernel should use this directory as default CLASSPATH.

Le 6 mai 2011 à 07:19, Matthias Lendholt <matthias.lendholt at gfz-potsdam.de> a écrit :

> Dear Gérald,
> thanks for your quick response. Unfortunately it's still not working.
> 
>> The serviceProvider should mention the name of the class note the filename.
>> So in your case I guess the class defined in the file is named ZooWrapper so
>> you should set :
>> 
>> serviceProvider = ZooWrapper
> 
> Ok. I tested both versions but both are not working.
> 
> 
>> Indeed, CLASSPATH can be set in the [env] section if needed. For instance,
>> if you need to load/use specific jar files as you asked. So, you can
>> specify the
>> class name then use a specific CLASSPATH in the [env] section of your main
>> configuration file (main.cfg). Until the class name is found in the
>> CLASSPATH
>> it should work.
> 
> I added this section to the main.cfg but I'm not sure if this is correct.
> 
> [env]
> CLASSPATH=/home/dews/zoo/zoo-project/javaservices/
> PYTHONPATH=/usr/bin/python
> 
> (the class ZooWrapper.class is located in the javaservices directory)

I guess it won't imply any trouble but the PYTHONPATH you set sounds odd.
As for each environment variables, setting the CLASSPATH this way should work I guess. Nevertheless, can you confirm that the apache user get access to this directory and files located into this directory ? It is probably the cause of the issues.

> 
> 
>> Note that the CLASSPATH should automatically be updated to add the
>> directory
>> where the ZOO-Kernel is located.
> 
> Could you rephrase this? I'm not sure whether I understood you correctly. Do I have to point the classpath to the zoo-kernel directory?

It means that the ZOO-Kernel is using its directory as defaut CLASSPATH. So, you should copy your class file in this directory. The directory where the zoo_loader.cgi cgi script is located. If you do that, you don't have to modify the CLASSPATH using the [env] section.

> 
> 
> Thanks for your help!
> 
> Matthias
> 

Hope to hear from you,
Best regards,

Gérald Fenoy
gerald.fenoy at geolabs.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20110507/59e0c4fc/attachment.html>


More information about the Zoo-discuss mailing list