Mauricio Mantilla a écrit :
Hi,
I'm a new user of geotools and i'm trying to use de SpearfihPostgis sample to view data from my own postgis database.
I'm not changing significant parts of the code but i'm getting this error:

java.lang.NullPointerException
        at 
org.geotools.renderer.j2d.RenderedLayerFactory.findGeometry(RenderedLayerFactory.java:685)

I'm guessing the mapcontext is not getting any data from the database, but i don't know why.


I'm not familiar with neither PostGIS and RenderedLayerFactory (I didn't wrote this class). But looking at the source code, it sound like that a Feature contains no data (in which case throwing a NullPointerException would be a RenderedLayerFactory bug). If you have any chance to step through the code, it may be worth to put a break point on RenderedLayerFactory line 661 and check what 'geoName' is, and if an attribute exists for this name.

        Martin.


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to