[Geoserver-users] Able to serve WFS but not WMS - NPE Envelope.intersects

Hi all,

I am able to answer WFS calls (against geospatial mysql using geotools and
geoserver from the SVN this morning), but when I try and use google maps
or openlayers, I get the following:

445047 [SEVERE] org.geotools.renderer.lite.StreamingRenderer - null
java.lang.NullPointerException
        at com.vividsolutions.jts.geom.Envelope.intersects(Envelope.java:539)
        at
org.geotools.renderer.lite.StreamingRenderer.queryLayer(StreamingRenderer.java:951)
        at
org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1675)
        at
org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:724)
        at
org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:446)
        at
org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:271)
        at
org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:339)
        at
org.geoserver.ows.adapters.ResponseAdapter.getMimeType(ResponseAdapter.java:45)
        at org.geoserver.ows.Dispatcher.response(Dispatcher.java:559)
        at
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:204)
        at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
        at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
        at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
        at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
        at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
        at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1050)
        at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
        at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
        at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
        at org.mortbay.jetty.Server.handle(Server.java:269)
        at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:687)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
        at
org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
        at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

I'll debug but thought I'd post in case someone knows...

Same happens on tomcat.

Thanks

Tim

trobertson@anonymised.com ha scritto:

Hi all,

I am able to answer WFS calls (against geospatial mysql using geotools and
geoserver from the SVN this morning), but when I try and use google maps
or openlayers, I get the following:

Hmm... may I suggest against using MySql, and using Postgis instead?
The latter is a lot more tested.

This happens because coordinate transformation computation fails in the
first part of the queryLayer method, and then mysql returns a null
bounding box for the layer (meaning it's too expensive too compute,
so we're not dealing with this kind of case properly...).
Afaik MySql has issues with CRS informations (it may be it does not handle them at all in fact... can't remember).

Cheers
Andrea

Ok, thanks Andrea.

What's weird is the same thing worked on the WAR install I got running in
minutes against mysql on windows. I am now on (grrrrr) mac using the stuff
I built myself.

I will try and get the mac on the same network and point at the windows
mysql, as I suspect that from what you say, this is a mac mysql build
problem.

I am using mysql for historical reasons and the DB I really want to expose
is mysql. Also, although in its infancy if we all ignore it it'll never
develop I guess.

Thanks for the super fast response again!

Tim

-----Original Message-----
From: Andrea Aime [mailto:aaime@anonymised.com]
Sent: Friday, March 23, 2007 4:06 PM
To: trobertson@anonymised.com
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Able to serve WFS but not WMS - NPE
Envelope.intersects

trobertson@anonymised.com ha scritto:

Hi all,

I am able to answer WFS calls (against geospatial mysql using geotools and
geoserver from the SVN this morning), but when I try and use google maps
or openlayers, I get the following:

Hmm... may I suggest against using MySql, and using Postgis instead?
The latter is a lot more tested.

This happens because coordinate transformation computation fails in the
first part of the queryLayer method, and then mysql returns a null
bounding box for the layer (meaning it's too expensive too compute,
so we're not dealing with this kind of case properly...).
Afaik MySql has issues with CRS informations (it may be it does not
handle them at all in fact... can't remember).

Cheers
Andrea