Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Problems in StyleThemePage

Hello,

when trying to create a thematic style for a layer I get a NPE:

java.lang.NullPointerException
at net.refractions.udig.style.sld.editor.StyleThemePage$5.run(StyleThemePage.java:1274)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at net.refractions.udig.style.sld.editor.StyleThemePage.generateTheme(StyleThemePage.java:1473) at net.refractions.udig.style.sld.editor.StyleThemePage.gotFocus(StyleThemePage.java:1742) at net.refractions.udig.style.sld.editor.StyleEditorPage$1.pageChanged(StyleEditorPage.java:93) at net.refractions.udig.style.sld.editor.internal.EditorDialog$14.run(EditorDialog.java:1353)


The problem is in getAttributeType(String attributeTypeName). The line (~1625)

if (attributeType.getName().equals(attributeTypeName)) {

should read

if (attributeType.getName().getLocalPart().equals(attributeTypeName)) {

as attributeType.getName() returns a Name which can't be equal to attributeTypeName, because this is a String (unless one writes such an equals()).


Fixing that, I move further to the next exception:

java.lang.ClassCastException: org.geotools.filter.AttributeExpressionImpl cannot be cast to org.geotools.filter.LiteralExpression at org.geotools.filter.function.ClassificationFunction.getClasses(ClassificationFunction.java:156) at org.geotools.filter.function.UniqueIntervalFunction.calculate(UniqueIntervalFunction.java:49) at org.geotools.filter.function.UniqueIntervalFunction.evaluate(UniqueIntervalFunction.java:129) at org.geotools.filter.expression.ExpressionAbstract.evaluate(ExpressionAbstract.java:61) at net.refractions.udig.style.sld.editor.StyleThemePage$5.run(StyleThemePage.java:1377)

which is in geotools. Currently I don't have geotools set up, and can't debug this any further.

This bug is a show stopper :-(

Cheers,

Ugo

--
Ugo Taddei

Fraunhofer Institut Intelligente Analyse- und Informationssysteme (FhG IAIS)
http://www.iais.fraunhofer.de
Department Knowledge Discovery - IAIS.KD -
Working Group Spatial Decision Support
http://www.iais.fraunhofer.de/kd.html
phone  (+49)2241-14-2184    fax    (+49)2241-14-2072
Schloss Birlinghoven, D-53754 Sankt Augustin, Germany


Back to the top