Error in wps response

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Error in wps response

soshi
Hello all,
I added a process in 52north wps source code in using eclipse, but while
running, it got error....
myprocess dosen't exist in getCapabilities response... why???

what should I do, some process exist in getCapabilities response...
could anyone help me, please....
thanks in advance....



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

soshi
I also set with-geotools in
web-app->propertise->maven->profile:with-geotools..
and put the <Property name="Algorithm"
active="true">org.n52.wps.server.algorithm.raster.Registration</Property>
in wps_cofing_geotools.xml as well.

submodule: 52n-wps-algorithm-geotools
here's GetCapablities response:

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

<ows:Identifier>org.n52.wps.server.r.test.geo</ows:Identifier>

<ows:Title>Test script for geospatial data output</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.demo.uniform.table</ows:Identifier>

<ows:Title>Random number generator</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.test.csv</ows:Identifier>

<ows:Title>Test script for csv output</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.geo.poly.intersection</ows:Identifier>

<ows:Title>id</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.demo.meuse.rdata</ows:Identifier>

<ows:Title>Script that returns meuse data as rdata-files</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.demo.idw</ows:Identifier>

<ows:Title>Inverse Distance Interpolation in R</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.demo.sweaveFoo</ows:Identifier>

<ows:Title>Creates a pdf report based on a simple Sweave file</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.demo.timeseriesPlot</ows:Identifier>

<ows:Title>Plot SOS Time Series</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.demo.interpolation.jsclient</ows:Identifier>

<ows:Title>Interpolation</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.test.resources</ows:Identifier>

<ows:Title>Resources-Tester</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.test.image</ows:Identifier>

<ows:Title>demo image process generating a plot of the Meuse
dataset</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.test.wpsOff</ows:Identifier>

<ows:Title>dummy process for testing wps.off annotations</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.demo.uniform.simple</ows:Identifier>

<ows:Title>A Simple WPS Process</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.netCDF_aggregation</ows:Identifier>

<ows:Title>Process for aggregation of netCDF file data</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.demo.image</ows:Identifier>

<ows:Title>demo image process generating a plot of the Meuse
dataset</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.test.warnings</ows:Identifier>

<ows:Title>Warnings-Tester</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.test.echo</ows:Identifier>

<ows:Title>dummy echo process</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.test.session</ows:Identifier>

<ows:Title>Test script for session variables</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.test.defaults</ows:Identifier>

<ows:Title>dummy process</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.uncertweb.make-realizations</ows:Identifier>

<ows:Title>Realization process UncertWeb</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.eo2hAirQuality</ows:Identifier>

<ows:Title>creates a coverage with interpolated air quality parameters from
a SOS</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.test.calculator</ows:Identifier>

<ows:Title>process for misusing R as a calculator</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.demo.pegelReport</ows:Identifier>

<ows:Title>Gauge Report</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.enviroCar_osmMatching</ows:Identifier>

<ows:Title>envirocar track to OSM streets matching</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.highlight</ows:Identifier>

<ows:Title>Transforms an R script into HTML/CSS with syntax highlights using
the highlight package</ows:Title>

</wps:Process>


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

<ows:Identifier>org.n52.wps.server.r.geo.poly.attribute-sum</ows:Identifier>

<ows:Title>Sum of attributes for Polygons</ows:Title>

</wps:Process>


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



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

BenjaminPross
In reply to this post by soshi
What kind of error did you get? How does your process look?



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

soshi
firstly, I got error when build the java source code in eclipse:

[ERROR]
java.lang.IllegalArgumentException: One of setGitDir or setWorkTree must be
called.
        at
org.eclipse.jgit.lib.BaseRepositoryBuilder.requireGitDirOrWorkTree(BaseRepositoryBuilder.java:582)
        at
org.eclipse.jgit.lib.BaseRepositoryBuilder.setup(BaseRepositoryBuilder.java:550)
        at
org.eclipse.jgit.storage.file.FileRepositoryBuilder.build(FileRepositoryBuilder.java:89)
        at
ru.concerteza.util.buildnumber.BuildNumberExtractor.extract(BuildNumberExtractor.java:38)
        at
ru.concerteza.util.buildnumber.JGitBuildNumberMojo.execute(JGitBuildNumberMojo.java:118)
        at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

but build was successful. and run on server:

SEVERE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: ij/process/ImageProcessor
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
        at java.lang.Class.getConstructor0(Class.java:3075)
        at java.lang.Class.newInstance(Class.java:412)
        at
org.n52.wps.server.LocalAlgorithmRepository.loadAlgorithm(LocalAlgorithmRepository.java:94)
        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)
Caused by: java.lang.ClassNotFoundException: ij.process.ImageProcessor
        at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1297)
        at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1131)
        ... 26 more

Sep 13, 2017 12:21:03 PM org.apache.catalina.core.StandardContext
loadOnStartup
SEVERE: Servlet [wpsServlet] in web application [/52n-wps-webapp] threw
load() exception
java.lang.ClassNotFoundException: ij.process.ImageProcessor
        at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1297)
        at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1131)
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
        at java.lang.Class.getConstructor0(Class.java:3075)
        at java.lang.Class.newInstance(Class.java:412)
        at
org.n52.wps.server.LocalAlgorithmRepository.loadAlgorithm(LocalAlgorithmRepository.java:94)
        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)

and GetCapabilities request is caused a problem (an error in console) :

Sep 13, 2017 12:22:29 PM org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet [wpsServlet] in context with path
[/52n-wps-webapp] threw exception [Servlet execution threw an exception]
with root cause
java.lang.ClassNotFoundException: ij.process.ImageProcessor
        at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1297)
        at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1131)
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
        at java.lang.Class.getConstructor0(Class.java:3075)
        at java.lang.Class.newInstance(Class.java:412)
        at
org.n52.wps.server.LocalAlgorithmRepository.loadAlgorithm(LocalAlgorithmRepository.java:94)
        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:200)
        at
org.n52.wps.server.response.CapabilitiesResponse.getAsStream(CapabilitiesResponse.java:61)
        at
org.n52.wps.server.handler.RequestHandler.handle(RequestHandler.java:365)
        at
org.n52.wps.server.WebProcessingService.doGet(WebProcessingService.java:245)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
        at
org.n52.wps.server.WebProcessingService.service(WebProcessingService.java:363)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at
org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:410)
        at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:169)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        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:192)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
        at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1096)
        at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:760)
        at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1480)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

soshi
The process didn't have any error whan I build that, I added a jar file to
submodule (52n-wps-algorithm-geotools) manually...without adding in pom
file..

the process is here:

/**
 * Copyright (C) 2007 - 2016 52°North Initiative for Geospatial Open Source
 * Software GmbH
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published
 * by the Free Software Foundation.
 *
 * If the program is linked with libraries which are licensed under one of
 * the following licenses, the combination of the program with the linked
 * library is not considered a "derivative work" of the program:
 *
 *       • Apache License, version 2.0
 *       • Apache Software License, version 1.0
 *       • GNU Lesser General Public License, version 3
 *       • Mozilla Public License, versions 1.0, 1.1 and 2.0
 *       • Common Development and Distribution License (CDDL), version 1.0
 *
 * Therefore the distribution of the program linked with libraries licensed
 * under the aforementioned licenses, is permitted by the copyright holders
 * if the distribution is compliant with both the GNU General Public
 * License version 2 and the aforementioned licenses.
 *
 * As an exception to the terms of the GPL, you may copy, modify,
 * propagate, and distribute a work formed by combining 52°North WPS
 * GeoTools Modules with the Eclipse Libraries, or a work derivative of
 * such a combination, even if such copying, modification, propagation, or
 * distribution would otherwise violate the terms of the GPL. Nothing in
 * this exception exempts you from complying with the GPL in all respects
 * for all of the code used other than the Eclipse Libraries. You may
 * include this exception and its grant of permissions when you distribute
 * 52°North WPS GeoTools Modules. Inclusion of this notice with such a
 * distribution constitutes a grant of such permissions. If you do not wish
 * to grant these permissions, remove this paragraph from your
 * distribution. "52°North WPS GeoTools Modules" means the 52°North WPS
 * modules using GeoTools functionality - software licensed under version 2
 * or any later version of the GPL, or a work based on such software and
 * licensed under the GPL. "Eclipse Libraries" means Eclipse Modeling
 * Framework Project and XML Schema Definition software distributed by the
 * Eclipse Foundation and licensed under the Eclipse Public License Version
 * 1.0 ("EPL"), or a work based on such software and licensed under the EPL.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 * Public License for more details.
 */
package org.n52.wps.server.algorithm.raster;

import java.awt.Graphics;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.RenderedImage;
import java.awt.image.WritableRaster;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import java.util.Vector;

import javax.media.jai.JAI;
import javax.media.jai.RenderedOp;
import javax.media.jai.TiledImage;

import org.geotools.coverage.grid.GridCoverage2D;
import org.geotools.coverage.grid.GridCoverageFactory;
import org.geotools.feature.FeatureCollection;
import
org.geotools.referencing.operation.builder.InverseProjectiveTransform;
import org.geotools.referencing.operation.matrix.GeneralMatrix;
import org.n52.wps.io.data.IData;
import org.n52.wps.io.data.binding.complex.GTRasterDataBinding;
import org.n52.wps.io.data.binding.complex.GTVectorDataBinding;
import org.n52.wps.server.AbstractSelfDescribingAlgorithm;
import org.opengis.coverage.grid.GridCoverage;

import ij.IJ;
import ij.ImagePlus;
import ij.process.FloatProcessor;
import ij.process.ImageProcessor;
import mpicbg.imagefeatures.Feature;
import mpicbg.imagefeatures.FloatArray2D;
import mpicbg.imagefeatures.FloatArray2DSIFT;
import mpicbg.imagefeatures.FloatArray2DScaleOctave;
import mpicbg.imagefeatures.ImageArrayConverter;
import mpicbg.models.PointMatch;

public class Registration extends AbstractSelfDescribingAlgorithm{


        public Class getInputDataType(String id) {
                return GTRasterDataBinding.class;
        }

        public Class getOutputDataType(String id) {
                return GTRasterDataBinding.class;
        }

        @Override
        public List<String> getInputIdentifiers() {
                List<String> identifierList =  new ArrayList<String>();
                identifierList.add("dataset1");
                identifierList.add("dataset2");
                return identifierList;
        }

        @Override
        public List<String> getOutputIdentifiers() {
                List<String> identifierList =  new ArrayList<String>();
                identifierList.add("result");
                return identifierList;
        }


        @Override
        public Map<String, IData> run(Map<String, List&lt;IData>> inputData) {
                if(inputData==null || !inputData.containsKey("dataset1")){
                        throw new RuntimeException("Error while allocating input parameters");
                }
               
                if(inputData==null || !inputData.containsKey("dataset2")){
                        throw new RuntimeException("Error while allocating input parameters");
                }
               
                List<IData> dataList1 = inputData.get("dataset1");
                if(dataList1 == null || dataList1.size() != 1){
                        throw new RuntimeException("Error while allocating input parameters");
                }
               
                List<IData> dataList2 = inputData.get("dataset2");
                if(dataList2 == null || dataList2.size() != 1){
                        throw new RuntimeException("Error while allocating input parameters");
                }
               
                IData dataset1 = dataList1.get(0);
                GridCoverage2D gridCoverage1 = (GridCoverage2D) dataset1.getPayload();
                RenderedImage image1 = gridCoverage1.getRenderedImage();
               
                IData dataset2 = dataList2.get(0);
                GridCoverage2D gridCoverage2 = (GridCoverage2D) dataset2.getPayload();
                RenderedImage image2 = gridCoverage2.getRenderedImage();
               
                //************** sift process **********************
               
                // convert RenderedImage to BufferedImage
                BufferedImage bf1 = convertRenderedImage(image1);
                BufferedImage bf2 = convertRenderedImage(image2);
               
                // convert BufferedImage to ImageProcessor
                float[][] arr1 = new float[1280][960];
                float[][] arr2 = new float[1280][960];

            for(int i = 0; i < 1280; i++){
              for(int j = 0; j < 960; j++){
                   arr1[i][j] = bf1.getRGB(i, j);
              }
            }
           
            for(int i = 0; i < 1280; i++){
                      for(int j = 0; j < 960; j++){
                           arr2[i][j] = bf2.getRGB(i, j);
                      }
                    }
           
            ImageProcessor ip1 = new FloatProcessor(arr1);
            ImageProcessor ip2 = new FloatProcessor(arr2);
           
            // convert ImageProcessor to FloatArray2D (conversion data:int-->float)
            int pixelCount = ip1.getWidth() * ip1.getHeight();
            float pixels[] = new float[pixelCount];
            int count = 0;
            for (int x = 0;x < ip1.getWidth(); x++) {
            for (int y = 0; y < ip1.getHeight(); y++) {
                float pixelValue = ip1.getPixelValue(x, y); //get pixel
values
                pixels[count] = (short) pixelValue;
                //System.out.println("value:" + pixels[count]);
                count ++;    
           }
        }
           
            int pixelCount1 = ip2.getWidth() * ip2.getHeight();
        float pixels1[] = new float[pixelCount1];
        int count1 = 0;
        for (int x = 0;x < ip2.getWidth(); x++) {
        for (int y = 0; y < ip2.getHeight(); y++) {
                float pixelValue1 = ip2.getPixelValue(x, y);
                pixels1[count1] = (short) pixelValue1;
                //System.out.println("value:" + pixels[count1]);
                count1 ++;
            }
        }
       
        FloatArray2D fa1 = new FloatArray2D(pixels, ip1.getWidth(),
ip1.getHeight());
        FloatArray2D fa2 = new FloatArray2D(pixels1, ip2.getWidth(),
ip2.getHeight());
        int fa_height =  fa1.height;
        int fa_width = fa1.width;
        ImageArrayConverter iac = new ImageArrayConverter();
       
        iac.imageProcessorToFloatArray2DCropAndNormalize(ip1, fa1);  
        iac.imageProcessorToFloatArray2DCropAndNormalize(ip2, fa2);
       
        int step = 4;
        float initial_sigma = (float) 1.6;
        boolean bool = false;
       
        // sift algorithm
        mpicbg.imagefeatures.FloatArray2DSIFT.Param p = new
mpicbg.imagefeatures.FloatArray2DSIFT.Param();
        FloatArray2DSIFT faSIFT1 = new FloatArray2DSIFT(p);   //defining
descriptor parameters
        FloatArray2DSIFT faSIFT2 = new FloatArray2DSIFT(p);
       
        //FloatArray2DScaleOctave getOcatave = faSIFT.getOctave(step);
        faSIFT1.init(fa1);    // initialize the scale space as a scale
pyramid having octave stubs only
        faSIFT2.init(fa2);
        Vector<Feature> feature1 = faSIFT1.run();   //build scale
octave,detect candidates,
        Vector<Feature> feature2 = faSIFT2.run();
        //int max_sizeOctave = faSIFT.getMaxOctaveSize();
        FloatArray2DScaleOctave[] octaves = faSIFT1.getOctaves(); //octaved
scale space
       
        float rod = (float) 0.6;  //rod Ratio of distances (closest/next
closest match)
       
        Vector< PointMatch > PointMatch = faSIFT1.createMatches(feature1,
feature2, rod);  //Identify corresponding features
       
      //---------------show points
match--------------------------------------
               
               ArrayList<Double> list_p1 = new ArrayList<Double>();
               ArrayList<Double> list_p2 = new ArrayList<Double>();
               
                for (int i = 0; i < PointMatch.size(); i++) {
               
                double p1_x = PointMatch.get(i).getP1().getL()[0];
                double p1_y = PointMatch.get(i).getP1().getL()[1];
                double p2_x = PointMatch.get(i).getP2().getL()[0];
                double p2_y = PointMatch.get(i).getP2().getL()[1];
               
                             list_p1.add(p1_x);
                             list_p1.add(p1_y);
                             list_p2.add(p2_x);
                             list_p2.add(p2_y);
                             
                                }
               
              System.out.println("list_p1:" + list_p1);
              System.out.println("list_p2:" + list_p2);
              System.out.println("number of PointMatch:" + PointMatch.size());
             
             
            //-----------------Inverse Transformation-------------------------
                InverseProjectiveTransform ipt = new InverseProjectiveTransform();
                GeneralMatrix AI = ipt.fillAMatrix(PointMatch);
                GeneralMatrix XI = ipt.fillXMatrix(PointMatch);
               
                double[] resI = ipt.calculateLSM(PointMatch, AI, XI);     //
projective coefficients
               
               
                GeneralMatrix mI = ipt.getProjectiveMatrix(resI);
                System.out.println("projective coefficients: ");
                System.out.println(mI);
               
                //MathTransform k = ptb.computeMathTransform(m);
               // System.out.println(k);
               
                //ArrayList<Double> list_xyI = ipt.ProjectiveInverse(resI, dx, dy,
small_x, Small_y);
                //System.out.println("list_xy: " + list_xyI);
               
                ArrayList<Double> list_xy = new ArrayList<Double>();
                list_xy = ipt.ProjectiveInv(resI, PointMatch);
                System.out.println("List_xy_transformation:");
                System.out.println(list_xy);
               
                // Convert from ArrayList to Array
                /*double[] list_xy_d = new double[list_xy.size()];
                for (int i=0;i<list_xy.size();i++){
                list_xy_d[i] = list_xy.get(i);
               
                }
                System.out.println(&quot;list_xy_d:&quot; + list_xy_d);*/
               
                // seperate x from xy list
                int sum_x = 0;
                double[] list_x = new double[list_xy.size()/2];
                for (int i=0;i&lt;list_xy.size();i++){
                //double x = list_xy.get(i);
                //list_x_d[sum] = list_xy_d[i];
                list_x[sum_x] = list_xy.get(i);
                sum_x++;
                i++;
                }
                //System.out.println(&quot;list_x:&quot; + list_x);
               
                // seperate y from xy list
                int sum_y = 0;
                double[] list_y = new double[list_xy.size()/2];
                for (int i=1;i&lt;list_xy.size();i++){
                //double x = list_xy.get(i);
                //list_x_d[sum] = list_xy_d[i];
                list_y[sum_y] = list_xy.get(i);
                sum_y++;
                i++;
                }
               
               
                // Calculate RMSE:
                double Sum = 0;
                for (int i = 0; i &lt; PointMatch.size(); i++) {
                double res =
Math.pow((PointMatch.get(i).getP1().getL()[0]-list_x[i]),
2)+Math.pow((PointMatch.get(i).getP1().getL()[1]-list_y[i]), 2);
                //res = Math.sqrt(res);
                Sum = Sum + res;
                               
                        }
                double res = Math.sqrt(Sum/PointMatch.size());
                System.out.println(&quot;RMSE: &quot; + res);
               
              //--------------------------- test
-------------------------------------------:
               
                       //int[][] a = new int[1280][960];
                       ImagePlus imgWhite = IJ.createImage(&quot;White&quot;,
&quot;tif&quot;, ip1.getWidth(), ip1.getHeight(), 1);
                       
                       //imgWhite.show();  //8bit
                       ImageProcessor BWhiteimproc = imgWhite.getProcessor();
                       ImageProcessor shortproc = BWhiteimproc.convertToShort(true);  
//convert from 8bit to 16bit
                       //BWhiteimproc.setIntArray(a);
                       
                       //Image Imagetoshow = BWhiteimproc.createImage();
                       //int[][] iArray = {};
                       
                       ImageProcessor shortprocFinal = ipt.ProjectiveInverse(resI,
shortproc,ip1);
                   
                       ImagePlus shortImg = new
ImagePlus(&quot;short&quot;,shortprocFinal);
                       //shortImg.show();
                       BufferedImage bi = (BufferedImage)shortprocFinal.createImage();
                      // BufferedImage bi1 =convertBufferedImage(shortImg);
                       BufferedImage rawImage = shortprocFinal.getBufferedImage();
                       ColorModel model = rawImage.getColorModel();
                       int width = rawImage.getWidth();
                                int height = rawImage.getHeight();
                                WritableRaster raster = model.createCompatibleWritableRaster(width,
height);
                       
                //************** end of process **********************
               
               
                //RenderedOp resultImage = JAI.create(&quot;add&quot;,image1, image2);
               
                GridCoverageFactory gcf = new GridCoverageFactory();
        //GridCoverage2D output =  gcf.create(&quot;result&quot;,
resultImage, gridCoverage1.getEnvelope());
       
                GridCoverage2D output = gcf.create(&quot;result&quot;, raster,
gridCoverage1.getEnvelope());
       
       
                HashMap&lt;String,IData> resulthash = new HashMap<String,IData>();
                resulthash.put("result", new GTRasterDataBinding(output));
                return resulthash;
       
        }
       
        public BufferedImage convertRenderedImage(RenderedImage img) {
                if (img instanceof BufferedImage) {
                        return (BufferedImage)img;
                }
                ColorModel cm = img.getColorModel();
                int width = img.getWidth();
                int height = img.getHeight();
                WritableRaster raster = cm.createCompatibleWritableRaster(width, height);
                boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();
                Hashtable properties = new Hashtable();
                String[] keys = img.getPropertyNames();
                if (keys!=null) {
                        for (int i = 0; i < keys.length; i++) {
                                properties.put(keys[i], img.getProperty(keys[i]));
                        }
                }
                BufferedImage result = new BufferedImage(cm, raster, isAlphaPremultiplied,
properties);
                img.copyData(raster);
                return result;
        }
       
        public BufferedImage convertBufferedImage(ImagePlus imp) throws Exception {
                if (imp == null) {
                        //logger.error("Null ImagePlus Object.");
                        throw new Exception("Null ImagePlus Object.");
                }
                ImageProcessor ip = imp.getProcessor();
                int width = ip.getWidth();
                int height = ip.getHeight();
                Image img = ip.createImage();
                imp.flush();
                imp = null;
                ip = null;
               
                BufferedImage bImg = new BufferedImage(width, height,
BufferedImage.TYPE_3BYTE_BGR);
                Graphics g = bImg.getGraphics();
                g.drawImage(img, 0, 0, null);
                img.flush();
                img = null;
                g.dispose();
                g = null;

                return bImg;
        }
               
       
}




--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

BenjaminPross
As your process has dependencies to other libraries, you need to make sure,
that the respective jar files exist in the WEB-INF/lib folder of the WPS. If
you did not add the dependencies in the pom, they will not be copied there
automatically.



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

soshi
thank you, but I got error again...
I defined jar file as external jar file in build path and added to pom file
and build it ...
----------------------------POM FILE-----------------------------
<dependency>
                        <groupId>ij</groupId>
                        <artifactId>imagej</artifactId>
                        <version>1.46</version>
                </dependency>
                <dependency>
                        <groupId>ij</groupId>
                        <artifactId>mpicbg</artifactId>
                        <version>1.1.2-SNAPSHOT</version>
                </dependency>

-------------------------build
----------------------------------------------
install:install-file -Dfile=imagej-1.46.jar -DgroupId=ij
-DartifactId=imagej -Dversion=1.46 -Dpackaging=jar
---------------------
install:install-file -Dfile=mpicbg-1.1.2-SNAPSHOT.jar -DgroupId=ij
-DartifactId=mpicbg -Dversion=1.1.2-SNAPSHOT -Dpackaging=jar

------------------------ Error in 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.Registration
</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.Registration 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: Raster to
Model Transformation is not available 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: Raster to Model
Transformation is not available 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: Raster to
Model Transformation is not available at
org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:402) at
org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:225) ... 13
more Caused by: org.geotools.data.DataSourceException: Raster to Model
Transformation is not available at
org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:346) ...
14 more
</ows:ExceptionText>
</ows:Exception>
<ows:Exception exceptionCode="JAVA_RootCause">
<ows:ExceptionText>
org.geotools.data.DataSourceException: Raster to Model Transformation is not
available
</ows:ExceptionText>
<ows:ExceptionText>
java.lang.RuntimeException: org.geotools.data.DataSourceException: Raster to
Model Transformation is not available 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: Raster to Model Transformation is not
available 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: Raster to
Model Transformation is not available at
org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:402) at
org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:225) ... 13
more Caused by: org.geotools.data.DataSourceException: Raster to Model
Transformation is not available at
org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:346) ...
14 more
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

soshi
This post was updated on .
Could anyone help me,please? Is this a bug in wps 52north???



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
Geoprocessingservices@52north.org
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

soshi
This post was updated on .
The input image has following propertise:

size: 1.7 MB
dimension: 1280*960
type: TIFF image (.tif)

The error is for image??? why?
whether wps 52north has restriction for tif images respect to size or
dimension?

and mimetype for input image is image/geotiff. is that correct??? or it might have another mimetype?
 and for process in submodule 52n.wps.server.geotools is:
public Class getInputDataType(String id) {
                return GTRasterDataBinding.class;
        }

        public Class getOutputDataType(String id) {
                return GTRasterDataBinding.class;
        }




--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
Geoprocessingservices@52north.org
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

BenjaminPross
The GeoTools library seems to have a problem reading the image. Could you
make the image available for me for testing?



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

soshi
I sent image for this email([hidden email]) .
the image couldn't upload in this part by insert image.



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

BenjaminPross
You should probably upload the tif file instead of trying to upload it as an
image. See attached image.

<http://geoprocessing.forum.52north.org/file/t495860/upload.png>



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

BenjaminPross
There seems to be something wrong with the tif image, e.g it has no
coordinate reference system set. Maybe this thread will help you:
https://sourceforge.net/p/geotools/mailman/geotools-gt2-users/thread/CACJVtdOb%3DCTfVGAQUfzfpghnVuCYLwpA2ubuVFt-F7HMx5aTJw%40mail.gmail.com/



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

soshi
My goal is to read many tif images without coordinate reference system, and
make process on them. I've done already on it using R process with mimetype:
application/geotiff for this image without crs and received response, but
now I'm going to read many images using java process directly and receive
response from them, my image must be tiff format without any coordinate
reference system as you saw ,

52north wps has a solution for reading this read tif image, should I use
another mimetype??? or is it possible to change GTRasterDataBinding to
another Generator or parser to read a file with format tiff wihtout any
coordinate reference system??

thanks....



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

BenjaminPross
I am not sure, whether GeoTools can read such images, their forum/mailinglist
might help here. However, looking at the code of your algorithm, you don't
seem to need any geo-functionality anyway. A solution could be to use
GenericFileData(-Binding) instead of the GTRasterDataBinding. You could then
parse the RenderedImage from the file with ImageIO.read.




--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

soshi
The error is related to convert GenericFileDataBinding to converage2D.

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

-<ows:ExceptionReport version="1.0.0"
xmlns:ows="http://www.opengis.net/ows/1.1">


-<ows:Exception exceptionCode="NoApplicableCode">

<ows:ExceptionText>Error while executing the embedded process for:
org.n52.wps.server.algorithm.raster.Registration</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.Registration
at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:716)
at org.n52.wps.server.request.Request.call(Request.java:1) 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.ClassCastException: org.n52.wps.io.data.GenericFileData cannot be
cast to org.geotools.coverage.grid.GridCoverage2D at
org.n52.wps.server.algorithm.raster.Registration.run(Registration.java:139)
at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:685)
... 5 more</ows:ExceptionText>

</ows:Exception>


-<ows:Exception exceptionCode="JAVA_RootCause">

<ows:ExceptionText>org.n52.wps.io.data.GenericFileData cannot be cast to
org.geotools.coverage.grid.GridCoverage2D</ows:ExceptionText>

<ows:ExceptionText>java.lang.ClassCastException:
org.n52.wps.io.data.GenericFileData cannot be cast to
org.geotools.coverage.grid.GridCoverage2D at
org.n52.wps.server.algorithm.raster.Registration.run(Registration.java:139)
at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:685)
at org.n52.wps.server.request.Request.call(Request.java:1) 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)</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>



and I should change this part of code :
List<IData> dataList1 = inputData.get("dataset1");
                if(dataList1 == null || dataList1.size() != 1){
                        throw new RuntimeException("Error while allocating input parameters");
                }
IData dataset1 = dataList1.get(0);
                GridCoverage2D gridCoverage1 = (GridCoverage2D) dataset1.getPayload();
                RenderedImage image1 = gridCoverage1.getRenderedImage();

Do you have any suggestion to solve this issue??
thanks.........



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

soshi
I did these changes:
public Class getInputDataType(String id) {
                return GenericFileDataBinding.class;
        }

IData dataset1 = dataList1.get(0);
                RenderedImage image1 = (RenderedImage) dataset1.getPayload();

Now, I don't know to use which class to show output instead of coverage2D...

GridCoverageFactory gcf = new GridCoverageFactory();
        GridCoverage2D output =  gcf.create("result", resultImage,
gridCoverage1.getEnvelope());
       
                GridCoverage2D output = gcf.create("result", raster);
       
       
                HashMap<String,IData> resulthash = new HashMap<String,IData>();
                resulthash.put("result", new GenericFileDataBinding(output));
                return resulthash;



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

BenjaminPross
I had something like thw following in mind:

Read the input:

        GenericFileDataBinding genericFileDataBinding =
(GenericFileDataBinding)dataset1;
        GenericFileData genericFileData =
genericFileDataBinding.getPayload();
       
        RenderedImage image =
ImageIO.read(genericFileData.getBaseFile(false));

Write the output:
       
        ImageIO.write(renderedImage, "tiff", tmpImage);
       
        HashMap<String,IData> resulthash = new HashMap<String,IData>();
        resulthash.put("result", new GenericFileDataBinding(new
GenericFileData(tmpImage, "image/tiff")));



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

soshi
I changed the code as you mentioned...
because read and write methods of ImegeIO, they need handling exception
using try and catch.
so I had to write separate methods for read and write as following...

public ArrayList<RenderedImage> readFile(GenericFileData genericFileData1,
GenericFileData genericFileData2){
                RenderedImage image1;
                RenderedImage image2;
                ArrayList<RenderedImage> images = new ArrayList<RenderedImage>();
                try {
                        image1 = ImageIO.read(genericFileData1.getBaseFile(false));
                        image2 = ImageIO.read(genericFileData2.getBaseFile(false));
                        images.set(0, image1);
                        images.set(1, image2);
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
                return images;
        }
       
        public HashMap<String,IData> wirteFile(RenderedImage rawImage){
                File tmpImage = new File("tmpImg.tiff");
                HashMap<String,IData> resulthash = new HashMap<String,IData>();
                try {
                        ImageIO.write(rawImage, "tiff", tmpImage);
                        //HashMap<String,IData> resulthash = new HashMap<String,IData>();
                        resulthash.put("result", new GenericFileDataBinding(new
                        GenericFileData(tmpImage, "image/tiff")));
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
                return resulthash;
        }

---------------------------------------- main method

IData dataset1 = dataList1.get(0);
                IData dataset2 = dataList2.get(0);
                GenericFileDataBinding genericFileDataBinding1 =
(GenericFileDataBinding)dataset1;
                GenericFileDataBinding genericFileDataBinding2 =
(GenericFileDataBinding)dataset2;
                GenericFileData genericFileData1 = genericFileDataBinding1.getPayload();
                GenericFileData genericFileData2 = genericFileDataBinding2.getPayload();
               
                ArrayList<RenderedImage> images =
readFile(genericFileData1,genericFileData2);
                RenderedImage image1 = images.get(0);
                RenderedImage image2 = images.get(1);
                BufferedImage rawImage = sift(image1,image2);

HashMap<String,IData> resulthash = wirteFile(rawImage);
                        return resulthash;

----------------------------------------------------
52north wps response is:

<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.Registration
</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.Registration 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.IndexOutOfBoundsException: Index: 0, Size: 0 at
java.util.ArrayList.rangeCheck(ArrayList.java:653) at
java.util.ArrayList.set(ArrayList.java:444) at
org.n52.wps.server.algorithm.raster.Registration.readFile(Registration.java:443)
at
org.n52.wps.server.algorithm.raster.Registration.run(Registration.java:149)
at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:685)
... 5 more
</ows:ExceptionText>
</ows:Exception>
<ows:Exception exceptionCode="JAVA_RootCause">
<ows:ExceptionText>Index: 0, Size: 0</ows:ExceptionText>
<ows:ExceptionText>
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at
java.util.ArrayList.rangeCheck(ArrayList.java:653) at
java.util.ArrayList.set(ArrayList.java:444) at
org.n52.wps.server.algorithm.raster.Registration.readFile(Registration.java:443)
at
org.n52.wps.server.algorithm.raster.Registration.run(Registration.java:149)
at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:685)
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)
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

I think that is related to read file, it might be null...
I send request using xml file, how can I debug the process... is it
possible???





--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: Error in wps response

BenjaminPross
Instead of using the set method, you should use add:

 images.add(image1);
 images.add(image2);

set only replaces items. Cannot be done on an empty list.



--
Sent from: http://geoprocessing.forum.52north.org/
_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
12