[Zoo-discuss] Service provider packaged as jar

Fenoy Gerald gerald.fenoy at geolabs.fr
Tue May 31 03:33:29 PDT 2016


Dear Rakesh,
sorry for late reply.

You can probably define the jar files your service is depending on, in the CLASSPATH environment variable. This can be done by adding a CLASSPATH key in the [env] section in your main.cfg file. So something like the following should solve your issue:

[env]
CLASSPATH=/the/path/of/you/file.jar:/any/other/depenpendencies.jar


I hope to hear back from you.

Best regards,

> Le 30 mai 2016 à 16:28, rakesh prithiviraj <rakeshuk at outlook.com> a écrit :
> 
> Hi,
> 
> I have a java wps processor (zoo service) that is package as jar file. I used "maven-assembly-plugin" to build a jar file with all its dependencies and I placed the jar file under "/usr/lib/cgi-bin". 
> 
> In the myService.zcfg config file, the service provider (Java Class) is given as follows
>  serviceProvider = com/eoss/core/wpswrapper/WPSWrapperProcessor
> 
> When I execute my service, I get "Class Not Found" exception though the jar file is available under "/usr/lib/cgi-bin" where Zoo kernel is also present. 
> 
> Note in "main.cfg", LD_LIBRARY_PATH points to "/usr/lib/cgi-bin"
> LD_LIBRARY_PATH=/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/:/usr/lib/cgi-bin
> 
> But if I unpack the jar file (which results in several folders being created under /usr/lib/cgi-bin for all the dependencies) then my service is executing as expected.
> 
> Is it possible to use "jar" file instead of unpacking it to execute the service?
> 
> Thanks for your help.
> 
> regards
> 
> 
> _______________________________________________
> Zoo-discuss mailing list
> Zoo-discuss at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/zoo-discuss



Gérald Fenoy
http://wiki.osgeo.org/wiki/User:Djay



More information about the Zoo-discuss mailing list