FeatureTypeBuilder throws "Duplicate AttributeTypes" while parsing GML with
NAME attribute
------------------------------------------------------------------------------------------
Key: GEOT-1560
URL: http://jira.codehaus.org/browse/GEOT-1560
Project: GeoTools
Issue Type: Bug
Components: new modules
Affects Versions: 2.4-RC0
Reporter: Alexander Karnstedt
I saw similar issue already discussed at
http://jira.codehaus.org/browse/GEOS-1331 - but with no result or bug fix.
The problem occurs while parsing GML (schema assisted) with the new GTXML API's
and feature type attributes named NAME.
java.lang.RuntimeException: Parsing failed for OP_Area:
java.lang.IllegalArgumentException: Duplicate AttributeTypes
DefaultAttributeType [name=name , type=class java.lang.String , nillable=true,
min=0, max=0]
at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:142)
at
org.geotools.xml.impl.BindingWalker$BindingExecutionChain.execute(BindingWalker.java:197)
at org.geotools.xml.impl.BindingWalker.walk(BindingWalker.java:163)
at
org.geotools.xml.impl.ElementHandlerImpl.endElement(ElementHandlerImpl.java:222)
at
org.geotools.xml.impl.ParserHandler.endElement(ParserHandler.java:496)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.geotools.xml.Parser.parse(Parser.java:184)
at org.geotools.xml.Parser.parse(Parser.java:146)
at org.mauszeig.gtxml.nas.ParserTest.testParse(ParserTest.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.IllegalArgumentException: Duplicate AttributeTypes
DefaultAttributeType [name=name , type=class java.lang.String , nillable=true,
min=0, max=0]
at
org.geotools.feature.FeatureTypeBuilder.check(FeatureTypeBuilder.java:607)
at
org.geotools.feature.FeatureTypeBuilder.addType(FeatureTypeBuilder.java:354)
at
org.geotools.gml2.bindings.GML2ParsingUtils.featureType(GML2ParsingUtils.java:212)
at
org.geotools.gml2.bindings.GML2ParsingUtils.parseFeature(GML2ParsingUtils.java:84)
at
org.geotools.gml3.bindings.GML3ParsingUtils.parseFeature(GML3ParsingUtils.java:62)
at
org.geotools.gml3.bindings.AbstractFeatureTypeBinding.parse(AbstractFeatureTypeBinding.java:99)
at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:131)
... 33 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel