[Geoserver-users] Regarding the example WPS process

Dear group,

I thought of not posting this and figuring out myself, but its been 10 days and im still stuck up. Any immediate help would be highly obliged.
My problem is:
I have implemented the example WPS process as per http://docs.geoserver.org/latest/en/developer/programming-guide/wps-services/implementing.html
guide, everything goes fine but the process isnt shown in the geoserver when i test. What could be the issue? Please help. Even when i register in the spring beans its fine.
I have created a maven project and chaged the pom.xml file. Do i need to run this on server? or as a java application? and is it mandatory that geoserver source should be imported inrto eclipse ide? I imported anyways but the custom process is written as an independent program. Thanks in advance

Another problem i have is, with “import org.geotools.process.gs.GSProces”, from the http://suite.opengeo.org/opengeo-docs/processing/wpsjava/index.html where GSProcess gets deprecated, what could be the reason, I have seen in sites that GSProcess is no longer needed, but if thats the case, how do i register my process class without any namespace?

GIRIJA KALYANI
GFM DEPARTMENT
IIRS-ITC
ISRO

Hi Girja:

Please keep the communication going, it is the only way we learn about problems and fix the documentation. We used to have these docs as a wiki to encourage participation, but due to lack of permission we now rely on our user list (and email like yours) to keep the documentation current and consistent.

I have not tried that geoserver tutorial you are following, I am not sure it is up to date? Like I notice that GeoServerProcess extends GSProcess, and GSProcess is deprecated and no longer used.

I use the GeoTools tutorial here: http://docs.geotools.org/latest/userguide/tutorial/process.html

Can I ask how you are testing?

  1. When I test with eclipse, eclipse processes the various project dependencies resulting in a run configuration. You can see some of that happen when following the instructions in the developers guide. When testing “optional” jars (such as extensions or my own processes) I have to go into the “Run Configuration” that (that was generated by mvn eclipse:eclipse) and add the additional projects I want to see tested.

  2. When testing with a working GeoServer (such as a Tomcat WAR deploy) - I either export the jar from eclipse (if I am lazy) or use mvn assembly:assembly to produce a jar. I then copy that jar into the web apps geoserver libs folder (just like installing any other extension)

It is difficult to debug a tomcat installation from eclipse, but it can be done. There are additional command line parameters and you have to start the server, and then let eclipse debugger connect to it and so forth.

There are a few eclipse plugins that can make working with Tomcat easier, but I rarely put in the effort to set them up.

If you are running the Start.jar form eclipse I would put a break point in the code that lists all the processes, and ensure your ProcessFactory is being found? You should also write a test case and try calling your process from the GeoTools Processors class, it does the “factory spi” lookup and should be able to check your process can be used.

···

Jody Garnett

On Thu, Jul 31, 2014 at 9:20 PM, Girija Kalyani <smileismystyl@anonymised.com> wrote:

Dear group,

I thought of not posting this and figuring out myself, but its been 10 days and im still stuck up. Any immediate help would be highly obliged.
My problem is:
I have implemented the example WPS process as per http://docs.geoserver.org/latest/en/developer/programming-guide/wps-services/implementing.html
guide, everything goes fine but the process isnt shown in the geoserver when i test. What could be the issue? Please help. Even when i register in the spring beans its fine.
I have created a maven project and chaged the pom.xml file. Do i need to run this on server? or as a java application? and is it mandatory that geoserver source should be imported inrto eclipse ide? I imported anyways but the custom process is written as an independent program. Thanks in advance

Another problem i have is, with “import org.geotools.process.gs.GSProces”, from the http://suite.opengeo.org/opengeo-docs/processing/wpsjava/index.html where GSProcess gets deprecated, what could be the reason, I have seen in sites that GSProcess is no longer needed, but if thats the case, how do i register my process class without any namespace?

GIRIJA KALYANI
GFM DEPARTMENT
IIRS-ITC
ISRO