GetPropertyExecutor floods logs with dubious WARNs
--------------------------------------------------

                 Key: GEOT-2621
                 URL: http://jira.codehaus.org/browse/GEOT-2621
             Project: GeoTools
          Issue Type: Bug
          Components: core xml
            Reporter: Ben Caradoc-Davies
            Assignee: Justin Deoliveira
            Priority: Minor


The LOGGER at line 74 in GetPropertyExecutor floods logs with dubious WARNs . I 
do not know what it is meant to do, or what precondition is being violated.

The offending code:
{code}
           if ((binding.getType() != null)
                    && !binding.getType().isAssignableFrom(parent.getClass())) {
                LOGGER.warning(parent + " (" + parent.getClass().getName() + ") 
"
                    + " is not of type " + binding.getType().getName());
{code}

In ElementEncodeExecutor we added:
{code}
!(object instanceof ComplexAttribute)
{code}
but this will not handle the FeatureCollection case.

Simple feature example (GeoServer 1.7.5). I am looking at a log with 730 of 
these:
{code}
19 Jul 06:25:09 WARN [geotools.xml] - 
org.geotools.data.crs.reprojectfeatureresu...@101eae8 
(org.geotools.data.crs.ReprojectFeatureResults)  is not of type 
[Lorg.opengis.feature.simple.SimpleFeature;
{code}

Things get far worse when using app-schema. When configured for the app-schema 
tutorial (trunk):
{code}
2009-07-14 16:41:23,107 WARN [geotools.xml] - 
org.geotools.data.complex.mappingfeaturecollect...@14c92a7 
(org.geotools.data.complex.MappingFeatureCollection)  is not of type 
[Lorg.opengis.feature.simple.SimpleFeature;
2009-07-14 16:41:23,182 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Olivine basalt, tuff, 
microgabbro, minor sedimentary rocks] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,183 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Olivine basalt, tuff, 
microgabbro, minor sedimentary rocks] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,183 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Olivine basalt, tuff, 
microgabbro, minor sedimentary rocks] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,183 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Olivine basalt, tuff, 
microgabbro, minor sedimentary rocks] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,183 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Olivine basalt, tuff, 
microgabbro, minor sedimentary rocks] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,183 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Olivine basalt, tuff, 
microgabbro, minor sedimentary rocks] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,183 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Olivine basalt, tuff, 
microgabbro, minor sedimentary rocks] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,183 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Olivine basalt, tuff, 
microgabbro, minor sedimentary rocks] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,186 WARN [geotools.xml] - 
ComplexAttributeImpl:name<CodeType>=[Some basalt] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,187 WARN [geotools.xml] - 
ComplexAttributeImpl:name<CodeType>=[urn:x-test:GeologicUnit:16777549126931093] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,201 WARN [geotools.xml] - 
ComplexAttributeImpl:name<CodeType>=[More basalt] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,201 WARN [geotools.xml] - 
ComplexAttributeImpl:name<CodeType>=[urn:x-test:GeologicUnit:16777549126931093] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,217 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Calcareous mudstone, minor 
thin calcarenite beds: locally carbonaceous and burrowed, locally abundant 
glauconite pellets and polished quartz sand, foraminifers, bryozoans, 
brachiopods and molluscs; open marine (below storm wave base) deposits] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,218 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Calcareous mudstone, minor 
thin calcarenite beds: locally carbonaceous and burrowed, locally abundant 
glauconite pellets and polished quartz sand, foraminifers, bryozoans, 
brachiopods and molluscs; open marine (below storm wave base) deposits] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,218 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Calcareous mudstone, minor 
thin calcarenite beds: locally carbonaceous and burrowed, locally abundant 
glauconite pellets and polished quartz sand, foraminifers, bryozoans, 
brachiopods and molluscs; open marine (below storm wave base) deposits] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,218 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Calcareous mudstone, minor 
thin calcarenite beds: locally carbonaceous and burrowed, locally abundant 
glauconite pellets and polished quartz sand, foraminifers, bryozoans, 
brachiopods and molluscs; open marine (below storm wave base) deposits] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,218 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Calcareous mudstone, minor 
thin calcarenite beds: locally carbonaceous and burrowed, locally abundant 
glauconite pellets and polished quartz sand, foraminifers, bryozoans, 
brachiopods and molluscs; open marine (below storm wave base) deposits] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,218 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Calcareous mudstone, minor 
thin calcarenite beds: locally carbonaceous and burrowed, locally abundant 
glauconite pellets and polished quartz sand, foraminifers, bryozoans, 
brachiopods and molluscs; open marine (below storm wave base) deposits] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,218 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Calcareous mudstone, minor 
thin calcarenite beds: locally carbonaceous and burrowed, locally abundant 
glauconite pellets and polished quartz sand, foraminifers, bryozoans, 
brachiopods and molluscs; open marine (below storm wave base) deposits] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,218 WARN [geotools.xml] - 
ComplexAttributeImpl:description<StringOrRefType>=[Calcareous mudstone, minor 
thin calcarenite beds: locally carbonaceous and burrowed, locally abundant 
glauconite pellets and polished quartz sand, foraminifers, bryozoans, 
brachiopods and molluscs; open marine (below storm wave base) deposits] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,220 WARN [geotools.xml] - 
ComplexAttributeImpl:name<CodeType>=[Some mudstone] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
2009-07-14 16:41:23,220 WARN [geotools.xml] - 
ComplexAttributeImpl:name<CodeType>=[urn:x-test:GeologicUnit:16777549126931077] 
(org.geotools.feature.ComplexAttributeImpl)  is not of type java.lang.String
{code}




-- 
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

        

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to