[Geoserver-devel] FeatureChainingWfsTest checkDescribeFeatureType

Evening Ben:

I have been testing the geotools ResourceId patch; and have a failure inside app-schema…

Judging from the console the following fails:

INFO: WFS DescribeFeatureType response:

<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema elementFormDefault=“qualified” targetNamespace=“http://example.com” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>

<xsd:import namespace=“urn:cgi:xmlns:CGI:GeoSciML:2.0” schemaLocation=“http://www.geosciml.org/geosciml/2.0/xsd/geosciml.xsd”/>

<xsd:include schemaLocation=“file:/Users/jody/java/geoserver/trunk/src/extension/app-schema/app-schema-test/target/app-schema-mock421040920075292853data/featureTypes/ex_FirstParentFeature/simpleContent.xsd”/>

<xsd:include schemaLocation=“file:/Users/jody/java/geoserver/trunk/src/extension/app-schema/app-schema-test/target/app-schema-mock421040920075292853data/featureTypes/ex_SecondParentFeature/simpleContent.xsd”/>

<xsd:import namespace=“http://www.opengis.net/om/1.0” schemaLocation=“http://schemas.opengis.net/om/1.0.0/observation.xsd”/>

</xsd:schema>

The checkDescribeFeatureType test that is failing is:

String targetNamespace = evaluate(“//@targetNamespace”, doc);
assertTrue(targetNamespace.length() > 0);
int numberOfReferences = omSchemaLocation != null ? 3 : 2;
int numberOfImports = getMatchingNodes(“//xsd:import”, doc).getLength();
int numberOfIncludes = getMatchingNodes(“//xsd:include”, doc).getLength();
assertEquals(numberOfReferences, numberOfImports + numberOfIncludes);

And we end up with the correct values of:

  • numberOfImports = 2
  • numberOfIncludes = 2

This is checked against numberOfReferences = 3 resulting in a failed test…

I have considered modifying your code test to actually count the numberOfReferences:

int numberOfReferences = 1; // geosciml.xsd assumed

numberOfReferences += (exSchemaOneLocation == null ? 0 : 1);

numberOfReferences += (exSchemaTwoLocation == null ? 0 : 1);

numberOfReferences += (omSchemaLocation == null ? 0 : 1);

I am not sure how any of this could be related to the ResourceId patch :frowning:


Jody Garnett

Okay this failure shows up for me irregardless of if I have applied the patch or not.


Jody Garnett

On Thursday, 27 October 2011 at 8:36 PM, Jody Garnett wrote:

Evening Ben:

I have been testing the geotools ResourceId patch; and have a failure inside app-schema…

Judging from the console the following fails:

INFO: WFS DescribeFeatureType response:

<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema elementFormDefault=“qualified” targetNamespace=“http://example.com” xmlns:xsd=“http://www.w3.org/2001/XMLSchema”>

<xsd:import namespace=“urn:cgi:xmlns:CGI:GeoSciML:2.0” schemaLocation=“http://www.geosciml.org/geosciml/2.0/xsd/geosciml.xsd”/>

<xsd:include schemaLocation=“file:/Users/jody/java/geoserver/trunk/src/extension/app-schema/app-schema-test/target/app-schema-mock421040920075292853data/featureTypes/ex_FirstParentFeature/simpleContent.xsd”/>

<xsd:include schemaLocation=“file:/Users/jody/java/geoserver/trunk/src/extension/app-schema/app-schema-test/target/app-schema-mock421040920075292853data/featureTypes/ex_SecondParentFeature/simpleContent.xsd”/>

<xsd:import namespace=“http://www.opengis.net/om/1.0” schemaLocation=“http://schemas.opengis.net/om/1.0.0/observation.xsd”/>

</xsd:schema>

The checkDescribeFeatureType test that is failing is:

String targetNamespace = evaluate(“//@targetNamespace”, doc);
assertTrue(targetNamespace.length() > 0);
int numberOfReferences = omSchemaLocation != null ? 3 : 2;
int numberOfImports = getMatchingNodes(“//xsd:import”, doc).getLength();
int numberOfIncludes = getMatchingNodes(“//xsd:include”, doc).getLength();
assertEquals(numberOfReferences, numberOfImports + numberOfIncludes);

And we end up with the correct values of:

  • numberOfImports = 2
  • numberOfIncludes = 2

This is checked against numberOfReferences = 3 resulting in a failed test…

I have considered modifying your code test to actually count the numberOfReferences:

int numberOfReferences = 1; // geosciml.xsd assumed

numberOfReferences += (exSchemaOneLocation == null ? 0 : 1);

numberOfReferences += (exSchemaTwoLocation == null ? 0 : 1);

numberOfReferences += (omSchemaLocation == null ? 0 : 1);

I am not sure how any of this could be related to the ResourceId patch :frowning:


Jody Garnett

Jody, please file a Jira bug report and assign it to me.

You are seeing this on MacOS?

On 27/10/11 19:49, Jody Garnett wrote:

Okay this failure shows up for me irregardless of if I have applied the patch or not.

--
Jody Garnett

On Thursday, 27 October 2011 at 8:36 PM, Jody Garnett wrote:

Evening Ben:

I have been testing the geotools ResourceId patch; and have a failure inside app-schema...

Judging from the console the following fails:

INFO: WFS DescribeFeatureType response:

<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema elementFormDefault="qualified" targetNamespace="http://example.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;&gt;

     <xsd:import namespace="urn:cgi:xmlns:CGI:GeoSciML:2.0" schemaLocation="http://www.geosciml.org/geosciml/2.0/xsd/geosciml.xsd&quot;/&gt;

     <xsd:include schemaLocation="file:/Users/jody/java/geoserver/trunk/src/extension/app-schema/app-schema-test/target/app-schema-mock421040920075292853data/featureTypes/ex_FirstParentFeature/simpleContent.xsd"/>

     <xsd:include schemaLocation="file:/Users/jody/java/geoserver/trunk/src/extension/app-schema/app-schema-test/target/app-schema-mock421040920075292853data/featureTypes/ex_SecondParentFeature/simpleContent.xsd"/>

     <xsd:import namespace="http://www.opengis.net/om/1.0&quot; schemaLocation="http://schemas.opengis.net/om/1.0.0/observation.xsd&quot;/&gt;

</xsd:schema>

The checkDescribeFeatureType test that is failing is:

         String targetNamespace = evaluate("//@targetNamespace", doc);
         assertTrue(targetNamespace.length()> 0);
         int numberOfReferences = omSchemaLocation != null ? 3 : 2;
         int numberOfImports = getMatchingNodes("//xsd:import", doc).getLength();
         int numberOfIncludes = getMatchingNodes("//xsd:include", doc).getLength();
         assertEquals(numberOfReferences, numberOfImports + numberOfIncludes);

And we end up with the correct values of:
- numberOfImports = 2
- numberOfIncludes = 2

This is checked against numberOfReferences = 3 resulting in a failed test....

I have considered modifying your code test to actually count the numberOfReferences:

         int numberOfReferences = 1; // geosciml.xsd assumed

         numberOfReferences += (exSchemaOneLocation == null ? 0 : 1);

         numberOfReferences += (exSchemaTwoLocation == null ? 0 : 1);

         numberOfReferences += (omSchemaLocation == null ? 0 : 1);

I am not sure how any of this could be related to the ResourceId patch :frowning:

--
Jody Garnett

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Jody,

the build is passing on OpenGeo Hudson, our buildbot (Oracle JDK 6 32-bit), and locally on my machine (Oracle JDK 6 64-bit). This test also passes in Eclipse by itself or in the full FeatureChainingWfsTesT suite.

Please try a full online rebuild of geotools and geoserver. It is possible that you have a stale artifact causing this error.

Rini also reported seeing a similar error but she had not tried a full rebuild. I am hoping that a full rebuild will fix the build for both of youse.

Kind regards,
Ben.

On 31/10/11 10:19, Ben Caradoc-Davies wrote:

Jody, please file a Jira bug report and assign it to me.

You are seeing this on MacOS?

On 27/10/11 19:49, Jody Garnett wrote:

Okay this failure shows up for me irregardless of if I have applied
the patch or not.

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

From IRC it sounds like Rini has been able to reproduce the problem; here is the bug report http://jira.codehaus.org/browse/GEOS-4836


Jody Garnett

On Monday, 31 October 2011 at 2:24 PM, Ben Caradoc-Davies wrote:

Jody,

the build is passing on OpenGeo Hudson, our buildbot (Oracle JDK 6
32-bit), and locally on my machine (Oracle JDK 6 64-bit). This test also
passes in Eclipse by itself or in the full FeatureChainingWfsTesT suite.

Please try a full online rebuild of geotools and geoserver. It is
possible that you have a stale artifact causing this error.

Rini also reported seeing a similar error but she had not tried a full
rebuild. I am hoping that a full rebuild will fix the build for both of
youse.

Kind regards,
Ben.

On 31/10/11 10:19, Ben Caradoc-Davies wrote:

Jody, please file a Jira bug report and assign it to me.

You are seeing this on MacOS?

On 27/10/11 19:49, Jody Garnett wrote:

Okay this failure shows up for me irregardless of if I have applied
the patch or not.


Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Yes, I have the same test failure with the latest code. I am working on Windows platform which might be the factor.

Rini

From: Jody Garnett [mailto:jody.garnett@…403…]
Sent: Tuesday, 1 November 2011 12:43 PM
To: Caradoc-Davies, Ben (CESRE, Kensington)
Cc: Geoserver-devel; Angreani, Rini (CESRE, Kensington)
Subject: Re: FeatureChainingWfsTest checkDescribeFeatureType

From IRC it sounds like Rini has been able to reproduce the problem; here is the bug report http://jira.codehaus.org/browse/GEOS-4836


Jody Garnett

On Monday, 31 October 2011 at 2:24 PM, Ben Caradoc-Davies wrote:

Jody,

the build is passing on OpenGeo Hudson, our buildbot (Oracle JDK 6

32-bit), and locally on my machine (Oracle JDK 6 64-bit). This test also

passes in Eclipse by itself or in the full FeatureChainingWfsTesT suite.

Please try a full online rebuild of geotools and geoserver. It is

possible that you have a stale artifact causing this error.

Rini also reported seeing a similar error but she had not tried a full

rebuild. I am hoping that a full rebuild will fix the build for both of

youse.

Kind regards,

Ben.

On 31/10/11 10:19, Ben Caradoc-Davies wrote:

Jody, please file a Jira bug report and assign it to me.

You are seeing this on MacOS?

On 27/10/11 19:49, Jody Garnett wrote:

Okay this failure shows up for me irregardless of if I have applied

the patch or not.

Ben Caradoc-Davies <Ben.Caradoc-Davies@…254…>

Software Engineer

CSIRO Earth Science and Resource Engineering

Australian Resources Research Centre