[Geoserver-users] GeoJSON from Geoserver

2013-06-26 Thread adityakumar529
HI ,
  When I go for the output of a polygon with GeoJSON format in Layer Preview
page I get the following error.
*java.lang.RuntimeException: org.geotools.data.DataSourceException: An
exception occurred while parsing WKB data
org.geotools.data.DataSourceException: An exception occurred while parsing
WKB data An exception occurred while parsing WKB data Unknown WKB type 255*


Any idea how to rectify it?


Aditya Kumar



-
GIS Developer
India Urban Space Foundation
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/GeoJSON-from-Geoserver-tp5062469.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Setting Up New Windows Server

2013-06-26 Thread cmaul
Hi Rob,

1.  Installation of tomcat is straightforward. As it hasn't any native code
Tomcat is 64-bit if your Java is 64-bit. (Please note: the Apache web server
HAS native code, so you need a 64-bit version here) You can get it as zip
and convert to a service with sc.exe
(http://support.microsoft.com/kb/251192) or you can use the service
installer. I like sc, because I always struggled with the automatic naming
of the services of the installer. 

2. Whatever, JRE suffices I haven't found a difference between them. JDK is
advisable if you want to monitor the Java processes with something like
visualvm as it comes bundled with this version.

3. JRE/JDK6 

4. No, you can run it as a service with Tomcat. You could even run it as a
service with Jetty, if you can get or create a 64-bit version (I do not
know). However, you would need to install it the same way like Tomcat, i.e.
deploy the war file because the Geoserver windows installer is only 32-bit.
The difference and advantage of the service over the batch-file start is
simply put: You log on manually start your batch file and then after a day's
work, log out and go home. That means your process is gone this moment,
while the service persists. So, a service makes sense.

5. Yes, there is none 64-bit=no JAI

6. I don't know. Swap servers if you can. However, if you have only one, my
best practice is: Install a second Tomcat (8180 or so), install the new
geoserver, copy the data directory, test and when you're happy switch it
using Apache, i.e. change the httpd.conf. So, the downtime is only the
Apache web server restart (2-3 minutes).  

Hope that helps

Christian




-


Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002


Telephone:+61-3-8636 2325
Telefax:  +61-3-8636 2813
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Setting-Up-New-Windows-Server-tp5062378p5062467.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Layer Groups and Labeling issues

2013-06-26 Thread cmaul
Hello Sudheer,

this is odd as I cannot reproduce this in my layergroups. The conflict
resolution within a layer works well, however, the conflict resolution
between the layers does not or I have the feeling it doesn't exist. 

Cheers

Christian 

 



-


Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002


Telephone:+61-3-8636 2325
Telefax:  +61-3-8636 2813
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Layer-Groups-and-Labeling-issues-tp5062409p5062461.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] accessing www folder from header.ftl

2013-06-26 Thread Justin Deoliveira
Hi Jen,

Unfortunately no information about the request is passed into the template.
But you should be able to use an absolute path like
"/geoserver/www/sorttable.js" as the script src attribute. This makes an
assumption that the server context is named "geoserver" so wouldn't work if
you deployed it under a different name.

-Justin



On Wed, Jun 26, 2013 at 11:50 AM, Jen Weiss  wrote:

> I have some javascript files placed in the .../data/www folder that I'm
> trying to be able to reference as a relative path in the header.ftl file
> (that styles the getFeatureInfo response).
>
> I can access the javascript files fine using the full url, eg:   src="http://10.128.3.63:8080/geoserver/www/sorttable.js";
> type="text/javascript">
>
> but I can't for the life of me figure out how to get it to accept a
> relative path... I've tried pretty much every combination of
> ../www/sorttable.js, /geoserver/www/sorttable.js, etc, etc trying to find a
> combination that works, but no luck so far.
> Does anyone have any insight into this?
>
> Also, is there anyway to get the baseUrl as a variable to use in the
> freemarker templates?
>
> Thanks!
> -Jen
>
>
> --
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> ___
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>


-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] Layer Groups and Labeling issues

2013-06-26 Thread Sudheer
Hi All,

I am trying to create a basemap with several layers and labeling each
layer. Everything seemed to work fine except for labeling conflicts and
duplication. Interestingly, it works fine as ie. no duplicates are
generated as single layer. Any thoughts on how to resolve this issue.

Thanks
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Deploying Geoserver 2.3.x on Websphere 8

2013-06-26 Thread Sudheer
Thanks Christian. Though we were able to deploy application on Websphere8
noticed there are some issues with spring framework which resulted in not
loading stores. Trying to troubleshoot and identify the issue. Will keep
posted.


On Sat, Jun 22, 2013 at 11:33 AM, Sudheer Chadalavada wrote:

> All,
>
> As I have not seen much activity on this particular topic. I am wondering
> whether we were able to successfully deploy Geoserver on this particular
> platform. Is there any documentation available?
>
>
>
>
> On Jun 22, 2013, at 10:29 AM,
> geoserver-users-requ...@lists.sourceforge.net wrote:
>
> > Send Geoserver-users mailing list submissions to
> >geoserver-users@lists.sourceforge.net
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >https://lists.sourceforge.net/lists/listinfo/geoserver-users
> > or, via email, send a message with subject or body 'help' to
> >geoserver-users-requ...@lists.sourceforge.net
> >
> > You can reach the person managing the list at
> >geoserver-users-ow...@lists.sourceforge.net
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of Geoserver-users digest..."
> >
> >
> > Today's Topics:
> >
> >   1. Re: Cannot map LDAP groups to GeoServer roles (Mauro Bartolomeoli)
> >   2. Re: Cannot map LDAP groups to GeoServer roles (Andrea Aime)
> >   3. Re: Cannot map LDAP groups to GeoServer roles (Justin Deoliveira)
> >
> >
> > --
> >
> > Message: 1
> > Date: Sat, 22 Jun 2013 14:57:21 +0200
> > From: Mauro Bartolomeoli 
> > Subject: Re: [Geoserver-users] Cannot map LDAP groups to GeoServer
> >roles
> > To: Andrea Aime 
> > Cc: Mauro Bartolomeoli ,
> >GeoServer Mailing List List 
> > Message-ID:
> >
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > 2013/6/22 Andrea Aime 
> >
> >> On Thu, Jun 20, 2013 at 8:50 AM, Mauro Bartolomeoli <
> >> mauro.bartolome...@geo-solutions.it> wrote:
> >>
> >>> Yes, but what I exactly mean is that the Geoserver LDAP module,
> >>> internally, does two things:
> >>> 1) login to the LDAP server with the user credentials to authenticate
> it
> >>> (and this seems to be working for you) and then logs out from the LDAP
> >>> server (it only logins to check the user is authenticated)
> >>> 2) retrieve user groups with an anonymous search, without making a new
> >>> login to the LDAP server with user credentials. Many LDAP servers deny
> the
> >>> search to anonymous users and so no groups are retrieved, also if the
> user
> >>> is correctly authenticated
> >>
> >> Ah, really? This seems a bit dumb... would it be hard to make it
> >> authenticate also on the second request?
> >> If we have a user, why not use it, is there some particular setup where
> >> that would cause issues?
> >
> > Yes, sure, and this is already done with GEOS-5805 on master (using the
> new
> > option bindBeforeGroupSearch), but that enhancement has not been
> backported
> > to 2.3.x yet (by the way, I was thinking to backport it, after 2.3.3 is
> > out, what do you think about that?).
> >
> > Mauro
> > --
> > ==
> > 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
> >
> > ---
> > -- next part --
> > An HTML attachment was scrubbed...
> >
> > --
> >
> > Message: 2
> > Date: Sat, 22 Jun 2013 15:06:01 +0200
> > From: Andrea Aime 
> > Subject: Re: [Geoserver-users] Cannot map LDAP groups to GeoServer
> >roles
> > To: Mauro Bartolomeoli ,Justin
> >Deoliveira 
> > Cc: GeoServer Mailing List List
> >
> > Message-ID:
> >
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > On Sat, Jun 22, 2013 at 2:57 PM, Mauro Bartolomeoli <
> > mauro.bartolome...@geo-solutions.it> wrote:
> >
> >>
> >>
> >>
> >> 2013/6/22 Andrea Aime 
> >>
> >>> On Thu, Jun 20, 2013 at 8:50 AM, Mauro Bartolomeoli <
> >>> mauro.bartolome...@geo-solutions.it> wrote:
> >>>
>  Yes, but what I exactly mean is that the Geoserver LDAP module,
>  internally, does two things:
>  1) login to the LDAP server with the user credentials to authenticate
>  it (and this seems to be working for you) and then logs out from the
> LDAP
>  server (it only logins to check the user is authenticated)
>  2) retrieve user groups with an anonymous search, without making a new
>  login to the LDAP server with user credentials. Many LDAP servers
> deny the
>  search to anonymous users and so no groups are retrieved, also if the
> user
>  is correctly authenticated
> >>>
> >>> Ah, reall

[Geoserver-users] accessing www folder from header.ftl

2013-06-26 Thread Jen Weiss
I have some javascript files placed in the .../data/www folder that I'm
trying to be able to reference as a relative path in the header.ftl file
(that styles the getFeatureInfo response).

I can access the javascript files fine using the full url, eg:  http://10.128.3.63:8080/geoserver/www/sorttable.js";
type="text/javascript">

but I can't for the life of me figure out how to get it to accept a
relative path... I've tried pretty much every combination of
../www/sorttable.js, /geoserver/www/sorttable.js, etc, etc trying to find a
combination that works, but no luck so far.
Does anyone have any insight into this?

Also, is there anyway to get the baseUrl as a variable to use in the
freemarker templates?

Thanks!
-Jen
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] Setting Up New Windows Server

2013-06-26 Thread Langford, Robert
List,

I'm currently look to move from my testing environment to a live one and was 
wondering if anyone could provide any advice or tips.

At present I'm using:

* VMware Virtual Machine

* 2 Physical Processors (Intel(r) Xeon(r) CPU E5-2680 0 @ 2.70GHz)

* 4GB RAM

* Windows Server 2008 R2 Standard Edition x64

* Geoserver 2.3.0 running as a service installed via the Windows 
Installer through Jetty

* Oracle JRE 6 (32-bit)

I'm planning on having my VM replicated and then installing everything from 
scratch on it (so up-to-date Geoserver, etc.).  however I have a few questions 
that I've found conflicting or limited advice on the internet about:

1.   As I don't have an existing servlet container application (e.g. 
Tomcat), I'm presuming my options are either using the Windows Installer or the 
Windows Binary; is one preferred, what are the pros/cons?

2.   Should I be using the JRE or JDK (or indeed Server JRE); I know that 
only JRE is required but I've seen some people advised in the past to use the 
JDK (I think it was using the latest version)?

3.   Which version of JRE/JDK should be used, I've been recommended to use 
JRE6 in the past but should I now be using JRE7; are there any 
compatibility/security issues with either?

4.   Also I note that if you use the Windows 64-bit JRE/JDK you cannot run 
Geoserver as a Service, what are the disadvantages of this, any recommendations?

5.   Again with the Windows 64-bit JRE/JDK; there doesn't seem to be an 
option to install native JAI and JAI Image I/O extensions, would it be better 
to use the 64-bit JRE with the pure Java versions or use the 32-bit JRE with 
the native extensions?

6.   How have people found the best way to upgrade Geoserver to the new 
point releases?  Is the only way to take everything down, uninstall completely 
then reinstall Geoserver (+ extensions, etc.) every time? Any tips on limiting 
downtime?

Thanks for your time and apologies for the number of questions.

Regards,

Rob



DISCLAIMER: The information contained in this communication/message from 
robert.langf...@salford.gov.uk sent on Wed Jun 26 16:15:52 2013 is confidential 
and may be legally privileged. It is intended solely for the addressee(s) 
geoserver-users@lists.sourceforge.net

Access to this message by anyone else is unauthorised. If you are not the 
intended recipient, any disclosure, copying, or distribution of the message, or 
any action or omission taken by you in reliance on it, is prohibited and may be 
unlawful.
As a public body, Salford City Council may be required to disclose this email 
[or any response to it] under the Freedom of Information Act 2000, unless the 
information in it is covered by one of the exemptions in the Act.
Please immediately contact the sender, robert.langf...@salford.gov.uk if you 
have received this message in error.

For the full disclaimer please access http://www.salford.gov.uk/e-mail.  Thank 
you.
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] How to pass parameters to Geoserver Heatmap SLD

2013-06-26 Thread apaleja
That's great explanation Nikolai. Thank you very much for all help. 

I have a shapefile with polygons.  I want to generate Choropleth map.
Whatever geoserver SLD examples I saw , uses static filtering from SLD only.
Is it possible to create Choropleth maps using SLD like this heatmap SLD?



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/How-to-pass-parameters-to-Geoserver-Heatmap-SLD-tp5061851p5062269.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Cascading WFS 2.0 in GeoServer

2013-06-26 Thread Andrea Aime
On Wed, Jun 26, 2013 at 10:37 AM, juhanisaastamoinen <
juhani.saastamoi...@arbonaut.com> wrote:

>
> Andrea, you probably have some idea how much work it would take
> to add the WFS 2.0 cascading support to GeoServer? Can you give
> some details what needs to be changed and where can I find
> those parts in the (2.4-SNAPSHOT) source code?
>

You basically have to add WFS 2.0 support to the GeoTools WFS data store
here:
https://github.com/geotools/geotools/tree/master/modules/unsupported/wfs

That's quite a bit of work, I guess you can follow the WFS 1.1 code and
mimick it to generate
a 2.0 version

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

---
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Issue with PostGIS/PostgreSQL connection pooling and min_connections set to 0.

2013-06-26 Thread Andrea Aime
On Wed, Jun 26, 2013 at 10:45 AM, David Niedzielski <
david.niedziel...@gmail.com> wrote:

> Thanks for the reply. In our case, sadly, we have separate databases. One
> for each data store. The timeouts to which you allude seems to be key,
> because they obviously do not abide by the connection timeout associated
> with the stores. Indeed, these single connections are up for as long as
> geoserver itself - we have yet to see a timeout after weeks of uptime. Are
> they perhaps reused periodically? The layers associated with the data
> stores are never referenced. Where does one set the timeout for these
> initial connections, as they seem to be eternal and the heart of the
> problem?


Hmm... I guess I was wrong, don't see any time out in the code setting up
the connection pool:

https://github.com/geotools/geotools/blob/master/modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCDataStoreFactory.java#L420

We use Commons DBCP as the connection pool, if you find a way to setup a
timeout for idle connections
please share a patch/make a pull request

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

---
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Cascading WFS 2.0 in GeoServer

2013-06-26 Thread juhanisaastamoinen
geowolf wrote
> On Wed, Mar 20, 2013 at 8:57 AM, Matti Silvennoinen
> <

> matti.silvennoinen@

> > wrote:
>> Anyone knows if it’s possible to use WFS 2.0 as a data source (cascading
>> WFS) in GeoServer? Seems that at least parsing WFS 2.0 capabilities
>> document
>> is not supported: “Error creating data store, check the parameters. Error
>> message: Expected {http://www.opengis.net/wfs}WFS_Capabilities but was
>> http://www.opengis.net/wfs/2.0#WFS_Capabilities”
> 
> The WFS data store allowing for WFS cascading indeed supports WFS 1.1
> and WFS 1.0
> only.
> I'm not aware of short term plans to build a WFS 2.0 client into it.
> Maybe you can help? :-)
> 
> Cheers
> Andrea

Andrea, you probably have some idea how much work it would take
to add the WFS 2.0 cascading support to GeoServer? Can you give
some details what needs to be changed and where can I find
those parts in the (2.4-SNAPSHOT) source code?

Best wishes,
Juhani




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Cascading-WFS-2-0-in-GeoServer-tp5041596p5062262.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Issue with PostGIS/PostgreSQL connection pooling and min_connections set to 0.

2013-06-26 Thread David Niedzielski
Thanks for the reply. In our case, sadly, we have separate databases. One
for each data store. The timeouts to which you allude seems to be key,
because they obviously do not abide by the connection timeout associated
with the stores. Indeed, these single connections are up for as long as
geoserver itself - we have yet to see a timeout after weeks of uptime. Are
they perhaps reused periodically? The layers associated with the data
stores are never referenced. Where does one set the timeout for these
initial connections, as they seem to be eternal and the heart of the
problem?

On Wednesday, June 26, 2013, Andrea Aime wrote:

> On Wed, Jun 26, 2013 at 4:46 AM, David Niedzielski <
> david.niedziel...@gmail.com  'david.niedziel...@gmail.com');>> wrote:
>
>> Using GeoServer 2.2.1 and 2.3 with a large number of PostGIS-backed
>> datastores under TomCat 6.2.These stores are rarely used, so we'd like
>> them to not tie up a PostgreSQL connection until one is actually needed.
>> Thus, we set min_connections=0 in the datastore.xml associated with each
>> store.  Interestingly, when GeoServer is bounced, there is a single
>> connection bound to PostgreSQL for each store anyway.  If we use the admin
>> interface and open the store definition, "min_connections" shows 0, which
>> is what one would expect.  Now, simply saving the store definition without
>> modifying anything causes the corresponding DB connection to be dropped,
>> and a connection is not bound again until the datastore is used or until
>> GeoServer is bounced again.
>>
>
> On startup GeoServer verifies that each and every feature type is actually
> accessible (the store is up, the feature type structure can be computed),
> this requires a connection (which is going to be dropped after a timeout I
> believe, but I don't remember what the timeout is).
>
> If you have many stores pointing at the same database, but using different
> schemas, you're "doing it wrong (tm)", the way to go is
> to setup a connection pool inside Tomcat and then call onto it via JNDI,
> there is an example of how this can be done here:
>
> http://docs.geoserver.org/stable/en/user/tutorials/tomcat-jndi/tomcat-jndi.html
> This way all stores will share the same connection pool, and during
> startup a single connection will be taken and reused
> over and over to check the feature types are good.
>
> 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
>
> ---
>
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] Issue with PostGIS/PostgreSQL connection pooling and min_connections set to 0.

2013-06-26 Thread Andrea Aime
On Wed, Jun 26, 2013 at 4:46 AM, David Niedzielski <
david.niedziel...@gmail.com> wrote:

> Using GeoServer 2.2.1 and 2.3 with a large number of PostGIS-backed
> datastores under TomCat 6.2.These stores are rarely used, so we'd like
> them to not tie up a PostgreSQL connection until one is actually needed.
> Thus, we set min_connections=0 in the datastore.xml associated with each
> store.  Interestingly, when GeoServer is bounced, there is a single
> connection bound to PostgreSQL for each store anyway.  If we use the admin
> interface and open the store definition, "min_connections" shows 0, which
> is what one would expect.  Now, simply saving the store definition without
> modifying anything causes the corresponding DB connection to be dropped,
> and a connection is not bound again until the datastore is used or until
> GeoServer is bounced again.
>

On startup GeoServer verifies that each and every feature type is actually
accessible (the store is up, the feature type structure can be computed),
this requires a connection (which is going to be dropped after a timeout I
believe, but I don't remember what the timeout is).

If you have many stores pointing at the same database, but using different
schemas, you're "doing it wrong (tm)", the way to go is
to setup a connection pool inside Tomcat and then call onto it via JNDI,
there is an example of how this can be done here:
http://docs.geoserver.org/stable/en/user/tutorials/tomcat-jndi/tomcat-jndi.html
This way all stores will share the same connection pool, and during startup
a single connection will be taken and reused
over and over to check the feature types are good.

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

---
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users