[Geoserver-devel] Datastore problem in GeoServer

I have two PostGIS datastores, "store1" and "store2".
store1 is in namespace "ns1" = "http://ns1.example.invalid/"
store2 is in namespace "ns1" = "http://ns2.example.invalid/"
Both datastores have a table called "features".
I have two feature types "ns1:features" and "ns2:features".
Both have a schema with in it the (GeoServer-generated) complexType with
name "features_Type".
If I try to store a feature in ns1:features I get an error message from
GeoServer that some attribute that only exists in ns1:features is not
found:

  26-Jul-2007 14:56:10 org.vfny.geoserver.servlets.AbstractService sendError
  SEVERE: Service exception occurred
  org.vfny.geoserver.wfs.responses.WfsTransactionException: org.xml.sax.SAXException: Could not find attributeType named featureNamein featureType DefaultFeatureType [name=features , namespace=http://ns2.example.invalid/ , abstract=false , types=(...list of all attributes in wrong featureType deleted...)]

[the missing space between the attribute type "featureName" and "in" is
GeoServer's BTW]

Complete stack trace attached. This is with the GeoServer-1.5.x nightly
from June 21st.

The WFS transaction that tries to store the feature has the correct
namespaces and everything:

  <wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs&quot; service="WFS" version="1.0.0"><wfs:Insert><ns1:features xmlns:ns1="http://ns1.example.invalid/&quot;&gt;&lt;ns1:featureName&gt;test&lt;/ns1:featureName&gt;\.\.\.etc\.\.\.&lt;/ns1:features&gt;&lt;/wfs:Insert&gt;&lt;/wfs:Transaction&gt;

If I remove the featureType ns2:features from my config the store succeeds.

Regards,
--
-- Gertjan van Oosten, gertjan@anonymised.com, West Consulting B.V., +31 15 2191 600

(attachments)

geoserver-trace.txt (8.69 KB)

I will look into this.. Just for the sake of completeness could include the structure of the two tables. Thanks.

-Justin

Gertjan van Oosten wrote:

I have two PostGIS datastores, "store1" and "store2".
store1 is in namespace "ns1" = "http://ns1.example.invalid/&quot;
store2 is in namespace "ns1" = "http://ns2.example.invalid/&quot;
Both datastores have a table called "features".
I have two feature types "ns1:features" and "ns2:features".
Both have a schema with in it the (GeoServer-generated) complexType with
name "features_Type".
If I try to store a feature in ns1:features I get an error message from
GeoServer that some attribute that only exists in ns1:features is not
found:

  26-Jul-2007 14:56:10 org.vfny.geoserver.servlets.AbstractService sendError
  SEVERE: Service exception occurred
  org.vfny.geoserver.wfs.responses.WfsTransactionException: org.xml.sax.SAXException: Could not find attributeType named featureNamein featureType DefaultFeatureType [name=features , namespace=http://ns2.example.invalid/ , abstract=false , types=(...list of all attributes in wrong featureType deleted...)]

[the missing space between the attribute type "featureName" and "in" is
GeoServer's BTW]

Complete stack trace attached. This is with the GeoServer-1.5.x nightly
from June 21st.

The WFS transaction that tries to store the feature has the correct
namespaces and everything:

  <wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs&quot; service="WFS" version="1.0.0"><wfs:Insert><ns1:features xmlns:ns1="http://ns1.example.invalid/&quot;&gt;&lt;ns1:featureName&gt;test&lt;/ns1:featureName&gt;\.\.\.etc\.\.\.&lt;/ns1:features&gt;&lt;/wfs:Insert&gt;&lt;/wfs:Transaction&gt;

If I remove the featureType ns2:features from my config the store succeeds.

Regards,

------------------------------------------------------------------------

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

!DSPAM:4007,46a8ba9e5581439371379!

------------------------------------------------------------------------

_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

!DSPAM:4007,46a8ba9e5581439371379!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

As quoted from Justin Deoliveira <jdeolive@anonymised.com>:

Gertjan van Oosten wrote:
> I have two PostGIS datastores, "store1" and "store2".
> store1 is in namespace "ns1" = "http://ns1.example.invalid/&quot;
> store2 is in namespace "ns1" = "http://ns2.example.invalid/&quot;
> Both datastores have a table called "features".
> I have two feature types "ns1:features" and "ns2:features".
> Both have a schema with in it the (GeoServer-generated) complexType with
> name "features_Type".
> If I try to store a feature in ns1:features I get an error message from
> GeoServer that some attribute that only exists in ns1:features is not
> found:
>
> 26-Jul-2007 14:56:10 org.vfny.geoserver.servlets.AbstractService sendError
> SEVERE: Service exception occurred
> org.vfny.geoserver.wfs.responses.WfsTransactionException: org.xml.sax.SAXException: Could not find attributeType named featureNamein featureType DefaultFeatureType [name=features , namespace=http://ns2.example.invalid/ , abstract=false , types=(...list of all attributes in wrong featureType deleted...)]
>
> [the missing space between the attribute type "featureName" and "in" is
> GeoServer's BTW]
>
> Complete stack trace attached. This is with the GeoServer-1.5.x nightly
> from June 21st.
>
> The WFS transaction that tries to store the feature has the correct
> namespaces and everything:
>
> <wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs&quot; service="WFS" version="1.0.0"><wfs:Insert><ns1:features xmlns:ns1="http://ns1.example.invalid/&quot;&gt;&lt;ns1:featureName&gt;test&lt;/ns1:featureName&gt;\.\.\.etc\.\.\.&lt;/ns1:features&gt;&lt;/wfs:Insert&gt;&lt;/wfs:Transaction&gt;
>
> If I remove the featureType ns2:features from my config the store succeeds.

I will look into this.. Just for the sake of completeness could include
the structure of the two tables. Thanks.

Here you go:

store1=# \d features
                                    Table "public.features"
   Column | Type | Modifiers
------------+--------------------------+------------------------------------------------------
oid | integer | not null default nextval('features_oid_seq'::regclass)
featureName| character varying | not null
width | double precision | not null
height | double precision | not null
geom | geometry | not null
timestamp | timestamp with time zone | not null
Indexes:
    "features_pkey" PRIMARY KEY, btree (oid)
Check constraints:
    "enforce_dims_geom" CHECK (ndims(geom) = 2)
    "enforce_geotype_geom" CHECK (geometrytype(geom) = 'POINT'::text OR geom IS NULL)
    "enforce_srid_geom" CHECK (srid(geom) = 4326)

store2=# \d features
                                      Table "public.features"
     Column | Type | Modifiers
----------------+--------------------------+------------------------------------------------------
oid | integer | not null default nextval('features_oid_seq'::regclass)
name | character varying |
type | character varying |
time | timestamp with time zone |
geometry | geometry |
Indexes:
    "features_pkey" PRIMARY KEY, btree (oid)
Check constraints:
    "enforce_dims_geometry" CHECK (ndims(geometry) = 2)
    "enforce_geotype_geometry" CHECK (geometrytype(geometry) = 'POINT'::text OR geometry IS NULL)
    "enforce_srid_geometry" CHECK (srid(geometry) = 4326)

Regards,
--
-- Gertjan van Oosten, gertjan@anonymised.com, West Consulting B.V., +31 15 2191 600

...

If I remove the featureType ns2:features from my config the store succeeds.

I will look into this.. Just for the sake of completeness could include the structure of the two tables. Thanks.

Hmm... I don't see a jira issue open for this... fear we're going to forget it?
Cheers
Andrea

Its sitting on my todo list of things to look at... after i verified it i was going to start the jira task... perhaps we should just create the task anyways.

-Justin

Andrea Aime wrote:

...

If I remove the featureType ns2:features from my config the store succeeds.

I will look into this.. Just for the sake of completeness could include the structure of the two tables. Thanks.

Hmm... I don't see a jira issue open for this... fear we're going to forget it?
Cheers
Andrea

-------------------------------------------------------------------------
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/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

!DSPAM:4007,46ad92b3106641030819293!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Ok.. so i tried to replicate this but could not. I followed the steps provided by Gertjan and the insert succeeded no problem. Andrea perhaps you can be the tie breaker and try it out.

-Justin

Andrea Aime wrote:

...

If I remove the featureType ns2:features from my config the store succeeds.

I will look into this.. Just for the sake of completeness could include the structure of the two tables. Thanks.

Hmm... I don't see a jira issue open for this... fear we're going to forget it?
Cheers
Andrea

-------------------------------------------------------------------------
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/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

!DSPAM:4007,46ad92b3106641030819293!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Justin Deoliveira ha scritto:

Ok.. so i tried to replicate this but could not. I followed the steps provided by Gertjan and the insert succeeded no problem. Andrea perhaps you can be the tie breaker and try it out.

Yeah, I managed to reproduce it, and hopefully fixed it.
Gertjan, can you try out the July 31 nightly (when it's ready) from
http://geo.openplans.org/nightly/1.5.x/ and tell me if things work
for you?

Cheers
Andrea

Hi Andrea,

Sorry for the delay, I was frantically busy.

As quoted from Andrea Aime <aaime@anonymised.com>:

Yeah, I managed to reproduce it, and hopefully fixed it.
Gertjan, can you try out the July 31 nightly (when it's ready) from
http://geo.openplans.org/nightly/1.5.x/ and tell me if things work
for you?

I tried it, and it does indeed work. Thanks Andrea!
By the way, it does log an (unrelated) error:

  03-Aug-2007 08:52:31 org.geotools.util.CommonHandler publish
  SEVERE: There's code leaving readers or writers unclosed (you got an unclosed QueryData object, which is usually held by a reader or a writer).
  Call reader/writer.close() after using them to ensure they do not hold state such as JDCB connections.
   QueryData was open against feature type: features

[Also mind the typo "JDCB" -> "JDBC"]

Kind regards,
--
-- Gertjan van Oosten, gertjan@anonymised.com, West Consulting B.V., +31 15 2191 600

Gertjan van Oosten ha scritto:

Hi Andrea,

Sorry for the delay, I was frantically busy.

As quoted from Andrea Aime <aaime@anonymised.com>:

Yeah, I managed to reproduce it, and hopefully fixed it.
Gertjan, can you try out the July 31 nightly (when it's ready) from
http://geo.openplans.org/nightly/1.5.x/ and tell me if things work
for you?

I tried it, and it does indeed work. Thanks Andrea!

My pleasure.

By the way, it does log an (unrelated) error:

  03-Aug-2007 08:52:31 org.geotools.util.CommonHandler publish
  SEVERE: There's code leaving readers or writers unclosed (you got an unclosed QueryData object, which is usually held by a reader or a writer).
  Call reader/writer.close() after using them to ensure they do not hold state such as JDCB connections.
   QueryData was open against feature type: features

[Also mind the typo "JDCB" -> "JDBC"]

Triple bah, this is bad, bad, bad. It means some JDBC connections are temporarily lost from the pool (the code in the finalizer closes them
when garbage collection is run, but this is unpredictable).
Can you tell me what were you doing when that error appeared?

Cheers
Andrea

As quoted from Andrea Aime <aaime@anonymised.com>:

> 03-Aug-2007 08:52:31 org.geotools.util.CommonHandler publish
> SEVERE: There's code leaving readers or writers unclosed (you got an unclosed QueryData object, which is usually held by a reader or a writer).
> Call reader/writer.close() after using them to ensure they do not hold state such as JDCB connections.
> QueryData was open against feature type: features
>
> [Also mind the typo "JDCB" -> "JDBC"]

Triple bah, this is bad, bad, bad. It means some JDBC connections are
temporarily lost from the pool (the code in the finalizer closes them
when garbage collection is run, but this is unpredictable).
Can you tell me what were you doing when that error appeared?

I can't for the life of me figure it out; no matter what I try, I can't
reproduce it. Weird huh? If I see it again, I'll try to pay more
attention to what I was doing...

Kind regards,
--
-- Gertjan van Oosten, gertjan@anonymised.com, West Consulting B.V., +31 15 2191 600