Hello
I'm using geoserver 1.6.2 on Tomcat 6.0.16 with JDK 1.6.0_03.
In the last week I've found this error when accessing the map preview page.
the following exception was thrown:
java.lang.IllegalArgumentException: Duplicate AttributeTypes
DefaultAttributeType [name=RICERCA , type=class java.lang.String ,
nillable=true, min=0, max=0]
If I reload the url in the browser then the list of map previews show
perfectly.
I gave a look at the log tofind something more about the exception but
unfortunately, with log set at VERBOSE, there is only a line:
2008-06-12 15:15:21,587 INFO [geoserver.filters] - 127.0.0.1 "GET
/geoserver160/mapPreview.do" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.2; SV1; .NET CLR 1.1.4322)" "http://localhost:8082/geoserver160/demo.do"
2008-06-12 15:15:21,759 WARN [action.RequestProcessor] - Unhandled Exception
thrown: class java.lang.IllegalArgumentException
I'm not sure it is related to the error but I've recently installed the
ArcSDE plugin
Thanks you for suggestions
Stefano Iacovella ha scritto:
Hello
I'm using geoserver 1.6.2 on Tomcat 6.0.16 with JDK 1.6.0_03.
In the last week I've found this error when accessing the map preview page.
the following exception was thrown:
java.lang.IllegalArgumentException: Duplicate AttributeTypes
DefaultAttributeType [name=RICERCA , type=class java.lang.String ,
nillable=true, min=0, max=0]
It seems one of your data sources has two columns with the same name.
In a database that cannot happen, but it happens sometimes with shapefiles. The usual suggestion is to go and fix the data source.
I believe ogr2ogr is more tolerant to this error than our data stores,
in this case try to filter your shapefile thru it, it should generate
a shapefile with no duplicate columns.
Hope this helps
Cheers
Andrea
Thank you Andrea for the hint
It was a configuration error rather than a shapefile error but you was right
about the error source.
Indeed there was a schema.xml error in a shapefile featuretype
configuration.
The attribute named 'RICERCA' was typed two times although the field in the
shapefile was only one.
Stefano Iacovella ha scritto:
Hello
I'm using geoserver 1.6.2 on Tomcat 6.0.16 with JDK 1.6.0_03.
In the last week I've found this error when accessing the map preview
page.
the following exception was thrown:
java.lang.IllegalArgumentException: Duplicate AttributeTypes
DefaultAttributeType [name=RICERCA , type=class java.lang.String ,
nillable=true, min=0, max=0]
It seems one of your data sources has two columns with the same name.
In a database that cannot happen, but it happens sometimes with
shapefiles. The usual suggestion is to go and fix the data source.
I believe ogr2ogr is more tolerant to this error than our data stores,
in this case try to filter your shapefile thru it, it should generate
a shapefile with no duplicate columns.
Hope this helps
Cheers
Andrea