[Geoserver-users] Problems with sqL

I am importing a set of polygons to MSSQL spatial but continuously get “Reload feature type ” when set up the layer. I am expecting “Edit sql view

· Using Geoserver: 2.4.4

· SQL Server 10.50.400

Spatial preview on SQL server works fine. I have tried importing from both ESRI FILE Geod and shapefiles. Same issue.

Any suggestions? Common pitfalls?

Ragnvald

Check the logs for a stack trace, perhaps it can provide a clue. Usually the only way to confuse a database setup is by not filling in the correct metadata / spatial index / spatial reference system information. GeoServer makes use of these kind of details when determining the feature type.

···

Jody Garnett

On Sun, Feb 9, 2014 at 4:11 AM, Ragnvald Larsen <ragnvald.larsen@anonymised.com> wrote:

I am importing a set of polygons to MSSQL spatial but continuously get “Reload feature type ” when set up the layer. I am expecting “Edit sql view

· Using Geoserver: 2.4.4

· SQL Server 10.50.400

Spatial preview on SQL server works fine. I have tried importing from both ESRI FILE Geod and shapefiles. Same issue.

Any suggestions? Common pitfalls?

Ragnvald


Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Problem solved - or at least avoided. Two ways potentially leads to the glorious access to MSSQL spatial based layers. Both starts with the user choosing “Add a new resource”, after that I choose the relevant data store from the drop down list. Next is one of these two:

  1. “Configure new SQL view…”

  2. Press “Publish”

The last option (2) opens the layer definition dialogue and shows “Reload feature type …”. The first one (1) starts with letting me write a SQL query. This one works.

I am running geoserver on a windows computer with “JVM Version: Oracle Corporation: 1.7.0_17 (Java HotSpot™ 64-Bit Server VM)”.

I suspect this is a windows only issue.

Bug filed in JIRA: http://jira.codehaus.org/browse/GEOS-6342

Ragnvald

···

Check the logs for a stack trace, perhaps it can provide a clue. Usually the only way to confuse a database setup is by not filling in the correct metadata / spatial index / spatial reference system information. GeoServer makes use of these kind of details when determining the feature type.

Jody Garnett

On Sun, Feb 9, 2014 at 4:11 AM, Ragnvald Larsen <ragnvald.larsen@anonymised.com> wrote:

I am importing a set of polygons to MSSQL spatial but continuously get “Reload feature type ” when set up the layer. I am expecting “Edit sql view

· Using Geoserver: 2.4.4

· SQL Server 10.50.400

Spatial preview on SQL server works fine. I have tried importing from both ESRI FILE Geod and shapefiles. Same issue.

Any suggestions? Common pitfalls?

Ragnvald


Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Ragnvald,

···

2014-02-10 23:10 GMT+01:00 Ragnvald Larsen <ragnvald.larsen@anonymised.com>:

Problem solved - or at least avoided. Two ways potentially leads to the glorious access to MSSQL spatial based layers. Both starts with the user choosing “Add a new resource”, after that I choose the relevant data store from the drop down list. Next is one of these two:

  1. “Configure new SQL view…”

  2. Press “Publish”

The last option (2) opens the layer definition dialogue and shows “Reload feature type …”. The first one (1) starts with letting me write a SQL query. This one works.

I am running geoserver on a windows computer with “JVM Version: Oracle Corporation: 1.7.0_17 (Java HotSpot™ 64-Bit Server VM)”.

I suspect this is a windows only issue.

Bug filed in JIRA: http://jira.codehaus.org/browse/GEOS-6342

I think there is a misunderstanding here: the option 1 and 2 are quite different in scope: the “Configure new SQL view” allows you to publish a “virtual table” from your database built using a sql query, while the second one is used to publish an existing database table “as is”, so also the configuration UI is different for the layers built using one of the two methods.

With the first one you get an “Edit SQL View” link that allows you to define the sql for the virtual table, for the second one you cannot define a sql query, you only get a “Reload feature type…” that simply reads the table fields and properties from the database and synchronizes the internal cache.
So, as it is usually said: “it’s not a bug, it’s a feature” :-).

Cheers,
Mauro Bartolomeoli

On Tue, Feb 11, 2014 at 8:55 AM, Mauro Bartolomeoli <
mauro.bartolomeoli@anonymised.com> wrote:

With the first one you get an "Edit SQL View" link that allows you to
define the sql for the virtual table, for the second one you cannot define
a sql query, you only get a "Reload feature type..." that simply reads the
table fields and properties from the database and synchronizes the internal
cache.
So, as it is usually said: "it's not a bug, it's a feature" :-).

In other words, if you don't have tables listed, it means you either have
nothing available with the user/schema you chose,
or have permission issues (lack of grants) that prevent GeoServer from
listing the available tables

Cheers
Andrea

--
== Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information ==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

Thankyou Mauro and Andrea – your explanations of the issue made me see it clearer!

I have changed the issue in JIRA to a possible improvement in documentation or the user interface J Given time I might even submit a suggestion to update of the documentation.

Ragnvald

···

Hi Ragnvald,

2014-02-10 23:10 GMT+01:00 Ragnvald Larsen <ragnvald.larsen@anonymised.com>:

Problem solved - or at least avoided. Two ways potentially leads to the glorious access to MSSQL spatial based layers. Both starts with the user choosing “Add a new resource”, after that I choose the relevant data store from the drop down list. Next is one of these two:

  1. “Configure new SQL view…”

  2. Press “Publish”

The last option (2) opens the layer definition dialogue and shows “Reload feature type …”. The first one (1) starts with letting me write a SQL query. This one works.

I am running geoserver on a windows computer with “JVM Version: Oracle Corporation: 1.7.0_17 (Java HotSpot™ 64-Bit Server VM)”.

I suspect this is a windows only issue.

Bug filed in JIRA: http://jira.codehaus.org/browse/GEOS-6342

I think there is a misunderstanding here: the option 1 and 2 are quite different in scope: the “Configure new SQL view” allows you to publish a “virtual table” from your database built using a sql query, while the second one is used to publish an existing database table “as is”, so also the configuration UI is different for the layers built using one of the two methods.

With the first one you get an “Edit SQL View” link that allows you to define the sql for the virtual table, for the second one you cannot define a sql query, you only get a “Reload feature type…” that simply reads the table fields and properties from the database and synchronizes the internal cache.

So, as it is usually said: “it’s not a bug, it’s a feature” :-).

Cheers,

Mauro Bartolomeoli

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Dott. Mauro Bartolomeoli

@mauro_bart

Senior Software Engineer

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

http://www.geo-solutions.it

http://twitter.com/geosolutions_it


On Tue, Feb 11, 2014 at 9:39 AM, Ragnvald Larsen <
ragnvald.larsen@anonymised.com> wrote:

Thankyou Mauro and Andrea - your explanations of the issue made me see
it clearer!

I have changed the issue in JIRA to a possible improvement in
documentation or the user interface J Given time I might even submit a
suggestion to update of the documentation.

Can you share screenshots of what you see? At this point I have doubts
we're talking about the same thing? :slight_smile:

Cheers
Andrea

--
== Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information ==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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