error in library for ConvexHullDemo process

classic Classic list List threaded Threaded
41 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

soshi
Run->Run configuration->
I used -Pwith-geotools as profile
and goal: install -DSkipTests
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

BenjaminPross
Again, use just with-geotools (not -Pwith-geotools) as profile and it should work.
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

soshi
I did it, but again got error:

2017-07-20 12:16:19,445 [localhost-startStop-1] WARN  org.n52.wps.server.LocalAlgorithmRepository: Algorithm description is not valid: org.n52.wps.demo.ConvexHullDemo
java.lang.Exception: Could not load algorithm org.n52.wps.demo.ConvexHullDemo. ProcessDescription Not Valid.
        at org.n52.wps.server.LocalAlgorithmRepository.loadAlgorithm(LocalAlgorithmRepository.java:106)
        at org.n52.wps.server.LocalAlgorithmRepository.getAlgorithm(LocalAlgorithmRepository.java:75)
        at org.n52.wps.server.LocalAlgorithmRepository.getProcessDescription(LocalAlgorithmRepository.java:141)
        at org.n52.wps.server.RepositoryManager.getProcessDescription(RepositoryManager.java:288)
        at org.n52.wps.server.CapabilitiesConfiguration.initProcessOfferings(CapabilitiesConfiguration.java:261)
        at org.n52.wps.server.CapabilitiesConfiguration.initSkeleton(CapabilitiesConfiguration.java:245)
        at org.n52.wps.server.CapabilitiesConfiguration.getInstance(CapabilitiesConfiguration.java:221)
        at org.n52.wps.server.CapabilitiesConfiguration.getInstance(CapabilitiesConfiguration.java:180)
        at org.n52.wps.server.CapabilitiesConfiguration.getInstance(CapabilitiesConfiguration.java:97)
        at org.n52.wps.server.WebProcessingService.init(WebProcessingService.java:174)
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1194)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1110)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1000)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4918)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5228)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1406)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
2017-07-20 12:16:19,446 [localhost-startStop-1] WARN  org.n52.wps.server.CapabilitiesConfiguration: Exception during instantiation of process org.n52.wps.demo.ConvexHullDemo
java.lang.NullPointerException: null
        at org.n52.wps.server.LocalAlgorithmRepository.getProcessDescription(LocalAlgorithmRepository.java:141) ~[52n-wps-algorithm-3.6.2-SNAPSHOT.jar:na]
        at org.n52.wps.server.RepositoryManager.getProcessDescription(RepositoryManager.java:288) ~[52n-wps-server-3.6.2-SNAPSHOT.jar:na]
        at org.n52.wps.server.CapabilitiesConfiguration.initProcessOfferings(CapabilitiesConfiguration.java:261) [52n-wps-server-3.6.2-SNAPSHOT.jar:na]
        at org.n52.wps.server.CapabilitiesConfiguration.initSkeleton(CapabilitiesConfiguration.java:245) [52n-wps-server-3.6.2-SNAPSHOT.jar:na]
        at org.n52.wps.server.CapabilitiesConfiguration.getInstance(CapabilitiesConfiguration.java:221) [52n-wps-server-3.6.2-SNAPSHOT.jar:na]
        at org.n52.wps.server.CapabilitiesConfiguration.getInstance(CapabilitiesConfiguration.java:180) [52n-wps-server-3.6.2-SNAPSHOT.jar:na]
        at org.n52.wps.server.CapabilitiesConfiguration.getInstance(CapabilitiesConfiguration.java:97) [52n-wps-server-3.6.2-SNAPSHOT.jar:na]
        at org.n52.wps.server.WebProcessingService.init(WebProcessingService.java:174) [52n-wps-server-3.6.2-SNAPSHOT.jar:na]
        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1194) [catalina.jar:9.0.0.M4]
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1110) [catalina.jar:9.0.0.M4]
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1000) [catalina.jar:9.0.0.M4]
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4918) [catalina.jar:9.0.0.M4]
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5228) [catalina.jar:9.0.0.M4]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152) [catalina.jar:9.0.0.M4]
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1406) [catalina.jar:9.0.0.M4]
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396) [catalina.jar:9.0.0.M4]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_77]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_77]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_77]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

BenjaminPross
It works on my machine. Did you use exactly the code that you were posting earlier in this thread or did you maybe modify it?
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

soshi
I modify eralier code with (with-geotools) and run install goal in the project,
I have a question, why Getcapabilities response are different:

server in console (maven project in console):

<?xml version="1.0" encoding="UTF-8"?>

-<wps:Capabilities xml:lang="en-US" updateSequence="1" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsGetCapabilities_response.xsd" version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:xlink="http://www.w3.org/1999/xlink">


-<ows:ServiceIdentification>

<ows:Title>52°North WPS 3.6.2-SNAPSHOT</ows:Title>

<ows:Abstract>Service based on the 52°North implementation of WPS 1.0.0</ows:Abstract>


-<ows:Keywords>

<ows:Keyword>WPS</ows:Keyword>

<ows:Keyword>geospatial</ows:Keyword>

<ows:Keyword>geoprocessing</ows:Keyword>

</ows:Keywords>

<ows:ServiceType>WPS</ows:ServiceType>

<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>

<ows:Fees>NONE</ows:Fees>

<ows:AccessConstraints>NONE</ows:AccessConstraints>

</ows:ServiceIdentification>


-<ows:ServiceProvider>

<ows:ProviderName>52North</ows:ProviderName>

<ows:ProviderSite xlink:href="http://www.52north.org/"/>


-<ows:ServiceContact>

<ows:IndividualName>Your name</ows:IndividualName>

<ows:PositionName>Your position</ows:PositionName>


-<ows:ContactInfo>


-<ows:Phone>

<ows:Voice/>

<ows:Facsimile/>

</ows:Phone>


-<ows:Address>

<ows:DeliveryPoint/>

<ows:City/>

<ows:AdministrativeArea/>

<ows:PostalCode/>

<ows:Country/>

<ows:ElectronicMailAddress/>

</ows:Address>

</ows:ContactInfo>

</ows:ServiceContact>

</ows:ServiceProvider>


-<ows:OperationsMetadata>


-<ows:Operation name="GetCapabilities">


-<ows:DCP>


-<ows:HTTP>

<ows:Get xlink:href="http://localhost:8080/wps/WebProcessingService?"/>

<ows:Post xlink:href="http://localhost:8080/wps/WebProcessingService"/>

</ows:HTTP>

</ows:DCP>

</ows:Operation>


-<ows:Operation name="DescribeProcess">


-<ows:DCP>


-<ows:HTTP>

<ows:Get xlink:href="http://localhost:8080/wps/WebProcessingService?"/>

<ows:Post xlink:href="http://localhost:8080/wps/WebProcessingService"/>

</ows:HTTP>

</ows:DCP>

</ows:Operation>


-<ows:Operation name="Execute">


-<ows:DCP>


-<ows:HTTP>

<ows:Get xlink:href="http://localhost:8080/wps/WebProcessingService?"/>

<ows:Post xlink:href="http://localhost:8080/wps/WebProcessingService"/>

</ows:HTTP>

</ows:DCP>

</ows:Operation>

</ows:OperationsMetadata>


-<wps:ProcessOfferings>


-<wps:Process wps:processVersion="1.1.0">

<ows:Identifier>org.n52.wps.server.algorithm.test.MultiReferenceInputAlgorithm</ows:Identifier>

<ows:Title>for testing multiple inputs by reference</ows:Title>

</wps:Process>


-<wps:Process wps:processVersion="1.0.0">

<ows:Identifier>org.n52.wps.server.algorithm.test.EchoProcess</ows:Identifier>

<ows:Title>Echo process</ows:Title>

</wps:Process>


-<wps:Process wps:processVersion="1.0.0">

<ows:Identifier>org.n52.wps.server.algorithm.process.ExtensionAlgorithm</ows:Identifier>

<ows:Title>org.n52.wps.server.algorithm.process.ExtensionAlgorithm</ows:Title>

</wps:Process>


-<wps:Process wps:processVersion="1.1.0">

<ows:Identifier>org.n52.wps.server.algorithm.test.MultiReferenceBinaryInputAlgorithm</ows:Identifier>

<ows:Title>for testing multiple binary inputs by reference</ows:Title>

</wps:Process>


-<wps:Process wps:processVersion="1.0.0">

<ows:Identifier>org.n52.wps.server.algorithm.test.LongRunningDummyTestClass</ows:Identifier>

<ows:Title>org.n52.wps.server.algorithm.test.LongRunningDummyTestClass</ows:Title>

</wps:Process>


-<wps:Process wps:processVersion="1.1.0">

<ows:Identifier>org.n52.wps.server.algorithm.JTSConvexHullAlgorithm</ows:Identifier>

<ows:Title>org.n52.wps.server.algorithm.JTSConvexHullAlgorithm</ows:Title>

</wps:Process>


-<wps:Process wps:processVersion="1.0.0">

<ows:Identifier>org.n52.wps.server.algorithm.test.MultipleComplexInAndOutputsDummyTestClass</ows:Identifier>

<ows:Title>org.n52.wps.server.algorithm.test.MultipleComplexInAndOutputsDummyTestClass</ows:Title>

</wps:Process>


-<wps:Process wps:processVersion="1.0.0">

<ows:Identifier>org.n52.wps.server.algorithm.process.JTSBufferAlgorithm</ows:Identifier>

<ows:Title>org.n52.wps.server.algorithm.process.JTSBufferAlgorithm</ows:Title>

</wps:Process>


-<wps:Process wps:processVersion="1.0.0">

<ows:Identifier>org.n52.wps.demo.ImageInhance</ows:Identifier>

<ows:Title>org.n52.wps.demo.ImageInhance</ows:Title>

</wps:Process>


-<wps:Process wps:processVersion="1.0.0">

<ows:Identifier>org.n52.wps.server.algorithm.test.DummyTestClass</ows:Identifier>

<ows:Title>org.n52.wps.server.algorithm.test.DummyTestClass</ows:Title>

</wps:Process>

</wps:ProcessOfferings>


-<wps:Languages>


-<wps:Default>

<ows:Language>en-US</ows:Language>

</wps:Default>


-<wps:Supported>

<ows:Language>en-US</ows:Language>

</wps:Supported>

</wps:Languages>

</wps:Capabilities>


when I put war file of 52north wps in Tomcat out of eclipse, and get GetCapabilities response:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<wps:Capabilities xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WPS" version="1.0.0" xml:lang="en-US" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsGetCapabilities_response.xsd" updateSequence="1">
<ows:ServiceIdentification>
<ows:Title>52°North WPS 3.6.2-SNAPSHOT</ows:Title>
<ows:Abstract>
Service based on the 52°North implementation of WPS 1.0.0
</ows:Abstract>
<ows:Keywords>
<ows:Keyword>WPS</ows:Keyword>
<ows:Keyword>geospatial</ows:Keyword>
<ows:Keyword>geoprocessing</ows:Keyword>
</ows:Keywords>
<ows:ServiceType>WPS</ows:ServiceType>
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
<ows:Fees>NONE</ows:Fees>
<ows:AccessConstraints>NONE</ows:AccessConstraints>
</ows:ServiceIdentification>
<ows:ServiceProvider>
<ows:ProviderName>52North</ows:ProviderName>
<ows:ProviderSite xlink:href="http://www.52north.org/"/>
<ows:ServiceContact>
<ows:IndividualName>Your name</ows:IndividualName>
<ows:PositionName>Your position</ows:PositionName>
<ows:ContactInfo>
<ows:Phone>
<ows:Voice/>
<ows:Facsimile/>
</ows:Phone>
<ows:Address>
<ows:DeliveryPoint/>
<ows:City/>
<ows:AdministrativeArea/>
<ows:PostalCode/>
<ows:Country/>
<ows:ElectronicMailAddress/>
</ows:Address>
</ows:ContactInfo>
</ows:ServiceContact>
</ows:ServiceProvider>
<ows:OperationsMetadata>
<ows:Operation name="GetCapabilities">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="http://localhost:8080/wps/WebProcessingService?"/>
<ows:Post xlink:href="http://localhost:8080/wps/WebProcessingService"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="DescribeProcess">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="http://localhost:8080/wps/WebProcessingService?"/>
<ows:Post xlink:href="http://localhost:8080/wps/WebProcessingService"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="Execute">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="http://localhost:8080/wps/WebProcessingService?"/>
<ows:Post xlink:href="http://localhost:8080/wps/WebProcessingService"/>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
</ows:OperationsMetadata>
<wps:ProcessOfferings>
<wps:Process wps:processVersion="1.1.0">
<ows:Identifier>
org.n52.wps.server.algorithm.test.MultiReferenceInputAlgorithm
</ows:Identifier>
<ows:Title>for testing multiple inputs by reference</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>
org.n52.wps.server.algorithm.coordinatetransform.CoordinateTransformAlgorithm
</ows:Identifier>
<ows:Title>
org.n52.wps.server.algorithm.coordinatetransform.CoordinateTransformAlgorithm
</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>org.n52.wps.server.algorithm.test.EchoProcess</ows:Identifier>
<ows:Title>Echo process</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>
org.n52.wps.server.algorithm.simplify.DouglasPeuckerAlgorithm
</ows:Identifier>
<ows:Title>
org.n52.wps.server.algorithm.simplify.DouglasPeuckerAlgorithm
</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>
org.n52.wps.server.algorithm.intersection.IntersectionAlgorithm
</ows:Identifier>
<ows:Title>
org.n52.wps.server.algorithm.intersection.IntersectionAlgorithm
</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>
org.n52.wps.server.algorithm.test.LongRunningDummyTestClass
</ows:Identifier>
<ows:Title>
org.n52.wps.server.algorithm.test.LongRunningDummyTestClass
</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>org.n52.wps.server.algorithm.test.DummyTestClass</ows:Identifier>
<ows:Title>org.n52.wps.server.algorithm.test.DummyTestClass</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>
org.n52.wps.server.algorithm.spatialquery.IntersectsAlgorithm
</ows:Identifier>
<ows:Title>
org.n52.wps.server.algorithm.spatialquery.IntersectsAlgorithm
</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.1.0">
<ows:Identifier>
org.n52.wps.server.algorithm.test.MultiReferenceBinaryInputAlgorithm
</ows:Identifier>
<ows:Title>for testing multiple binary inputs by reference</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>
org.n52.wps.server.algorithm.convexhull.ConvexHullAlgorithm
</ows:Identifier>
<ows:Title>
org.n52.wps.server.algorithm.convexhull.ConvexHullAlgorithm
</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.1.0">
<ows:Identifier>org.n52.wps.server.algorithm.SimpleBufferAlgorithm</ows:Identifier>
<ows:Title>org.n52.wps.server.algorithm.SimpleBufferAlgorithm</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.1.0">
<ows:Identifier>
org.n52.wps.server.algorithm.JTSConvexHullAlgorithm
</ows:Identifier>
<ows:Title>
org.n52.wps.server.algorithm.JTSConvexHullAlgorithm
</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>
org.n52.wps.server.algorithm.test.MultipleComplexInAndOutputsDummyTestClass
</ows:Identifier>
<ows:Title>
org.n52.wps.server.algorithm.test.MultipleComplexInAndOutputsDummyTestClass
</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>org.n52.wps.demo.ConvexHullDemo</ows:Identifier>
<ows:Title>org.n52.wps.demo.ConvexHullDemo</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>
org.n52.wps.server.algorithm.spatialquery.TouchesAlgorithm
</ows:Identifier>
<ows:Title>
org.n52.wps.server.algorithm.spatialquery.TouchesAlgorithm
</ows:Title>
</wps:Process>
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>
org.n52.wps.server.algorithm.raster.AddRasterValues
</ows:Identifier>
<ows:Title>
org.n52.wps.server.algorithm.raster.AddRasterValues
</ows:Title>
</wps:Process>
</wps:ProcessOfferings>
<wps:Languages>
<wps:Default>
<ows:Language>en-US</ows:Language>
</wps:Default>
<wps:Supported>
<ows:Language>en-US</ows:Language>
</wps:Supported>
</wps:Languages>
</wps:Capabilities>

It's confusing....processes are different!!!!!!!!!!
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

BenjaminPross
I suspect that in the first case, the project is build/run without GeoTools. You can set the profile in the properties of the 52n-wps-webapp module.
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

soshi
Thanks very much dear,  
it was really hopefull, finally it works...
I understand for writing a process with geotools libray, we should set profile (with-geotools) in properties of project.
actually, my goal is to write a process that set a image (tiff or png) as input and output parameters.
should I use geotools library for doing that?
how can I solve that?
can you introduce me a document or link to do that, please...
I really appreciate you,
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

BenjaminPross
Sure, you could look at the AddRasterValues process:

http://localhost:8080/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&version=1.0.0&identifier=org.n52.wps.server.algorithm.raster.AddRasterValues

You can find the code in the 52n-wps-algorithm-geotools module.
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

soshi
Thanks, but how can I get request xml in wps client ?
should I write a client java class in 52n-wps-client-lib? and then what will happen?
could you explain more about steps in order to getting request xml from server in wps client UI?
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

BenjaminPross
I'm not quite sure, what you mean. Do you want to create XML? What kind of request? Or do you want to connect to the WPS using the Java client library? We also do have some tutorials: https://wiki.52north.org/Geoprocessing/GeoprocessingTutorials
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

soshi
I read this tutorial, but got a little bit confused...
I wanna show all of request and response for wps process (Getcapabilities, describe process, execute process) in wps client in web browser,
supposing in web browser I choose a request xml and send to the server, so I receive response.  
I think, I will need to build xml requests to put in 52n-wps-webapp/webapp/requests and then run them from web browser. should I build xml response for that or just requsts?
or maybe I should write a client to connect to server and then produced xml output for request and response, save them in document with format xml and put them into request folder/webapp branch?
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

soshi
ok, got it.
The easiest way is that to build an xml client file,
so, could you introduce me how to write an xml file to read two images on the web?? and then send to server and get response?
Is there a sample around it?
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

BenjaminPross
Here's an example execute-request for the AddRasterValues process. You can test it with the following service or your local instance: http://geoprocessing.demo.52north.org:8080/latest-wps/test.html

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wps:Execute service="WPS" version="1.0.0" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
  http://schemas.opengis.net/wps/1.0.0/wpsExecute_request.xsd">
  <ows:Identifier>org.n52.wps.server.algorithm.raster.AddRasterValues</ows:Identifier>
  <wps:DataInputs>
  <wps:Input>
      <ows:Identifier xmlns:ns1="http://www.opengis.net/ows/1.1">dataset1</ows:Identifier>
        <wps:Reference xlink:href="http://geoprocessing.demo.52north.org:8080/geoserver/nurc/wms?service=WMS&amp;version=1.1.0&amp;request=GetMap&amp;layers=nurc:Img_Sample&amp;styles=&amp;bbox=-130.85168,20.7052,-62.0054,54.1141&amp;width=680&amp;height=330&amp;srs=EPSG:4326&amp;format=image%2Fgeotiff" mimeType="image/geotiff" />
    </wps:Input>
  <wps:Input>
      <ows:Identifier xmlns:ns1="http://www.opengis.net/ows/1.1">dataset2</ows:Identifier>
        <wps:Reference xlink:href="http://geoprocessing.demo.52north.org:8080/geoserver/nurc/wms?service=WMS&amp;version=1.1.0&amp;request=GetMap&amp;layers=nurc:Img_Sample&amp;styles=&amp;bbox=-130.85168,20.7052,-62.0054,54.1141&amp;width=680&amp;height=330&amp;srs=EPSG:4326&amp;format=image%2Fgeotiff" mimeType="image/geotiff" />
    </wps:Input>
  </wps:DataInputs>
  <wps:ResponseForm>
    <wps:RawDataOutput mimeType="image/geotiff">
      <ows:Identifier>result</ows:Identifier>
    </wps:RawDataOutput>
  </wps:ResponseForm>
</wps:Execute>
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

soshi
Thanks,
I used xml request in  demo wps (http://geoprocessing.demo.52north.org:8080/latest-wps/test.html), but got error:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1" version="1.0.0">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>
There went something wrong with parsing the POST data: The processing instruction target matching "[xX][mM][lL]" is not allowed.
</ows:ExceptionText>
</ows:Exception>
<ows:Exception exceptionCode="JAVA_StackTrace">
<ows:ExceptionText>
org.n52.wps.server.ExceptionReport: There went something wrong with parsing the POST data: The processing instruction target matching "[xX][mM][lL]" is not allowed. at org.n52.wps.server.handler.RequestHandler.<init>(RequestHandler.java:233) at org.n52.wps.server.WebProcessingService.doPost(WebProcessingService.java:331) at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) at org.n52.wps.server.WebProcessingService.service(WebProcessingService.java:362) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:169) at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:232) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) Caused by: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 6; The processing instruction target matching "[xX][mM][lL]" is not allowed. at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at javax.xml.parsers.DocumentBuilder.parse(Unknown Source) at org.n52.wps.server.handler.RequestHandler.<init>(RequestHandler.java:187) ... 30 more
</ows:ExceptionText>
</ows:Exception>
<ows:Exception exceptionCode="JAVA_RootCause">
<ows:ExceptionText>
The processing instruction target matching "[xX][mM][lL]" is not allowed.
</ows:ExceptionText>
<ows:ExceptionText>
org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 6; The processing instruction target matching "[xX][mM][lL]" is not allowed. at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at javax.xml.parsers.DocumentBuilder.parse(Unknown Source) at org.n52.wps.server.handler.RequestHandler.<init>(RequestHandler.java:187) at org.n52.wps.server.WebProcessingService.doPost(WebProcessingService.java:331) at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) at org.n52.wps.server.WebProcessingService.service(WebProcessingService.java:362) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:169) at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:232) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

BenjaminPross
Works for me. Make sure, you only copy the XML and that there are no other characters in the text area where you put the request.
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

soshi
In reply to this post by soshi
what's the user and password for wps (http://geoprocessing.demo.52north.org:8080/latest-wps/index.html ) and also for geoserver ??? for seeing how to configure geoserver on wps admin console.
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

soshi
what was your output??? File or image/geotiff
I received a File (with File format) that it's content wasn't clear...
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

BenjaminPross
It is a geotiff. Just rename the file to something.tif
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

soshi
Thank you very much..
another question:
I'm going to send a request xml using Get coverage from geoserver for earlier process, so I saved tif image in goserver and tried running it but it got error,

request:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<wps:Execute service="WPS" version="1.0.0"
        xmlns:wps="http://www.opengis.net/wps/1.0.0"
        xmlns:ows="http://www.opengis.net/ows/1.1"
        xmlns:ogc="http://www.opengis.net/ogc"
        xmlns:xlink="http://www.w3.org/1999/xlink"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsExecute_request.xsd">
        <ows:Identifier>org.n52.wps.server.algorithm.raster.AddRasterValues</ows:Identifier>
        <wps:DataInputs>
                <wps:Input>
                        <ows:Identifier>dataset1</ows:Identifier>
                        <wps:Reference xlink:href="http://localhost:8080/geoserver/wcs" mimeType="image/tiff">
                                <wps:Body>
                                        <GetCoverage version="1.0.0" service="WCS"
                                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                                xmlns="http://www.opengis.net/wcs"
                                                xmlns:ows="http://www.opengis.net/ows/1.1"
                                                xmlns:gml="http://www.opengis.net/gml"
                                                xmlns:ogc="http://www.opengis.net/ogc" xsi:schemaLocation="http://www.opengis.net/wcs http://schemas.opengis.net/wcs/1.0.0/getCoverage.xsd">
                                                <sourceCoverage>satellite_Image:jask</sourceCoverage>
                                                          <domainSubset>
                                                            <spatialSubset>
                                                              <gml:Envelope srsName="EPSG:4326">
                                                                <gml:pos>57.75787353515625 25.62914524750722</gml:pos>
                                                                <gml:pos>57.83752675448401 25.67618668252546</gml:pos>
                                                              </gml:Envelope>
                                                              <gml:Grid dimension="2">
                                                                <gml:limits>
                                                                  <gml:GridEnvelope>
                                                                    <gml:low>0 0</gml:low>
                                                                    <gml:high>8236 4864</gml:high>
                                                                  </gml:GridEnvelope>
                                                                </gml:limits>
                                                                <gml:axisName>x</gml:axisName>
                                                                <gml:axisName>y</gml:axisName>
                                                              </gml:Grid>
                                                            </spatialSubset>
                                                          </domainSubset>
                                                <output>
                                                        <crs>EPSG:4326</crs>
                                                        <format>GeoTIFF</format>
                                                </output>
                                        </GetCoverage>
                                </wps:Body>
                        </wps:Reference>
                </wps:Input>
                <wps:Input>
                        <ows:Identifier>dataset2</ows:Identifier>
                        <wps:Reference xlink:href="http://localhost:8080/geoserver/wcs" mimeType="image/tiff">
                                <wps:Body>
                                        <GetCoverage version="1.0.0" service="WCS"
                                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                                xmlns="http://www.opengis.net/wcs"
                                                xmlns:ows="http://www.opengis.net/ows/1.1"
                                                xmlns:gml="http://www.opengis.net/gml"
                                                xmlns:ogc="http://www.opengis.net/ogc" xsi:schemaLocation="http://www.opengis.net/wcs http://schemas.opengis.net/wcs/1.0.0/getCoverage.xsd">
                                                <sourceCoverage>satellite_Image:world</sourceCoverage>
                                                  <domainSubset>
                                                    <spatialSubset>
                                                      <gml:Envelope srsName="EPSG:4326">
                                                        <gml:pos>-180.0 -90.000000000036</gml:pos>
                                                        <gml:pos>180.00000000007202 90.00000000000001</gml:pos>
                                                      </gml:Envelope>
                                                      <gml:Grid dimension="2">
                                                        <gml:limits>
                                                          <gml:GridEnvelope>
                                                            <gml:low>0 0</gml:low>
                                                            <gml:high>21600 10800</gml:high>
                                                          </gml:GridEnvelope>
                                                        </gml:limits>
                                                        <gml:axisName>x</gml:axisName>
                                                        <gml:axisName>y</gml:axisName>
                                                      </gml:Grid>
                                                    </spatialSubset>
                                                  </domainSubset>
                                                <output>
                                                        <crs>EPSG:4326</crs>
                                                        <format>GeoTIFF</format>
                                                </output>
                                        </GetCoverage>
                                </wps:Body>
                        </wps:Reference>
                </wps:Input>
        </wps:DataInputs>
        <wps:ResponseForm>
                <wps:RawDataOutput mimeType="image/geotiff" encoding="UTF-8">
                        <ows:Identifier>result</ows:Identifier>
                </wps:RawDataOutput>
        </wps:ResponseForm>
</wps:Execute>


error response:

<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1" version="1.0.0">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>
Error while executing the embedded process for: org.n52.wps.server.algorithm.raster.AddRasterValues
</ows:ExceptionText>
</ows:Exception>
<ows:Exception exceptionCode="JAVA_StackTrace">
<ows:ExceptionText>
org.n52.wps.server.ExceptionReport: Error while executing the embedded process for: org.n52.wps.server.algorithm.raster.AddRasterValues at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:716) at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:92) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: org.geotools.data.DataSourceException at org.n52.wps.io.datahandler.parser.GeotiffParser.parseTiff(GeotiffParser.java:119) at org.n52.wps.io.datahandler.parser.GeotiffParser.parse(GeotiffParser.java:103) at org.n52.wps.io.datahandler.parser.GeotiffParser.parse(GeotiffParser.java:67) at org.n52.wps.server.request.InputHandler.handleComplexValueReference(InputHandler.java:1211) at org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:167) at org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:88) at org.n52.wps.server.request.InputHandler$Builder.build(InputHandler.java:119) at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:662) ... 5 more Caused by: org.geotools.data.DataSourceException at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:238) at org.n52.wps.io.datahandler.parser.GeotiffParser.parseTiff(GeotiffParser.java:114) ... 12 more Caused by: org.geotools.data.DataSourceException at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:402) at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:225) ... 13 more Caused by: java.lang.ArrayIndexOutOfBoundsException
</ows:ExceptionText>
</ows:Exception>
<ows:Exception exceptionCode="JAVA_RootCause">
<ows:ExceptionText>org.geotools.data.DataSourceException</ows:ExceptionText>
<ows:ExceptionText>
java.lang.RuntimeException: org.geotools.data.DataSourceException at org.n52.wps.io.datahandler.parser.GeotiffParser.parseTiff(GeotiffParser.java:119) at org.n52.wps.io.datahandler.parser.GeotiffParser.parse(GeotiffParser.java:103) at org.n52.wps.io.datahandler.parser.GeotiffParser.parse(GeotiffParser.java:67) at org.n52.wps.server.request.InputHandler.handleComplexValueReference(InputHandler.java:1211) at org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:167) at org.n52.wps.server.request.InputHandler.<init>(InputHandler.java:88) at org.n52.wps.server.request.InputHandler$Builder.build(InputHandler.java:119) at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:662) at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:92) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.geotools.data.DataSourceException at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:238) at org.n52.wps.io.datahandler.parser.GeotiffParser.parseTiff(GeotiffParser.java:114) ... 12 more Caused by: org.geotools.data.DataSourceException at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:402) at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:225) ... 13 more Caused by: java.lang.ArrayIndexOutOfBoundsException
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
Reply | Threaded
Open this post in threaded view
|

Re: error in library for ConvexHullDemo process

BenjaminPross
Seems to be a problem with parsing the geotiff. I cannot say anything else without taking a look at the geotiff..
123