[Geoserver-devel] database-backed catalog

Hi,

Your 'Geoserver-2.1-beta2 now available' announcement on [1] drew my attention to database-backed catalog.
I looked into the community[com] module[mod] directory and found 'hibernate'-mod.
Is this the com-mod that the passage 'Core improvements to support database-backed catalog' refers to?

[1] http://blog.geoserver.org/2010/12/06/geoserver-2-1-beta2-now-available/

cheers,

Rudi Hochmeister
Magistrat der Stadt Wien
MA 14 - ADV - Referat EG3
A 1082 Wien, Rathausstraße 1
Email: rudolf.hochmeister@anonymised.com
Telefon: (+43 1) 4000 91119
Fax: (+43 1) 4000 7141

Hi Rudi,

Actually the module that contains the latest work is called dbconfig [1].

If you are brave and would like to try it out you can grab the latest build from the community nightly builds. [2]. But be warned that it is still not quite stable and is a work in progress. That said it does work and any feedback you could provide as an actual user would be great.

-Justin

[1] http://svn.codehaus.org/geoserver/trunk/src/community/dbconfig/
[2] http://gridlock.opengeo.org/geoserver/trunk/community-latest/

On Thu, Dec 9, 2010 at 7:22 AM, Hochmeister Rudolf <rudolf.hochmeister@anonymised.com> wrote:

Hi,

Your ‘Geoserver-2.1-beta2 now available’ announcement on [1] drew my attention to database-backed catalog.
I looked into the community[com] module[mod] directory and found ‘hibernate’-mod.
Is this the com-mod that the passage ‘Core improvements to support database-backed catalog’ refers to?

[1] http://blog.geoserver.org/2010/12/06/geoserver-2-1-beta2-now-available/

cheers,

Rudi Hochmeister
Magistrat der Stadt Wien
MA 14 - ADV - Referat EG3
A 1082 Wien, Rathausstraße 1
Email: rudolf.hochmeister@…2581…
Telefon: (+43 1) 4000 91119
Fax: (+43 1) 4000 7141


This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com


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


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Hi Justin, list,

we have some trouble with setting this up, I am posting an e-mail from a colleague below since he is not on the list. TIA for any help.

Hello,

Currently I’m trying to set up Geoserver in 2 JBoss environments reading from the same
data directory. I have the following setup:

Using PostgreSQL 9.0.1 as database, JBoss 4.0.5 GA (2x) each running Geoserver 2.1 beta 2
with the dbconfig plugin (just dumped the jar files into the WEB-INF/lib directory of the
war file). Using 1 single instance of JBoss everything runs smoothly.

Now the idea is to run a second instance of Geoserver pointing to the same datastore. I’m trying
to see if it’s possible that when the configuration of 1 Geoserver instance is updated
(via e.g. GeoCat Bridge) the changes are reflected in the other instances as well.

Unfortunately I get all kinds of error messages starting with the message below:

15:21:55,837 INFO [STDOUT] 14 Dec 15:21:55 ERROR [context.ContextLoader] - Cont
ext initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name ‘gwcFacade’ defined in URL [jar:file:/H:/runnableapps/jboss-4.0.5.GA/serv
er/default/./tmp/deploy/tmp1640002882111840325geoserver-exp.war/WEB-INF/lib/gwc-
2.1-beta2.jar!/geowebcache-geoserver-context.xml]: Cannot resolve reference to b
ean ‘gwcTLDispatcher’ while setting constructor argument; nested exception is or
g.springframework.beans.factory.BeanCreationException: Error creating bean with
name ‘gwcTLDispatcher’ defined in URL [jar:file:/H:/runnableapps/jboss-4.0.5.GA/
server/default/./tmp/deploy/tmp1640002882111840325geoserver-exp.war/WEB-INF/lib/
gwc-2.1-beta2.jar!/geowebcache-geoserver-context.xml]: Instantiation of bean fai
led; nested exception is org.springframework.beans.BeanInstantiationException: C
ould not instantiate bean class [org.geowebcache.layer.TileLayerDispatcher]: Con
structor threw exception; nested exception is java.lang.RuntimeException: org.hi
bernate.type.SerializationException: could not deserialize

Now my questions are: is the dbconfig module meant to be used this way? I can’t find
any documentation on this. If it is meant this way, do I need to update specific
settings anywhere to support this?

Thanks in advance for your answer!

Best regards,
Bart


Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html

Bart van den Eijnden
OSGIS
bartvde@anonymised.com

On Dec 9, 2010, at 4:24 PM, Justin Deoliveira wrote:

Hi Rudi,

Actually the module that contains the latest work is called dbconfig [1].

If you are brave and would like to try it out you can grab the latest build from the community nightly builds. [2]. But be warned that it is still not quite stable and is a work in progress. That said it does work and any feedback you could provide as an actual user would be great.

-Justin

[1] http://svn.codehaus.org/geoserver/trunk/src/community/dbconfig/
[2] http://gridlock.opengeo.org/geoserver/trunk/community-latest/

On Thu, Dec 9, 2010 at 7:22 AM, Hochmeister Rudolf <rudolf.hochmeister@anonymised.com> wrote:

Hi,

Your ‘Geoserver-2.1-beta2 now available’ announcement on [1] drew my attention to database-backed catalog.
I looked into the community[com] module[mod] directory and found ‘hibernate’-mod.
Is this the com-mod that the passage ‘Core improvements to support database-backed catalog’ refers to?

[1] http://blog.geoserver.org/2010/12/06/geoserver-2-1-beta2-now-available/

cheers,

Rudi Hochmeister
Magistrat der Stadt Wien
MA 14 - ADV - Referat EG3
A 1082 Wien, Rathausstraße 1
Email: rudolf.hochmeister@…2581…
Telefon: (+43 1) 4000 91119
Fax: (+43 1) 4000 7141


This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com


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


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.



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

Hi Bart,

To answer the question yes, dbconfig is meant to be used in this way and i myself have tested it with multiple servers running from a single configuration. But as I stated before the module is still pretty immature.

That said, this error message does not seem to be a complete stack trace. Is there more? I think the actual root exception is not being included here.

Thanks.

-Justin

On Wed, Dec 15, 2010 at 3:01 AM, Bart van den Eijnden <bartvde@anonymised.com> wrote:

Hi Justin, list,

we have some trouble with setting this up, I am posting an e-mail from a colleague below since he is not on the list. TIA for any help.

Hello,

Currently I’m trying to set up Geoserver in 2 JBoss environments reading from the same
data directory. I have the following setup:

Using PostgreSQL 9.0.1 as database, JBoss 4.0.5 GA (2x) each running Geoserver 2.1 beta 2
with the dbconfig plugin (just dumped the jar files into the WEB-INF/lib directory of the
war file). Using 1 single instance of JBoss everything runs smoothly.

Now the idea is to run a second instance of Geoserver pointing to the same datastore. I’m trying
to see if it’s possible that when the configuration of 1 Geoserver instance is updated
(via e.g. GeoCat Bridge) the changes are reflected in the other instances as well.

Unfortunately I get all kinds of error messages starting with the message below:

15:21:55,837 INFO [STDOUT] 14 Dec 15:21:55 ERROR [context.ContextLoader] - Cont
ext initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name ‘gwcFacade’ defined in URL [jar:file:/H:/runnableapps/jboss-4.0.5.GA/serv
er/default/./tmp/deploy/tmp1640002882111840325geoserver-exp.war/WEB-INF/lib/gwc-
2.1-beta2.jar!/geowebcache-geoserver-context.xml]: Cannot resolve reference to b
ean ‘gwcTLDispatcher’ while setting constructor argument; nested exception is or
g.springframework.beans.factory.BeanCreationException: Error creating bean with
name ‘gwcTLDispatcher’ defined in URL [jar:file:/H:/runnableapps/jboss-4.0.5.GA/
server/default/./tmp/deploy/tmp1640002882111840325geoserver-exp.war/WEB-INF/lib/
gwc-2.1-beta2.jar!/geowebcache-geoserver-context.xml]: Instantiation of bean fai
led; nested exception is org.springframework.beans.BeanInstantiationException: C
ould not instantiate bean class [org.geowebcache.layer.TileLayerDispatcher]: Con
structor threw exception; nested exception is java.lang.RuntimeException: org.hi
bernate.type.SerializationException: could not deserialize

Now my questions are: is the dbconfig module meant to be used this way? I can’t find
any documentation on this. If it is meant this way, do I need to update specific
settings anywhere to support this?

Thanks in advance for your answer!

Best regards,
Bart


Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html

Bart van den Eijnden
OSGIS
bartvde@anonymised.com

On Dec 9, 2010, at 4:24 PM, Justin Deoliveira wrote:

Hi Rudi,

Actually the module that contains the latest work is called dbconfig [1].

If you are brave and would like to try it out you can grab the latest build from the community nightly builds. [2]. But be warned that it is still not quite stable and is a work in progress. That said it does work and any feedback you could provide as an actual user would be great.

-Justin

[1] http://svn.codehaus.org/geoserver/trunk/src/community/dbconfig/
[2] http://gridlock.opengeo.org/geoserver/trunk/community-latest/

On Thu, Dec 9, 2010 at 7:22 AM, Hochmeister Rudolf <rudolf.hochmeister@anonymised.com> wrote:

Hi,

Your ‘Geoserver-2.1-beta2 now available’ announcement on [1] drew my attention to database-backed catalog.
I looked into the community[com] module[mod] directory and found ‘hibernate’-mod.
Is this the com-mod that the passage ‘Core improvements to support database-backed catalog’ refers to?

[1] http://blog.geoserver.org/2010/12/06/geoserver-2-1-beta2-now-available/

cheers,

Rudi Hochmeister
Magistrat der Stadt Wien
MA 14 - ADV - Referat EG3
A 1082 Wien, Rathausstraße 1
Email: rudolf.hochmeister@anonymised.com
Telefon: (+43 1) 4000 91119
Fax: (+43 1) 4000 7141


This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com


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


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.



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


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Hi Justin,

here is some extra info provided by my colleague. TIA.

What I did (on a Windows XP machine!):

  1. Downloaded geoserver-2.1-beta2-war.zip and geoserver-2.1-beta2-bin.zip from sourceforge
  2. Downloaded dbconfig module geoserver-2.1-SNAPSHOT-dbconfig-plugin.zip from
    http://gridlock.opengeo.org/geoserver/trunk/community-latest/. I have the one of
    12 december
  3. Extracted the
  4. Downloaded postgresql-9.0.1-1-windows-binaries.zip
  5. Extracted them and created via initdb/createdb a database called napj
  6. Started the DB
  7. Extracted 2 copies of JBoss 4.0.5 GA and updated the ports, so that they could co-exist
    (See http://manoharviswanathan.com/blog/tech/running-multiple-jboss-instances-on-the-same-machine/)
  8. Extracted the war from the geoserver-2.1-beta2-war.zip
  9. Exploded the war and put the content of geoserver-2.1-SNAPSHOT-dbconfig-plugin.zip in the
    WEB-INF\lib
  10. Zipped everything back to a war file
  11. Placed a copy of the war file into both the JBoss instances (default server, deploy folder)
  12. Copied the content of data-dir (found in geoserver-2.1-beta2-bin.zip) to a central location
  13. Placed a file called geoserver.db.properties into this location with the following content:

#Mon Dec 13 16:47:32 CET 2010
url=jdbc:postgresql://localhost/napj
password=
driver=org.postgresql.Driver
username=napj

  1. Placed a file called hibernate.properties in the same location with the following content

#Hibernate properties for the geoserver catalog and configuration. You probably
#don’t want to change these values unless instructed by a developer.
#Wed Dec 15 15:55:01 CET 2010
hibernate.use_sql_comments=true
hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
hibernate.cache.use_query_cache=true
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.cache.use_second_level_cache=true
hibernate.cache.provider_configuration_file_resource_path=/ehcache.xml
hibernate.format_sql=true
hibernate.generate_statistics=true
hibernate.session_factory_name=SessionFactory
hibernate.hbm2ddl.auto=update
hibernate.bytecode.use_reflection_optimizer=true
hibernate.show_sql=false

Only thing I changed in this file is the hibernate.dialect. Both files were automatically created when
Geoserver started
15. In both JBoss instances I updated run.bat like this:
set JAVA_OPTS=%JAVA_OPTS% -DGEOSERVER_DATA_DIR=/
16. Started first instance of jboss (just type run in the bin directory)
This doesn’t cause any problems
17. Now I start the second one.
This one doesn’t come up. I attached the server log of this one. Content of this file is position where
it becomes interesting.

Could it be that for some reason the database connection was reset in one of the servers?

(attachments)

server.log (146 KB)

You can’t have two GWC instances writing to the same directory. (The same holds true for WFS-T against shapefiles etc.)

You’ll have to delete the gwc and geowebcache jars from at least one instance.

-Arne

You can’t have two GWC instances writing to the same directory

Interesting. How do people go about configuring a cluster that includes GWC capabilities?

Sorry if I’m hijacking the original thread but I am interested in the db config explained before, only it would need to be compatible with GWC as well.

On Wed, Dec 15, 2010 at 10:48 AM, Arne Kepp <arne@anonymised.com> wrote:

You can’t have two GWC instances writing to the same directory. (The same holds true for WFS-T against shapefiles etc.)

You’ll have to delete the gwc and geowebcache jars from at least one instance.

-Arne

On 12/15/10 4:36 PM, Bart van den Eijnden wrote:

Hi Justin,

here is some extra info provided by my colleague. TIA.

What I did (on a Windows XP machine!):

  1. Downloaded geoserver-2.1-beta2-war.zip and geoserver-2.1-beta2-bin.zip from sourceforge
  2. Downloaded dbconfig module geoserver-2.1-SNAPSHOT-dbconfig-plugin.zip from
    http://gridlock.opengeo.org/geoserver/trunk/community-latest/. I have the one of
    12 december
  3. Extracted the
  4. Downloaded postgresql-9.0.1-1-windows-binaries.zip
  5. Extracted them and created via initdb/createdb a database called napj
  6. Started the DB
  7. Extracted 2 copies of JBoss 4.0.5 GA and updated the ports, so that they could co-exist
    (See http://manoharviswanathan.com/blog/tech/running-multiple-jboss-instances-on-the-same-machine/)
  8. Extracted the war from the geoserver-2.1-beta2-war.zip
  9. Exploded the war and put the content of geoserver-2.1-SNAPSHOT-dbconfig-plugin.zip in the
    WEB-INF\lib
  10. Zipped everything back to a war file
  11. Placed a copy of the war file into both the JBoss instances (default server, deploy folder)
  12. Copied the content of data-dir (found in geoserver-2.1-beta2-bin.zip) to a central location
  13. Placed a file called geoserver.db.properties into this location with the following content:

#Mon Dec 13 16:47:32 CET 2010
url=jdbc:postgresql://localhost/napj
password=
driver=org.postgresql.Driver
username=napj

  1. Placed a file called hibernate.properties in the same location with the following content

#Hibernate properties for the geoserver catalog and configuration. You probably
#don’t want to change these values unless instructed by a developer.
#Wed Dec 15 15:55:01 CET 2010
hibernate.use_sql_comments=true
hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
hibernate.cache.use_query_cache=true
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.cache.use_second_level_cache=true
hibernate.cache.provider_configuration_file_resource_path=/ehcache.xml
hibernate.format_sql=true
hibernate.generate_statistics=true
hibernate.session_factory_name=SessionFactory
hibernate.hbm2ddl.auto=update
hibernate.bytecode.use_reflection_optimizer=true
hibernate.show_sql=false

Only thing I changed in this file is the hibernate.dialect. Both files were automatically created when
Geoserver started
15. In both JBoss instances I updated run.bat like this:
set JAVA_OPTS=%JAVA_OPTS% -DGEOSERVER_DATA_DIR=/
16. Started first instance of jboss (just type run in the bin directory)
This doesn’t cause any problems
17. Now I start the second one.
This one doesn’t come up. I attached the server log of this one. Content of this file is position where
it becomes interesting.

Could it be that for some reason the database connection was reset in one of the servers?


Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html

Bart van den Eijnden
OSGIS
bartvde@anonymised.com

On Dec 15, 2010, at 3:49 PM, Justin Deoliveira wrote:

Hi Bart,

To answer the question yes, dbconfig is meant to be used in this way and i myself have tested it with multiple servers running from a single configuration. But as I stated before the module is still pretty immature.

That said, this error message does not seem to be a complete stack trace. Is there more? I think the actual root exception is not being included here.

Thanks.

-Justin

On Wed, Dec 15, 2010 at 3:01 AM, Bart van den Eijnden <bartvde@anonymised.com> wrote:

Hi Justin, list,

we have some trouble with setting this up, I am posting an e-mail from a colleague below since he is not on the list. TIA for any help.

Hello,

Currently I’m trying to set up Geoserver in 2 JBoss environments reading from the same
data directory. I have the following setup:

Using PostgreSQL 9.0.1 as database, JBoss 4.0.5 GA (2x) each running Geoserver 2.1 beta 2
with the dbconfig plugin (just dumped the jar files into the WEB-INF/lib directory of the
war file). Using 1 single instance of JBoss everything runs smoothly.

Now the idea is to run a second instance of Geoserver pointing to the same datastore. I’m trying
to see if it’s possible that when the configuration of 1 Geoserver instance is updated
(via e.g. GeoCat Bridge) the changes are reflected in the other instances as well.

Unfortunately I get all kinds of error messages starting with the message below:

15:21:55,837 INFO [STDOUT] 14 Dec 15:21:55 ERROR [context.ContextLoader] - Cont
ext initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name ‘gwcFacade’ defined in URL [jar:file:/H:/runnableapps/jboss-4.0.5.GA/serv
er/default/./tmp/deploy/tmp1640002882111840325geoserver-exp.war/WEB-INF/lib/gwc-
2.1-beta2.jar!/geowebcache-geoserver-context.xml]: Cannot resolve reference to b
ean ‘gwcTLDispatcher’ while setting constructor argument; nested exception is or
g.springframework.beans.factory.BeanCreationException: Error creating bean with
name ‘gwcTLDispatcher’ defined in URL [jar:file:/H:/runnableapps/jboss-4.0.5.GA/
server/default/./tmp/deploy/tmp1640002882111840325geoserver-exp.war/WEB-INF/lib/
gwc-2.1-beta2.jar!/geowebcache-geoserver-context.xml]: Instantiation of bean fai
led; nested exception is org.springframework.beans.BeanInstantiationException: C
ould not instantiate bean class [org.geowebcache.layer.TileLayerDispatcher]: Con
structor threw exception; nested exception is java.lang.RuntimeException: org.hi
bernate.type.SerializationException: could not deserialize

Now my questions are: is the dbconfig module meant to be used this way? I can’t find
any documentation on this. If it is meant this way, do I need to update specific
settings anywhere to support this?

Thanks in advance for your answer!

Best regards,
Bart


Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html

Bart van den Eijnden
OSGIS
bartvde@anonymised.com

On Dec 9, 2010, at 4:24 PM, Justin Deoliveira wrote:

Hi Rudi,

Actually the module that contains the latest work is called dbconfig [1].

If you are brave and would like to try it out you can grab the latest build from the community nightly builds. [2]. But be warned that it is still not quite stable and is a work in progress. That said it does work and any feedback you could provide as an actual user would be great.

-Justin

[1] http://svn.codehaus.org/geoserver/trunk/src/community/dbconfig/
[2] http://gridlock.opengeo.org/geoserver/trunk/community-latest/

On Thu, Dec 9, 2010 at 7:22 AM, Hochmeister Rudolf <rudolf.hochmeister@anonymised.com> wrote:

Hi,

Your ‘Geoserver-2.1-beta2 now available’ announcement on [1] drew my attention to database-backed catalog.
I looked into the community[com] module[mod] directory and found ‘hibernate’-mod.
Is this the com-mod that the passage ‘Core improvements to support database-backed catalog’ refers to?

[1] http://blog.geoserver.org/2010/12/06/geoserver-2-1-beta2-now-available/

cheers,

Rudi Hochmeister
Magistrat der Stadt Wien
MA 14 - ADV - Referat EG3
A 1082 Wien, Rathausstraße 1
Email: rudolf.hochmeister@anonymised.com
Telefon: (+43 1) 4000 91119
Fax: (+43 1) 4000 7141


This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com


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


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.



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


Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.


------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
[http://p.sf.net/sfu/lotusphere-d2d](http://p.sf.net/sfu/lotusphere-d2d)

_______________________________________________
Geoserver-devel mailing list
[Geoserver-devel@lists.sourceforge.net](mailto:Geoserver-devel@lists.sourceforge.net)
[https://lists.sourceforge.net/lists/listinfo/geoserver-devel](https://lists.sourceforge.net/lists/listinfo/geoserver-devel)


Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d


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


Juan Marín Otero
GIS Consultant

-------Visita mi blog en---------------------
http://guachintoneando.blogspot.com

Hi,

have a look at the following thread, and start a new one on the geoserver-users list if you have questions.

http://old.nabble.com/Re:–Geowebcache-devel–GWC-in-a-cluster-to30192328.html#a30192328

-Arne