Manuele Ventoruzzo ha scritto: > Hi Andrea, > > Yes, I am using StreamingRenderer. I got a NullpointerException and, of > course, nothing is shown. > > Here is stack trace: > 27-dic-2006 17.07.08 > org.geotools.renderer.lite.StreamingRenderer$DefaultRenderListener > errorOccurred > GRAVE: null > java.lang.NullPointerException > at > org.geotools.renderer.style.SLDStyleFactory.createPointStyle(SLDStyleFactory.java:486) > at > org.geotools.renderer.style.SLDStyleFactory.createStyleInternal(SLDStyleFactory.java:334) > at > org.geotools.renderer.style.SLDStyleFactory.createStyle(SLDStyleFactory.java:294) > at > org.geotools.renderer.lite.StreamingRenderer.processSymbolizers(StreamingRenderer.java:1366) > at > org.geotools.renderer.lite.StreamingRenderer.process(StreamingRenderer.java:1281) > at > org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1231) > at > org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:506) > > > And line 486 in SLDStyleFactory is the one you wrote. > > But there's no problem in that line. NullPointerException is thrown > because "feature" doesn't contains an attribute named "symbol" at that time.
> I think that this is due to the fact that method queryLayer() takes only > attributes founded in style definition. Unfortunately it doesn't work > with mark attribute. Ah, I see. StyleAttributeExtractor is used to extract the list of attributes that we need to load anyways to execute the SLD, but there's a bug in StyleAttributeExtractor.visit(Mark), it does not take into consideration the mark name, that's why it does not work. I've created a jira issue for this: http://jira.codehaus.org/browse/GEOT-1094 It's a quick one, I'll try to address it tomorrow (I have to add a unit test and port it on 2.3.x and trunk, so it'll take around an hour anyways...) > Setting optimizedDataLoadingEnabled hint to false, the program works > fine, but loads everything in memory. You mean it loads all attributes for each feature, not that it tries to load all right? Cheers Andrea ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
