Issue Details (XML | Word | Printable)

Key: GEOS-3012
Type: Bug Bug
Status: Reopened Reopened
Priority: Blocker Blocker
Assignee: Andrea Aime
Reporter: Ben Caradoc-Davies
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
GeoServer

GetMapTest not an OnlineTest and fails when remote service unavailable

Created: 08/May/09 01:29 AM   Updated: 21/Jan/10 12:49 PM
Component/s: WMS
Affects Version/s: None
Fix Version/s: 2.0-beta1

Time Tracking:
Not Specified

File Attachments: 1. Text File GEOS-3012.patch (9 kB)
2. Text File wms-online-test.patch (7 kB)



 Description  « Hide

I am getting very tired of GetMapTest failures. It should be an OnlineTestCase.

Failed tests:
testRemoteOWSUserStyleGet(org.vfny.geoserver.wms.responses.map.png.GetMapTest)

08 May 14:24:42 ERROR [geoserver.ows] -
org.vfny.geoserver.wms.WmsException: Could not connect to remote OWS
at org.geoserver.wms.kvp.GetMapKvpRequestReader.connectRemoteWFS(GetMapKvpRequestReader.java:1123)
at org.geoserver.wms.kvp.GetMapKvpRequestReader.addRemoteLayersFromUserLayer(GetMapKvpRequestReader.java:630)
at org.geoserver.wms.kvp.GetMapKvpRequestReader.processStandaloneSld(GetMapKvpRequestReader.java:548)
at org.geoserver.wms.kvp.GetMapKvpRequestReader.processSld(GetMapKvpRequestReader.java:429)
at org.geoserver.wms.kvp.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:257)
at org.geoserver.wms.kvp.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:1)
at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1092)
at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:431)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:209)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.geoserver.test.GeoServerAbstractTestSupport.dispatch(GeoServerAbstractTestSupport.java:1040)
at org.geoserver.test.GeoServerAbstractTestSupport.dispatch(GeoServerAbstractTestSupport.java:1007)
at org.geoserver.test.GeoServerAbstractTestSupport.getAsServletResponse(GeoServerAbstractTestSupport.java:454)
at org.vfny.geoserver.wms.responses.map.png.GetMapTest.testRemoteOWSUserStyleGet(GetMapTest.java:143)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:164)
at org.geoserver.test.GeoServerAbstractTestSupport.runTest(GeoServerAbstractTestSupport.java:131)
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 junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:520)
at sun.net.NetworkClient.doConnect(NetworkClient.java:152)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
at sun.net.www.http.HttpClient.New(HttpClient.java:304)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:828)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:780)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:705)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:949)
at org.geotools.data.wfs.protocol.http.SimpleHttpProtocol$SimpleHttpResponse.getResponseStream(SimpleHttpProtocol.java:65)
at org.geotools.data.wfs.WFSDataStoreFactory.loadCapabilities(WFSDataStoreFactory.java:684)
at org.geotools.data.wfs.WFSDataStoreFactory.createDataStore(WFSDataStoreFactory.java:347)
at org.geoserver.wms.kvp.GetMapKvpRequestReader.connectRemoteWFS(GetMapKvpRequestReader.java:1121)
... 43 more



Ben Caradoc-Davies added a comment - 08/May/09 01:35 AM

Need something (OnlineTestCase or otherwise) that checks that this is available (from remoteOws.sld):

<OnlineResource xlink:href="http://sigma.openplans.org:8080/geoserver/wfs?" />

Andrea Aime added a comment - 08/May/09 01:59 AM

Sigh, this test is killing me.

If you look at the test code, it starts with "if (!RemoteOWSTestSupport.isRemoteStatesAvailable()) return;" and isRemoteStatesAvailable() does exactly what you're saying, checks the resource is there and can be connected to, and even makes a full GetFeature request to make extra sure.

Unfortunately:

  • the test never fails on my computer (and runs fully, every time I try to debug it, it's not skipped) so I have no clue what is going on in machines where it's failing.
  • in machines in which it fails, it seems the connection test passes, and then the actual usage fails. Also note that the connection test is done using the WFSDataStore, so the same machinery used to actually run the test.

So I don't know. It seems we have to give up running this test, since it fails on the build box too from time to time (so even the idea of OnlineTest cannot be applied).

From one side, the functionality tested here (feature portrayal of a remote WFS data) is not commonly used, from the other side, for that very reason giving up these tests will just condem the functionality to become non functional in a short time (first wms refactor down the corner).


Andrea Aime added a comment - 08/May/09 02:05 AM - edited

Last famous words.... now the issue is reproducable within my eclipse (but strangely enough, not in Maven). (to bef fair, first time I run this one on Linux, maybe it's OS dependent?)


Andrea Aime added a comment - 08/May/09 02:15 AM

So, it turns out Arne was loading Sigma with a stress test and many many connections, and Sigma was running out of them (max 256).
This resulted in the test failures, the initial check found a free connection, and then the actual test code failed because there were no more.
So it's safe to assume every time Sigma is hammered these tests will fail.

A possibility would be to make these tests hit a GeoServer on the localhost, if it's not there, they pass. But we've already seen with the WFS datastore tests in GeoTools this is not a very good idea, as a unrelated GeoServer can be running in the same host (e.g., we cannot build GeoTools on Sigma because of this).
Maybe have a reliable GeoServer somewhere? Or else, turn these into real OnlineTest, with a property file in the home directory of the user.
Mind, the latter will mean remove ows will have the same destiny as WFS-V, that is, it's constantly broken because nothing and no-one ever tests it (the build server does not, my local builds neither because extensions are not part of a normal build).


Arne Kepp added a comment - 08/May/09 02:15 AM

This turns out to be my fault, I have been running performance tests against sigma in the past three days. I have been taking extra care that repo.opengeo.org remains fully functional throughout, but the Tomcat instance has been taking a beating.

Is it at all possible to make these tests fail gracefully if the remote server is not responding?


Ben Caradoc-Davies added a comment - 24/May/09 08:19 PM

This test has broken the build, again.


Ben Caradoc-Davies added a comment - 24/May/09 11:12 PM

I am stealing this issue because I have written a patch.


Ben Caradoc-Davies added a comment - 24/May/09 11:28 PM

Attached patch adds a method to see if the RemoteOWS user style service is responding, and uses it in GetMapTest.testRemoteOWSUserStyleGet().

The patch also changes the logging from a static instance to an argument; this is required to obtain a correctly configured logger from AbstractGeoServerTestSupport (via its subclasses). A static logger cannot be used because initialisation is too early, and depends on class loading order.


Ben Caradoc-Davies added a comment - 24/May/09 11:30 PM

Patch committed r12471.


Ben Caradoc-Davies added a comment - 24/May/09 11:31 PM

Changes committed to fix the build.


Ben Caradoc-Davies added a comment - 24/May/09 11:36 PM

Andrea, I am assigning this back to you for review because you have already put a great deal of work into the robustness of these tests, and I know this GetMapTest failure has bugged you from time to time.

I needed to fix the build so I have committed the patch. I apologise if this was hasty, but this failure has been around for a long time and has not been fixed.

Please review the fix, and let me know if it is OK, or assign it back to Gabriel for review if you prefer. We still need to confirm that the test runs when sigma is responding. I have fixed the logging to facilitate this.


Ben Caradoc-Davies added a comment - 24/May/09 11:37 PM

Reopened for review.


Andrea Aime added a comment - 25/May/09 01:25 AM

To the best of my knowledge this will improve things but won't solve them. Sigma has this nasty tendency of answering positively to guarding check and refusing connection on the actual test when under load.
So I can review and apply the patch, and it will improve things, but I'm not persuaded it will fix them permanently


Ben Caradoc-Davies added a comment - 25/May/09 01:35 AM - edited

Andrea, I have already applied the patch to fix the build. I agree that sigma is rather badly behaved, and also that this is not a complete fix. However, it should give us substantial symptomatic relief.

I think GetMapTest is a useful test that covers real behaviour. However, it is difficult to refactor into an OnlineTestCase because of the indirect way in which it obtains its online resources.

If you are happy with the (already applied) patch, great! If not, I can revert the change and exclude GetMapTest, unless you have a better idea (as you often have).

The only reason I have submitted a patch for your review is in penance for committing to someone else's module, which in my view requires an apology, even if it was necessary to fix the build.


Andrea Aime added a comment - 25/May/09 03:18 AM

Patch looks good, applied to the beta1 branch as well.


Ben Caradoc-Davies added a comment - 25/May/09 03:38 AM

Thanks.

The best news is that sigma is now responding, and, if I run GetMapTest, I can see that the guard lets the remote style test body run, and the test succeeds. The last thing that could go wrong was that the guard was overzealous and stopped the test from testing anything, but this is not the case. With the fixes I made to logging, I can confirm that the test is running and producing output, so the original GetMapTest coverage is preserved.


Andrea Aime added a comment - 25/May/09 03:42 AM

Unfortunately on my box I already got a build failure despite the patch being applied.. .sigh...


Ben Caradoc-Davies added a comment - 25/May/09 03:46 AM

A failure in GetMapTest?


Andrea Aime added a comment - 25/May/09 03:52 AM

Nope, remote ows style something. Which right now works, but failed like 20 minutes ago


Ben Caradoc-Davies added a comment - 20/Jan/10 08:05 PM

Good morning Andrea. Recognise this one?

Probably the easiest way to protect our sanity is to fix services on sigma, bringing it back up, and then keep this bug open but with reduced priority.


Ben Caradoc-Davies added a comment - 20/Jan/10 08:16 PM

For your convenience, here is the surefire report:

-------------------------------------------------------------------------------
Test set: org.vfny.geoserver.wms.responses.map.png.GetMapTest
-------------------------------------------------------------------------------
Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 7.614 sec <<< FAILURE!
testRemoteOWSUserStyleGet(org.vfny.geoserver.wms.responses.map.png.GetMapTest)  Time elapsed: 2.761 sec  <<< FAILURE!
junit.framework.ComparisonFailure: expected:<[image/png]> but was:<[application/vnd.ogc.se_xml]>
	at junit.framework.Assert.assertEquals(Assert.java:81)
	at junit.framework.Assert.assertEquals(Assert.java:87)
	at org.vfny.geoserver.wms.responses.map.png.GetMapTest.testRemoteOWSUserStyleGet(GetMapTest.java:154)

And the Eclipse console:

21 Jan 09:54:21 ERROR [geotools.rendering] - Could not aquire feature:org.geotools.data.wfs.protocol.wfs.WFSException: WFS returned an exception. Target URL: http://sigma.openplans.org:8080/geoserver/wfs?. Originating request is: 
<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature handle="GeoTools 2.7-SNAPSHOT WFS DataStore"
 outputFormat="text/xml; subtype=gml/3.1.1" resultType="results"
 service="WFS" version="1.1.0" xmlns:ogc="http://www.opengis.net/ogc"
 xmlns:gml="http://www.opengis.net/gml"
 xmlns:xlink="http://www.w3.org/1999/xlink"
 xmlns:ows="http://www.opengis.net/ows" xmlns:wfs="http://www.opengis.net/wfs">
 <wfs:Query srsName="urn:x-ogc:def:crs:EPSG:4326" typeName="topp:states">
  <wfs:PropertyName>the_geom</wfs:PropertyName>
  <ogc:Filter>
   <ogc:BBOX>
    <ogc:PropertyName>the_geom</ogc:PropertyName>
    <gml:Envelope>
     <gml:lowerCorner>-90.0 -180.0</gml:lowerCorner>
     <gml:upperCorner>90.0 180.0</gml:upperCorner>
    </gml:Envelope>
   </ogc:BBOX>
  </ogc:Filter>
 </wfs:Query>
</wfs:GetFeature>


	[[java.lang.NullPointerException null]]
java.util.NoSuchElementException: Could not aquire feature:org.geotools.data.wfs.protocol.wfs.WFSException: WFS returned an exception. Target URL: http://sigma.openplans.org:8080/geoserver/wfs?. Originating request is: 
<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature handle="GeoTools 2.7-SNAPSHOT WFS DataStore"
 outputFormat="text/xml; subtype=gml/3.1.1" resultType="results"
 service="WFS" version="1.1.0" xmlns:ogc="http://www.opengis.net/ogc"
 xmlns:gml="http://www.opengis.net/gml"
 xmlns:xlink="http://www.w3.org/1999/xlink"
 xmlns:ows="http://www.opengis.net/ows" xmlns:wfs="http://www.opengis.net/wfs">
 <wfs:Query srsName="urn:x-ogc:def:crs:EPSG:4326" typeName="topp:states">
  <wfs:PropertyName>the_geom</wfs:PropertyName>
  <ogc:Filter>
   <ogc:BBOX>
    <ogc:PropertyName>the_geom</ogc:PropertyName>
    <gml:Envelope>
     <gml:lowerCorner>-90.0 -180.0</gml:lowerCorner>
     <gml:upperCorner>90.0 180.0</gml:upperCorner>
    </gml:Envelope>
   </ogc:BBOX>
  </ogc:Filter>
 </wfs:Query>
</wfs:GetFeature>


	[[java.lang.NullPointerException null]]
	at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:56)
	at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:41)
	at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1854)
	at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1770)
	at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:690)
	at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:515)
	at org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:387)
	at org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:465)
	at org.geoserver.ows.adapters.ResponseAdapter.getMimeType(ResponseAdapter.java:48)
	at org.geoserver.ows.Dispatcher.response(Dispatcher.java:711)
	at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:233)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.geoserver.test.GeoServerAbstractTestSupport.dispatch(GeoServerAbstractTestSupport.java:1054)
	at org.geoserver.test.GeoServerAbstractTestSupport.dispatch(GeoServerAbstractTestSupport.java:1021)
	at org.geoserver.test.GeoServerAbstractTestSupport.getAsServletResponse(GeoServerAbstractTestSupport.java:463)
	at org.vfny.geoserver.wms.responses.map.png.GetMapTest.testRemoteOWSUserStyleGet(GetMapTest.java:148)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at org.geoserver.test.GeoServerAbstractTestSupport.runTest(GeoServerAbstractTestSupport.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 junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.extensions.TestSetup.run(TestSetup.java:25)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.geotools.data.wfs.protocol.wfs.WFSException: WFS returned an exception. Target URL: http://sigma.openplans.org:8080/geoserver/wfs?. Originating request is: 
<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature handle="GeoTools 2.7-SNAPSHOT WFS DataStore"
 outputFormat="text/xml; subtype=gml/3.1.1" resultType="results"
 service="WFS" version="1.1.0" xmlns:ogc="http://www.opengis.net/ogc"
 xmlns:gml="http://www.opengis.net/gml"
 xmlns:xlink="http://www.w3.org/1999/xlink"
 xmlns:ows="http://www.opengis.net/ows" xmlns:wfs="http://www.opengis.net/wfs">
 <wfs:Query srsName="urn:x-ogc:def:crs:EPSG:4326" typeName="topp:states">
  <wfs:PropertyName>the_geom</wfs:PropertyName>
  <ogc:Filter>
   <ogc:BBOX>
    <ogc:PropertyName>the_geom</ogc:PropertyName>
    <gml:Envelope>
     <gml:lowerCorner>-90.0 -180.0</gml:lowerCorner>
     <gml:upperCorner>90.0 180.0</gml:upperCorner>
    </gml:Envelope>
   </ogc:BBOX>
  </ogc:Filter>
 </wfs:Query>
</wfs:GetFeature>


	[[java.lang.NullPointerException null]]
	at org.geotools.data.wfs.v1_1_0.parsers.ExceptionReportParser.parse(ExceptionReportParser.java:101)
	at org.geotools.data.wfs.protocol.wfs.WFSExtensions.process(WFSExtensions.java:75)
	at org.geotools.data.wfs.v1_1_0.WFS_1_1_0_DataStore.getFeatureReader(WFS_1_1_0_DataStore.java:325)
	at org.geotools.data.wfs.v1_1_0.WFSFeatureCollection.reader(WFSFeatureCollection.java:168)
	at org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:223)
	at org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:193)
	at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1837)
	... 43 more
21 Jan 09:54:21 ERROR [geoserver.ows] - 
org.vfny.geoserver.wms.WmsException: org.vfny.geoserver.wms.WmsException: Rendering process failed
	at org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:486)
	at org.geoserver.ows.adapters.ResponseAdapter.getMimeType(ResponseAdapter.java:48)
	at org.geoserver.ows.Dispatcher.response(Dispatcher.java:711)
	at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:233)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.geoserver.test.GeoServerAbstractTestSupport.dispatch(GeoServerAbstractTestSupport.java:1054)
	at org.geoserver.test.GeoServerAbstractTestSupport.dispatch(GeoServerAbstractTestSupport.java:1021)
	at org.geoserver.test.GeoServerAbstractTestSupport.getAsServletResponse(GeoServerAbstractTestSupport.java:463)
	at org.vfny.geoserver.wms.responses.map.png.GetMapTest.testRemoteOWSUserStyleGet(GetMapTest.java:148)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at org.geoserver.test.GeoServerAbstractTestSupport.runTest(GeoServerAbstractTestSupport.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 junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.extensions.TestSetup.run(TestSetup.java:25)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.vfny.geoserver.wms.WmsException: Rendering process failed
	at org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:411)
	at org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:465)
	... 38 more
Caused by: java.lang.Exception: Error rendering feature
	at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1862)
	at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1770)
	at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:690)
	at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:515)
	at org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:387)
	... 39 more
Caused by: java.util.NoSuchElementException: Could not aquire feature:org.geotools.data.wfs.protocol.wfs.WFSException: WFS returned an exception. Target URL: http://sigma.openplans.org:8080/geoserver/wfs?. Originating request is: 
<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature handle="GeoTools 2.7-SNAPSHOT WFS DataStore"
 outputFormat="text/xml; subtype=gml/3.1.1" resultType="results"
 service="WFS" version="1.1.0" xmlns:ogc="http://www.opengis.net/ogc"
 xmlns:gml="http://www.opengis.net/gml"
 xmlns:xlink="http://www.w3.org/1999/xlink"
 xmlns:ows="http://www.opengis.net/ows" xmlns:wfs="http://www.opengis.net/wfs">
 <wfs:Query srsName="urn:x-ogc:def:crs:EPSG:4326" typeName="topp:states">
  <wfs:PropertyName>the_geom</wfs:PropertyName>
  <ogc:Filter>
   <ogc:BBOX>
    <ogc:PropertyName>the_geom</ogc:PropertyName>
    <gml:Envelope>
     <gml:lowerCorner>-90.0 -180.0</gml:lowerCorner>
     <gml:upperCorner>90.0 180.0</gml:upperCorner>
    </gml:Envelope>
   </ogc:BBOX>
  </ogc:Filter>
 </wfs:Query>
</wfs:GetFeature>


	[[java.lang.NullPointerException null]]
	at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:56)
	at org.geotools.data.store.NoContentIterator.next(NoContentIterator.java:41)
	at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1854)
	... 43 more
Caused by: org.geotools.data.wfs.protocol.wfs.WFSException: WFS returned an exception. Target URL: http://sigma.openplans.org:8080/geoserver/wfs?. Originating request is: 
<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature handle="GeoTools 2.7-SNAPSHOT WFS DataStore"
 outputFormat="text/xml; subtype=gml/3.1.1" resultType="results"
 service="WFS" version="1.1.0" xmlns:ogc="http://www.opengis.net/ogc"
 xmlns:gml="http://www.opengis.net/gml"
 xmlns:xlink="http://www.w3.org/1999/xlink"
 xmlns:ows="http://www.opengis.net/ows" xmlns:wfs="http://www.opengis.net/wfs">
 <wfs:Query srsName="urn:x-ogc:def:crs:EPSG:4326" typeName="topp:states">
  <wfs:PropertyName>the_geom</wfs:PropertyName>
  <ogc:Filter>
   <ogc:BBOX>
    <ogc:PropertyName>the_geom</ogc:PropertyName>
    <gml:Envelope>
     <gml:lowerCorner>-90.0 -180.0</gml:lowerCorner>
     <gml:upperCorner>90.0 180.0</gml:upperCorner>
    </gml:Envelope>
   </ogc:BBOX>
  </ogc:Filter>
 </wfs:Query>
</wfs:GetFeature>


	[[java.lang.NullPointerException null]]
	at org.geotools.data.wfs.v1_1_0.parsers.ExceptionReportParser.parse(ExceptionReportParser.java:101)
	at org.geotools.data.wfs.protocol.wfs.WFSExtensions.process(WFSExtensions.java:75)
	at org.geotools.data.wfs.v1_1_0.WFS_1_1_0_DataStore.getFeatureReader(WFS_1_1_0_DataStore.java:325)
	at org.geotools.data.wfs.v1_1_0.WFSFeatureCollection.reader(WFSFeatureCollection.java:168)
	at org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:223)
	at org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:193)
	at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1837)
	... 43 more

Andrea Aime added a comment - 21/Jan/10 12:32 PM

Here is a patch to address this one once and for all. First I've simplified the tests to hit only demo.opengeo.org, which I can control and diagnose better in case of failure.
Secondly, the remote ows tests are activated only if the "removeOwsTests" profile is activated, otherwise they won't be run.


Justin Deoliveira added a comment - 21/Jan/10 12:36 PM

Patch looks good to me.


Andrea Aime added a comment - 21/Jan/10 12:49 PM

Committed on 2.0.x and trunk. By default the remote OWS tests won't be run, but I've configured the build server
to still run them at every build.
I'm confident I can keep demo.opengeo.org up and running (as opposed to sigma, which I don't control) and if
anything happens all you have to do to get the build back is to remove the "remoteOwsTests" profile from the maven command line on Hudson.

Does it work for everybody?