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

Matthias Lendholt matthias.lendholt at gfz-potsdam.de
Fri May 6 00:19:36 PDT 2011


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)


> 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?


Thanks for your help!

Matthias

> You are right, there is no specific section for Java Services
> implementation, we
> probably have to create a ticket for this task to be done. Nevertheless
> maybe you
> can take a look at this :
> http://zoo-project.org/trac/wiki/ZooWebSite/ZooServices/Examples#Java
>
> Even if it is similar to read the HelloJava.java source and and the
> HelloWorldJava.zcfg.
>
> Hope to hear from you.
> Best regards,
>
> Le 5 mai 2011 à 15:52, Matthias Lendholt a écrit :
>
>> Dear all,
>>
>> I tried to setup a very simple Java Process and followed the demo in the
>> wiki.
>>
>> ZooWrapper.class is stored in the cgi-bin directory and TestJava.zcfg is
>> pointing to it.
>>
>> *ls*
>>
>> /usr/lib/cgi-bin$ ls
>> HelloPy.zcfg mapserv test_service.py ZooWrapper.class
>> main.cfg TestJava.zcfg zoo_loader.cgi
>>
>> *zcfg*
>>
>> [Test]
>> Title = Display a string
>> Abstract = Display a string which contains an hello message
>> processVersion = 1
>> storeSupported = true
>> statusSupported = true
>> serviceProvider = ZooWrapper.class
>> serviceType = Java
>> <MetaData>
>> title = Demo
>> </MetaData>
>> <DataInputs>
>> [S]
>> Title = the string
>> Abstract = The string to add to the hellow one.
>> minOccurs = 1
>> maxOccurs = 1
>> <LiteralData>
>> DataType = string
>> <Default>
>> </Default>
>> </LiteralData>
>> </DataInputs>
>> <DataOutputs>
>> [Result]
>> Title = The hello string
>> Abstract = The Hello message string.
>> <LiteralOutput>
>> DataType = string
>> <Default>
>> </Default>
>> </LiteralOutput>
>> </DataOutputs>
>>
>>
>> *ServerRequest*
>> http://192.168.56.101/cgi-bin/zoo_loader.cgi?Service=WPS&Request=Execute&Version=1.0.0&Identifier=TestJava&DataInputs=S=TesT
>> <http://192.168.56.101/cgi-bin/zoo_loader.cgi?Service=WPS&Request=Execute&Version=1.0.0&Identifier=TestJava&DataInputs=S=TesT>
>>
>>
>> *ServerResponse*
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:xlink="http://www.w3.org/1999/xlink"
>> xsi:schemaLocation="http://www.opengis.net/ows/1.1
>> http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd"
>> xml:lang="en-US" version="1.1.0">
>> <ows:Exception exceptionCode="NoApplicableCode">
>> <ows:ExceptionText>can't find class ZooWrapper.class
>> </ows:ExceptionText>
>> </ows:Exception>
>> </ows:ExceptionReport>
>> Content-Type: text/xml; charset=utf-8
>> Status: 200 OK
>>
>>
>> Are there any other Java specific settings? Must a classpath env be set?
>> For testing ZooWrapper is in the default package. However, is it
>> possible to store Java classes in jar files under package structure? I
>> couldn't find any specific documentation for Java-based processes.
>>
>>
>> Many thanks in advance,
>> Matthias
>>
>> _______________________________________________
>> Zoo-discuss mailing list
>> Zoo-discuss at gisws.media.osaka-cu.ac.jp
>> <mailto:Zoo-discuss at gisws.media.osaka-cu.ac.jp>
>> http://gisws.media.osaka-cu.ac.jp/mailman/listinfo/zoo-discuss
>
> Gérald Fenoy
> gerald.fenoy at geolabs.fr <mailto:gerald.fenoy at geolabs.fr>
>


-- 
[matthias.lendholt at gfz-potsdam.de]
GFZ German Research Centre for Geosciences
CeGIT Centre for GeoInformation Technology
Tel +49 331 288-1687; FAX +49 331 288-1703
Telegrafenberg A20, 14473 Potsdam, Germany
Blog http://zeigertelegraph.gfz-potsdam.de
Contact MECARD QR Code: http://goo.gl/488J



More information about the Zoo-discuss mailing list