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

Gérald Fenoy gerald.fenoy at geolabs.fr
Thu May 5 07:47:21 PDT 2011


Dear Matthias, 
many thanks for you feedbacks.

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

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. 

Note that the CLASSPATH should automatically be updated to add the directory 
where the ZOO-Kernel is located.

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
> 
> 
> *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
> http://gisws.media.osaka-cu.ac.jp/mailman/listinfo/zoo-discuss

Gérald Fenoy
gerald.fenoy at geolabs.fr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20110505/178eb1b4/attachment.html>


More information about the Zoo-discuss mailing list