Hi Andrea

thanks, it works. I was able to add a process.
Is there an easy way to use the datastores and featuretypes defined in
GeoServer? I tried to connect to a postgis database in the execute
method of my  process:

 Map params= new HashMap();
 params.put("dbtype", "postgis");
 params.put("host", "localhost");
 params.put("port", 5432);
 params.put("database", "xanadu");
 params.put("schema", "chenyx06");
 params.put("user", "stefan");
 params.put("passwd", "XXXXX");
            
 DataStore datastore = DataStoreFinder.getDataStore( params );
                  
 String tableNameLV03 = "chenyx06-lv03";
 FeatureSource<SimpleFeatureType, SimpleFeature> source =
datastore.getFeatureSource( tableNameLV03 );

This works in a standalone GeoTools project but throws some error here:

Running org.geoserver.wps.CataisFreeFrameTest
21 Feb 21:08:23 ERROR [geoserver.ows] - 
org.geoserver.wps.WPSException: InternalError:
java.lang.NullPointerException
      at org.geoserver.wps.Execute.run(Execute.java:168)
      at
org.geoserver.wps.DefaultWebProcessingService.execute(DefaultWebProcessi
ngService.java:69)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:649)
      at
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:230)
      at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(Abs
tractController.java:153)
      at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handl
e(SimpleControllerHandlerAdapter.java:48)
      at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherS
ervlet.java:875)
      at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherSe
rvlet.java:809)
      at
org.springframework.web.servlet.FrameworkServlet.processRequest(Framewor
kServlet.java:571)
      at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet
.java:511)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at
org.geoserver.test.GeoServerAbstractTestSupport.dispatch(GeoServerAbstra
ctTestSupport.java:1054)
      at
org.geoserver.test.GeoServerAbstractTestSupport.dispatch(GeoServerAbstra
ctTestSupport.java:1021)
      at
org.geoserver.test.GeoServerAbstractTestSupport.postAsServletResponse(Ge
oServerAbstractTestSupport.java:648)
      at
org.geoserver.test.GeoServerAbstractTestSupport.postAsServletResponse(Ge
oServerAbstractTestSupport.java:595)
      at
org.geoserver.test.GeoServerAbstractTestSupport.post(GeoServerAbstractTe
stSupport.java:575)
      at
org.geoserver.test.GeoServerAbstractTestSupport.postAsDOM(GeoServerAbstr
actTestSupport.java:784)
      at
org.geoserver.test.GeoServerAbstractTestSupport.postAsDOM(GeoServerAbstr
actTestSupport.java:767)
      at
org.geoserver.wps.CataisFreeFrameTest.testFeatureCollectionInline21781Ra
w(CataisFreeFrameTest.java:67)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at junit.framework.TestCase.runTest(TestCase.java:164)
      at
org.geoserver.test.GeoServerAbstractTestSupport.runTest(GeoServerAbstrac
tTestSupport.java:126)
      at junit.framework.TestCase.runBare(TestCase.java:130)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:120)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:2
13)
      at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSe
t(AbstractDirectoryTestSuite.java:140)
      at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Abstr
actDirectoryTestSuite.java:127)
      at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Suref
ireBooter.java:338)
      at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java
:997)
Caused by: java.lang.NullPointerException
      at
org.geoserver.wps.catais.CataisFreeFrameProcess.execute(CataisFreeFrameP
rocess.java:115)
      at org.geoserver.wps.Execute.run(Execute.java:162)
      ... 50 more


regards
Stefan




> -----Ursprüngliche Nachricht-----
> Von: Andrea Aime [mailto:[email protected]]
> Gesendet am: Freitag, 19. Februar 2010 19:31
> An: Ziegler Stefan
> Cc: geoserver-devel
> Betreff: Re: [Geoserver-devel] How to run GeoServer with WPS module
> 
> Ziegler Stefan ha scritto:
> > Hi
> > 
> > I have problems to get GeoServer running with the WPS module:
> > 
> > - I checked out today's trunk
> > - Built GS with 'mvn clean install -Pwps
> > - WPS tests seem to work
> > - deployed the resulting geoserver.war file in Tomcat
> 
> Looked on trunk, I could make things work in the IDE but not
> in the geoserver.war
> 
> I think I fixed the issues. Try svn updating, rebuilding both
> the wps module and web/app with -Pwps, it should be working
> (I checked the capabilities was returned, nothing more than that)
> 
> Cheers
> Andrea
> 
> 
> -- 
> Andrea Aime
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
> 

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to