My application throws an exception when I use a DataStore connected to a PostGIS
table with a column named "name". I am using Geoserver.
There is a bug that make it impossible to use a table with a column
The problem happens only when Geoserver query answers have a column named "name".
Debugging the xml parser code, I have found in
org.geotools.xml.handlers.ComplexElementHandler that the class attribute "type"
contains the name of all table columns and some other objects.
But there are **TWO** instances with a name "name", when the table has such
a column. The second occurrence is related to the desired column, but the
first occurrence is something else. Maybe every type has automatically this
object with name "name", even when there is no column named "name".
The two occurrences of "name" should be treated differently.
I have fixed this bug by searching "type" backwards, from the end to the beginning, in
But I donīt think it is an elegant solution - I even donīt know it is a solution
for all similar cases