Hi Andrea,

I have got this to work, using GeoServer 2.1.RC5.  I explicitly included the 
gt_pk_metadata_table, qualified by its schema name, in the primary key metadata 
table field and then reloaded the configuration.  If I left the field blank, it 
didn't work. If I had the name of the table but no schema name qualifying it, 
likewise it didn't work.  Hence it had to be in this format:

MY_SCHEMA_NAME.GT_PK_METADATA_TABLE

It also worked like this when I gave the metadata table a different name, 
provided I had it fully qualified in the field.

Given that leaving the field blank didn't work, is this a bug, or is it 
expected behaviour (in which case the docs need clarifying)?

Many thanks for your help with this, 

Simon

--- On Wed, 11/5/11, Andrea Aime <[email protected]> wrote:

> From: Andrea Aime <[email protected]>
> Subject: Re: [Geoserver-users] How to customise GeoServer WFT-S 
> Transactionhandling
> To: "Simon Payne" <[email protected]>
> Cc: "Rahkonen Jukka" <[email protected]>, 
> [email protected]
> Date: Wednesday, 11 May, 2011, 16:44
> On Wed, May 11, 2011 at 11:22 AM,
> Simon Payne
> <[email protected]>
> wrote:
> > Hi Andrea
> >
> > Many thanks for your prompt responses and for adding
> these documents which makes things clearer.
> >
> > Unfortunately... I am probably missing something very
> obvious, but I can't get this to work. What I have done is
> as follows: -
> >
> > 1. Installed GeoServer 2.0.2 as a web app deployed in
> JBoss 5.0.1.GA, and installed the Oracle database plugin
> 2.0.2.
> > 2. In my Oracle database, ran some simple spatial SQL
> statements to create a table - I used the well-known Oracle
> COLA_MARKETS example (see 
> http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14255/sdo_objrelschema.htm)
>  where the table DDL is
> >
> > CREATE TABLE cola_markets (
> >  mkt_id NUMBER PRIMARY KEY,
> >  name VARCHAR2(32),
> >  shape SDO_GEOMETRY);
> >
> > 3. I created an Oracle Store using JNDI, created a
> layer pointed at my table, and checked it all worked fine by
> pushing a WFS-T Insert through and seeing that a new row
> appeared in the COLA_MARKETS table. (However, the fid for
> the new record is auto-generated, I'm not sure where it
> comes from as it seems to behave the same even if I disable
> or drop the primary key from the table. I assume GeoServer
> is generating this value from somewhere other than the
> database...)
> >
> > 4. Created a sequence called SEQUENCE1 to use for
> returning the feature ids.
> > 5. Ran the SQL you have documented to create the
> gt_pk_metadata_table, and inserted a row with the following
> data:
> >
> >  TABLE_SCHEMA: {MY SCHEMA}
> >  TABLE_NAME: COLA_MARKETS
> >  PK_COLUMN: MKT_ID
> >  PK_COLUMN_IDX: NULL
> >  PK_POLICY: sequence
> >  PK_SEQUENCE: SEQUENCE1
> >
> > 6. Ran the WFS-T Insert again, but this time it still
> gave a sequence number from the same series as at step 3.
>  I was expecting to get the next value from SEQUENCE1.
> >
> > Have I missed a step in the configuration?  Do you
> have any suggestions?
> 
> Hmmm... that GS version is actually very old, I don't
> recall if it
> contains support for the
> metadata table or not.
> Second, you should reset GS after creating that table in
> order to make
> it notice its presence.
> There should be a "reload" button in the geoserver status
> page that
> the admin might use
> to reset the GS state (again, don't remember if it was
> already there in 2.0.2)
> 
> Cheers
> Andrea
> 
> >
> > thanks
> >
> > Simon
> >
> >
> > --- On Tue, 10/5/11, Andrea Aime <[email protected]>
> wrote:
> >
> >> From: Andrea Aime <[email protected]>
> >> Subject: Re: [Geoserver-users] How to customise
> GeoServer WFT-S Transactionhandling
> >> To: "Rahkonen Jukka" <[email protected]>
> >> Cc: "Simon Payne" <[email protected]>,
> [email protected]
> >> Date: Tuesday, 10 May, 2011, 19:30
> >> On Tue, May 10, 2011 at 4:50 PM,
> >> Rahkonen Jukka
> >> <[email protected]>
> >> wrote:
> >> > Hi,
> >> >
> >> > You can configure it by creating a special
> table,
> >> perhaps GEOSERVER_METADATA by default, into Oracle
> and
> >> pointing Geoserver to use it. Reading this old
> thread should
> >> guide you into right direction. I am not sure
> where the
> >> official documentation is.
> >> >
> >> > http://sourceforge.net/mailarchive/forum.php?thread_name=29621032.post%40talk.nabble.com&forum_name=geoserver-users
> >>
> >> Here we go with some official docs :-p :
> >>
> >> http://docs.geoserver.org/stable/en/user/data/primarykey.html
> >>
> >> Cheers
> >> Andrea
> >>
> >> --
> >>
> -------------------------------------------------------
> >> Ing. Andrea Aime
> >> GeoSolutions S.A.S.
> >> Tech lead
> >>
> >> Via Poggio alle Viti 1187
> >> 55054  Massarosa (LU)
> >> Italy
> >>
> >> phone: +39 0584 962313
> >> fax:      +39 0584 962313
> >>
> >> http://www.geo-solutions.it
> >> http://geo-solutions.blogspot.com/
> >> http://www.youtube.com/user/GeoSolutionsIT
> >> http://www.linkedin.com/in/andreaaime
> >> http://twitter.com/geowolf
> >>
> >>
> -------------------------------------------------------
> >>
> >
> >
> 
> 
> 
> -- 
> -------------------------------------------------------
> Ing. Andrea Aime
> GeoSolutions S.A.S.
> Tech lead
> 
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
> 
> phone: +39 0584 962313
> fax:      +39 0584 962313
> 
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.youtube.com/user/GeoSolutionsIT
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
> 
> -------------------------------------------------------
> 

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to