[GeoNetwork-users-fr] Problème d'initialisation de GeoSource : postgresql remplacé par H2

Bonjour,

merci pour votre réponse François. C'est dommage qu'il n'y ait pas de lien
vers cette section de la documentation dans le chapitre sur l'installation
de GeoSource.

J'ai donc tenté de faire mon propre fichier d'override, sans trop de
succès. Alors pour faire plus simple, j'ai gardé le fichier d'override
utilisé par défaut : config-overrides-geosource.xml, et j'ai modifié le
fichier contenant les properties de la base de données avec les
informations de connexion à ma base postgres.

J'ai redémarré le serveur tomcat deux fois : la première fois la conf était
bien chargée mais il plantait après avoir créé le schéma de base de
donnée :* Exception
: java.lang.IllegalStateException: Could not register object
[jeeves.server.resources.ResourceManager@anonymised.com] under bean name
'resourceManager': there is already object
[jeeves.server.resources.ResourceManager@anonymised.com] bound*)

La deuxième fois plus de problème de base de données, il s'y connecte bien,
mais il plante sur l'initialisation de Z39.50, puis sur l'initialisation du
schema manager :

2013-11-29 16:50:41,744 INFO [jeeves.apphand] - - Z39.50...

2013-11-29 16:50:41,808 WARN [jeeves.apphand] - Cannot initialize Z39.50
repositories :
/usr/local/geosource/web/geosource/WEB-INF/classes/JZKitConfig.xml
(Permission denied)
2013-11-29 16:50:41,811 ERROR [jeeves.apphand] - Repositories file
builder FAILED - Z3950 server disabled and Z3950 client services (remote
search, harvesting) may not work.
2013-11-29 16:50:41,811 INFO [jeeves.apphand] - - Schema manager...
2013-11-29 16:50:41,811 INFO [jeeves.apphand] - - Schema plugins
directory:
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins
2013-11-29 16:50:41,811 INFO [jeeves.apphand] - - Schema Catalog File
  :
/usr/local/geosource/web/geosource/WEB-INF/data/config/schemaplugin-uri-catalog.xml
2013-11-29 16:50:41,841 ERROR [jeeves.engine] - Raised exception while
starting appl handler. Skipped.
2013-11-29 16:50:41,841 ERROR [jeeves.engine] - Handler :
org.fao.geonet.Geonetwork
2013-11-29 16:50:41,841 ERROR [jeeves.engine] - Exception :
java.io.FileNotFoundException:
/usr/local/geosource/web/geosource/WEB-INF/data/config/schemaplugin-uri-catalog.xml
(No such file or directory)
2013-11-29 16:50:41,841 ERROR [jeeves.engine] - Message :
/usr/local/geosource/web/geosource/WEB-INF/data/config/schemaplugin-uri-catalog.xml
(No such file or directory)
2013-11-29 16:50:41,842 ERROR [jeeves.engine] - Stack :
java.io.FileNotFoundException:
/usr/local/geosource/web/geosource/WEB-INF/data/config/schemaplugin-uri-catalog.xml
(No such file or directory)

En fouillant dans le dossier WEB-INF, j'ai trouvé le
fichier schemaplugin-uri-catalog.xml manquant que j'ai copié
dans WEB-INF/data/config. Mais ça plante de nouveau car il ne trouve pas
les règles dans schematron : en effet, elles sont en .sch au lieu d'être
en .xsd comme attendu :

2013-11-29 17:22:26,238 INFO [jeeves.apphand] - - Schema manager...
2013-11-29 17:22:26,238 INFO [jeeves.apphand] - - Schema plugins
directory:
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins
2013-11-29 17:22:26,238 INFO [jeeves.apphand] - - Schema Catalog File
  :
/usr/local/geosource/web/geosource/WEB-INF/data/config/schemaplugin-uri-catalog.xml
2013-11-29 17:22:26,527 DEBUG [jeeves] - Using oasis catalog files
/usr/local/geosource/web/geosource/WEB-INF/oasis-catalog.xml;/usr/local/geosource/web/geosource/WEB-INF/data/config/schemaplugin-uri-catalog.xml
2013-11-29 17:22:26,527 DEBUG [jeeves] - Using catalog resolver verbosity 1
2013-11-29 17:22:27,709 WARN [geonetwork.schemamanager] - WARNING:
gco:Record is a global element without a type - assuming a string
2013-11-29 17:22:27,753 WARN [geonetwork.schemamanager] - WARNING:
schema-substitutions.xml has wiped out XSD substitution list for
gml:CoordinateSystemAxis
2013-11-29 17:22:27,770 WARN [geonetwork.schemamanager] - WARNING:
schema-substitutions.xml has wiped out XSD substitution list for
gml:VerticalCS
2013-11-29 17:22:27,848 WARN [geonetwork.schemamanager] - WARNING:
schema-substitutions.xml has wiped out XSD substitution list for
gml:CoordinateSystemAxis
2013-11-29 17:22:27,849 WARN [geonetwork.schemamanager] - WARNING:
schema-substitutions.xml has wiped out XSD substitution list for
gml:VerticalDatum
2013-11-29 17:22:27,858 ERROR [geonetwork.schemamanager] - Schematron
rule file not found
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins/iso19139/schematron/schematron-rules-inspire.xsl.
Error is
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins/iso19139/schematron/schematron-rules-inspire.xsl
(Permission denied)
2013-11-29 17:22:27,858 ERROR [geonetwork.schemamanager] - Schematron
rule file not found
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins/iso19139/schematron/schematron-rules-iso.xsl.
Error is
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins/iso19139/schematron/schematron-rules-iso.xsl
(Permission denied)
2013-11-29 17:22:27,858 ERROR [geonetwork.schemamanager] - Schematron
rule file not found
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins/iso19139/schematron/schematron-rules-geonetwork.xsl.
Error is
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins/iso19139/schematron/schematron-rules-geonetwork.xsl
(Permission denied)
2013-11-29 17:22:27,879 ERROR [geonetwork.schemamanager] - Failed whilst
adding the schema information. Exception message if any is No such file or
directory
2013-11-29 17:22:27,881 ERROR [jeeves.engine] - Raised exception while
starting appl handler. Skipped.

Je dois encore avoir loupé un bout de la doc, mais j'avoue que je nage
complètement là : pourquoi le fait de changer la base de données entraine
des problèmes de chargement du schema manager et des règles ?
Faut-il que je modifie tout à la main ou y'a-t-il un fichier de conf qui
m'a échappé et qui gère le tout?

Merci d'avance pour votre aide.
Mathilde

Le 18 décembre 2013 16:29, Francois Prunayre <fx.prunayre@anonymised.com> a
écrit :

Bonjour Mathilde,

Pour simplifier les mises à jour, GéoSource surcharge [1] les options par
défaut avec le fichier de configuration config-overrides-geosource.xm<https://github.com/geosource-catalogue/core-geonetwork/blob/2.9.1/web/src/main/webapp/WEB-INF/config-overrides-geosource.xml#L14&gt;l [2]
qui lui importe un fichier de propiétés qui contient les informations
contenant la connexion à la base [3]. Une bonne pratique est de créer votre
fichier d'"override".

Salutations.

Francois

[1]
http://geonetwork-opensource.org/manuals/trunk/fra/users/admin/advanced/advanced/index.html#surcharge-de-configuration
[2]
https://github.com/geosource-catalogue/core-geonetwork/blob/2.9.1/web/src/main/webapp/WEB-INF/config-overrides-geosource.xml#L14
[3]
https://github.com/geosource-catalogue/core-geonetwork/blob/2.9.1/web/src/main/webapp/WEB-INF/config-overrides-geosource-props.xml

Le 18 décembre 2013 15:52, Mathilde Pellerin <
mathilde.pellerin@anonymised.com> a écrit :

Bonjour,

j'ai installé GeoSource sur un Ubuntu server LTS 12.04 sans problème (dans
/usr/local/geosource).
PostgreSQL 9.1 et Tomcat 7 sont déjà installés sur la machine.

Mon but est d'utiliser la base de donnée postgresql que j'ai installé pour
geosource et de faire tourner geosource dans tomcat.
J'ai suivi les instructions de la doc (cf. détails plus bas), mais
l'initialisation de GeoSource échoue :

2013-11-28 20:28:14,485 INFO [jeeves] - Overrides being applied to
> configuration file: .*/WEB-INF/config.xml
> 2013-11-28 20:28:14,498 INFO [jeeves] - Replacing attribute value of
node
> appHandler/param[@name='preferredSchema']
> 2013-11-28 20:28:14,498 DEBUG [jeeves] - New attribute is:iso19139
> 2013-11-28 20:28:14,500 DEBUG [jeeves] - Updating attibute of node
> /geonet/appHandler/param[6]
> 2013-11-28 20:28:14,501 INFO [jeeves] - Replacing attribute value of
node
> appHandler/param[@name='useSubversion']
> 2013-11-28 20:28:14,501 DEBUG [jeeves] - New attribute is:false
> 2013-11-28 20:28:14,501 DEBUG [jeeves] - Updating attibute of node
> /geonet/appHandler/param[13]
> 2013-11-28 20:28:14,502 INFO [jeeves] - Replacing text of
> general/maxUploadSize
> 2013-11-28 20:28:14,502 DEBUG [jeeves] - New text is:100
> 2013-11-28 20:28:14,502 DEBUG [jeeves] - replacing Text of
> /geonet/general/maxUploadSize
> 2013-11-28 20:28:14,515 INFO [jeeves] - Replacing child xml elements of
> resources
> 2013-11-28 20:28:14,526 DEBUG [jeeves] - New elements are:<toAdd>
> <resource enabled="true">
> <name>main-db</name>
> <provider>jeeves.resources.dbms.ApacheDBCPool</provider>
> <config>
> <user>admin</user>
> <password>gnos</password>
> <driver>org.h2.Driver</driver>
> <url>jdbc:h2:geonetwork</url>
> <poolSize>33</poolSize>
> <validationQuery>SELECT 1</validationQuery>
> </config>
> </resource>
> </toAdd>
> 2013-11-28 20:28:14,527 DEBUG [jeeves] - replacingXML of
/geonet/resources
> 2013-11-28 20:28:14,582 WARN [jeeves.dbmspool] - Using transaction
> isolation setting READ_COMMITTED
> 2013-11-28 20:28:17,110 ERROR [jeeves.engine] - Raised exception while
> initializing resource main-db in
> /usr/local/geosource/web/geosource/WEB-INF/config.xml. Skipped.
> 2013-11-28 20:28:17,110 ERROR [jeeves.engine] - Resource : main-db
> 2013-11-28 20:28:17,110 ERROR [jeeves.engine] - Provider :
> jeeves.resources.dbms.ApacheDBCPool
> 2013-11-28 20:28:17,111 ERROR [jeeves.engine] - Exception :
> org.apache.commons.dbcp.SQLNestedException: Cannot create
> PoolableConnectionFactory (IO Exception: "java.io.FileNotFoundException:
> /var/lib/tomcat7/geonetwork.lock.db (Permission denied)";
> "/var/lib/tomcat7/geonetwork.lock.db" [90031-152])
> 2013-11-28 20:28:17,111 ERROR [jeeves.engine] - Message : Cannot
> create PoolableConnectionFactory (IO Exception:
> "java.io.FileNotFoundException: /var/lib/tomcat7/geonetwork.lock.db
> (Permission denied)"; "/var/lib/tomcat7/geonetwork.lock.db" [90031-152])
> 2013-11-28 20:28:17,112 ERROR [jeeves.engine] - Stack :
> org.apache.commons.dbcp.SQLNestedException: Cannot create
> PoolableConnectionFactory (IO Exception: "java.io.FileNotFoundException:
> /var/lib/tomcat7/geonetwork.lock.db (Permission denied)";
> "/var/lib/tomcat7/geonetwork.lock.db" [90031-152])
> at
>
org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
> at
>
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
> at
>
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
> [...]

D'après ces logs, je comprends bien que GeoSource ne prends pas en compte
mon config.xml et qu'il remplace ma ressource postgresql par une resource
H2. Par contre, je ne comprends pas du tout pourquoi...
La moindre piste serait la bienvenue.

*Détail de mon installation :*

J'ai créé une base de données et un utilisateur geosource.
J'ai modifié le fichier web/geosource/WEB-INF/config.xml pour utiliser ma
base de donnée :

   - j'ai désactivé la base par défaut H2 :

<resource enabled="false">
  <name>main-db</name>
  <provider>jeeves.resources.dbms.ApacheDBCPool</provider>
  <config>
    <user>admin</user>
    <password>gnos</password>
    <driver>org.h2.Driver</driver>

<url>jdbc:h2:geonetwork;LOCK_TIMEOUT=20000;DB_CLOSE_ON_EXIT=FALSE;MVCC=TRUE</url>
    <poolSize>33</poolSize>
    <validationQuery>SELECT 1</validationQuery>
  </config>
</resource>

   - et j'ai activé la base postgresql :

<resource enabled="true">
      <name>main-db</name>
      <provider>jeeves.resources.dbms.ApacheDBCPool</provider>
      <config>
              <user>geosource</user>
              <password>monpassword</password>
              <driver>org.postgresql.Driver</driver>
              <url>jdbc:postgresql://localhost:5432/geosource</url>
              <poolSize>10</poolSize>
              <validationQuery>SELECT 1</validationQuery>
      </config>
</resource>

j'ai bien vérifié qu'il n'y avait qu'une seule section resource avec
l'attribut "enable" à true.

Pour publié geosource dans tomcat, j'ai suivi les instructions de
http://trac.osgeo.org/geonetwork/wiki/HowToRunUnderTomcat

   - création le fichier geosource.xml

   dans /etc/tomcat7/Catalina/localhost/ :

    <Context docBase="/usr/local/geosource/web/geosource"
privileged="true" antiResourceLocking="false" antiJARLocking="false">
    </Context>

   - j'ai rendu tomcat7 propriétaire des dossiers geosource/web
   et geosource/data
   - j'ai vérifié que TOMCAT7_SECURITY=no
   - j'ai redémarré tomcat.

est-ce que j'ai oublié quelque chose?

Merci d'avance pour toutes vos suggestions.

Cordialement,
Mathilde Pellerin

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
Pro!

http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
GeoNetwork-users-fr mailing list
GeoNetwork-users-fr@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users-fr

Le problème est résolu : c'était un problème de droit. J'avais bien donné
rendu tomcat propriétaire des dossier geosource/data et geosource/web, mais
pas de manière récursive...

Le 19 décembre 2013 11:15, Mathilde Pellerin <
mathilde.pellerin@anonymised.com> a écrit :

Bonjour,

merci pour votre réponse François. C'est dommage qu'il n'y ait pas de lien
vers cette section de la documentation dans le chapitre sur l'installation
de GeoSource.

J'ai donc tenté de faire mon propre fichier d'override, sans trop de
succès. Alors pour faire plus simple, j'ai gardé le fichier d'override
utilisé par défaut : config-overrides-geosource.xml, et j'ai modifié le
fichier contenant les properties de la base de données avec les
informations de connexion à ma base postgres.

J'ai redémarré le serveur tomcat deux fois : la première fois la conf
était bien chargée mais il plantait après avoir créé le schéma de base de
donnée :* Exception : java.lang.IllegalStateException: Could not register
object [jeeves.server.resources.ResourceManager@anonymised.com] under bean name
'resourceManager': there is already object
[jeeves.server.resources.ResourceManager@anonymised.com] bound*)

La deuxième fois plus de problème de base de données, il s'y connecte
bien, mais il plante sur l'initialisation de Z39.50, puis sur
l'initialisation du schema manager :

2013-11-29 16:50:41,744 INFO [jeeves.apphand] - - Z39.50...

2013-11-29 16:50:41,808 WARN [jeeves.apphand] - Cannot initialize Z39.50
repositories :
/usr/local/geosource/web/geosource/WEB-INF/classes/JZKitConfig.xml
(Permission denied)
2013-11-29 16:50:41,811 ERROR [jeeves.apphand] - Repositories file
builder FAILED - Z3950 server disabled and Z3950 client services (remote
search, harvesting) may not work.
2013-11-29 16:50:41,811 INFO [jeeves.apphand] - - Schema manager...
2013-11-29 16:50:41,811 INFO [jeeves.apphand] - - Schema plugins
directory:
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins
2013-11-29 16:50:41,811 INFO [jeeves.apphand] - - Schema Catalog File
  :
/usr/local/geosource/web/geosource/WEB-INF/data/config/schemaplugin-uri-catalog.xml
2013-11-29 16:50:41,841 ERROR [jeeves.engine] - Raised exception while
starting appl handler. Skipped.
2013-11-29 16:50:41,841 ERROR [jeeves.engine] - Handler :
org.fao.geonet.Geonetwork
2013-11-29 16:50:41,841 ERROR [jeeves.engine] - Exception :
java.io.FileNotFoundException:
/usr/local/geosource/web/geosource/WEB-INF/data/config/schemaplugin-uri-catalog.xml
(No such file or directory)
2013-11-29 16:50:41,841 ERROR [jeeves.engine] - Message :
/usr/local/geosource/web/geosource/WEB-INF/data/config/schemaplugin-uri-catalog.xml
(No such file or directory)
2013-11-29 16:50:41,842 ERROR [jeeves.engine] - Stack :
java.io.FileNotFoundException:
/usr/local/geosource/web/geosource/WEB-INF/data/config/schemaplugin-uri-catalog.xml
(No such file or directory)

En fouillant dans le dossier WEB-INF, j'ai trouvé le
fichier schemaplugin-uri-catalog.xml manquant que j'ai copié
dans WEB-INF/data/config. Mais ça plante de nouveau car il ne trouve pas
les règles dans schematron : en effet, elles sont en .sch au lieu d'être
en .xsd comme attendu :

2013-11-29 17:22:26,238 INFO [jeeves.apphand] - - Schema manager...
2013-11-29 17:22:26,238 INFO [jeeves.apphand] - - Schema plugins
directory:
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins
2013-11-29 17:22:26,238 INFO [jeeves.apphand] - - Schema Catalog File
  :
/usr/local/geosource/web/geosource/WEB-INF/data/config/schemaplugin-uri-catalog.xml
2013-11-29 17:22:26,527 DEBUG [jeeves] - Using oasis catalog files
/usr/local/geosource/web/geosource/WEB-INF/oasis-catalog.xml;/usr/local/geosource/web/geosource/WEB-INF/data/config/schemaplugin-uri-catalog.xml
2013-11-29 17:22:26,527 DEBUG [jeeves] - Using catalog resolver verbosity
1
2013-11-29 17:22:27,709 WARN [geonetwork.schemamanager] - WARNING:
gco:Record is a global element without a type - assuming a string
2013-11-29 17:22:27,753 WARN [geonetwork.schemamanager] - WARNING:
schema-substitutions.xml has wiped out XSD substitution list for
gml:CoordinateSystemAxis
2013-11-29 17:22:27,770 WARN [geonetwork.schemamanager] - WARNING:
schema-substitutions.xml has wiped out XSD substitution list for
gml:VerticalCS
2013-11-29 17:22:27,848 WARN [geonetwork.schemamanager] - WARNING:
schema-substitutions.xml has wiped out XSD substitution list for
gml:CoordinateSystemAxis
2013-11-29 17:22:27,849 WARN [geonetwork.schemamanager] - WARNING:
schema-substitutions.xml has wiped out XSD substitution list for
gml:VerticalDatum
2013-11-29 17:22:27,858 ERROR [geonetwork.schemamanager] -
Schematron rule file not found
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins/iso19139/schematron/schematron-rules-inspire.xsl.
Error is
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins/iso19139/schematron/schematron-rules-inspire.xsl
(Permission denied)
2013-11-29 17:22:27,858 ERROR [geonetwork.schemamanager] -
Schematron rule file not found
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins/iso19139/schematron/schematron-rules-iso.xsl.
Error is
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins/iso19139/schematron/schematron-rules-iso.xsl
(Permission denied)
2013-11-29 17:22:27,858 ERROR [geonetwork.schemamanager] -
Schematron rule file not found
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins/iso19139/schematron/schematron-rules-geonetwork.xsl.
Error is
/usr/local/geosource/web/geosource/WEB-INF/data/config/schema_plugins/iso19139/schematron/schematron-rules-geonetwork.xsl
(Permission denied)
2013-11-29 17:22:27,879 ERROR [geonetwork.schemamanager] - Failed whilst
adding the schema information. Exception message if any is No such file or
directory
2013-11-29 17:22:27,881 ERROR [jeeves.engine] - Raised exception while
starting appl handler. Skipped.

Je dois encore avoir loupé un bout de la doc, mais j'avoue que je nage
complètement là : pourquoi le fait de changer la base de données entraine
des problèmes de chargement du schema manager et des règles ?
Faut-il que je modifie tout à la main ou y'a-t-il un fichier de conf qui
m'a échappé et qui gère le tout?

Merci d'avance pour votre aide.
Mathilde

Le 18 décembre 2013 16:29, Francois Prunayre <fx.prunayre@anonymised.com> a
écrit :

Bonjour Mathilde,

Pour simplifier les mises à jour, GéoSource surcharge [1] les options par
défaut avec le fichier de configuration config-overrides-geosource.xm<https://github.com/geosource-catalogue/core-geonetwork/blob/2.9.1/web/src/main/webapp/WEB-INF/config-overrides-geosource.xml#L14&gt;l [2]
qui lui importe un fichier de propiétés qui contient les informations
contenant la connexion à la base [3]. Une bonne pratique est de créer votre
fichier d'"override".

Salutations.

Francois

[1]
http://geonetwork-opensource.org/manuals/trunk/fra/users/admin/advanced/advanced/index.html#surcharge-de-configuration
[2]
https://github.com/geosource-catalogue/core-geonetwork/blob/2.9.1/web/src/main/webapp/WEB-INF/config-overrides-geosource.xml#L14
[3]
https://github.com/geosource-catalogue/core-geonetwork/blob/2.9.1/web/src/main/webapp/WEB-INF/config-overrides-geosource-props.xml

Le 18 décembre 2013 15:52, Mathilde Pellerin <
mathilde.pellerin@anonymised.com> a écrit :

Bonjour,

j'ai installé GeoSource sur un Ubuntu server LTS 12.04 sans problème
(dans
/usr/local/geosource).
PostgreSQL 9.1 et Tomcat 7 sont déjà installés sur la machine.

Mon but est d'utiliser la base de donnée postgresql que j'ai installé
pour
geosource et de faire tourner geosource dans tomcat.
J'ai suivi les instructions de la doc (cf. détails plus bas), mais
l'initialisation de GeoSource échoue :

2013-11-28 20:28:14,485 INFO [jeeves] - Overrides being applied to
> configuration file: .*/WEB-INF/config.xml
> 2013-11-28 20:28:14,498 INFO [jeeves] - Replacing attribute value of
node
> appHandler/param[@name='preferredSchema']
> 2013-11-28 20:28:14,498 DEBUG [jeeves] - New attribute is:iso19139
> 2013-11-28 20:28:14,500 DEBUG [jeeves] - Updating attibute of node
> /geonet/appHandler/param[6]
> 2013-11-28 20:28:14,501 INFO [jeeves] - Replacing attribute value of
node
> appHandler/param[@name='useSubversion']
> 2013-11-28 20:28:14,501 DEBUG [jeeves] - New attribute is:false
> 2013-11-28 20:28:14,501 DEBUG [jeeves] - Updating attibute of node
> /geonet/appHandler/param[13]
> 2013-11-28 20:28:14,502 INFO [jeeves] - Replacing text of
> general/maxUploadSize
> 2013-11-28 20:28:14,502 DEBUG [jeeves] - New text is:100
> 2013-11-28 20:28:14,502 DEBUG [jeeves] - replacing Text of
> /geonet/general/maxUploadSize
> 2013-11-28 20:28:14,515 INFO [jeeves] - Replacing child xml elements
of
> resources
> 2013-11-28 20:28:14,526 DEBUG [jeeves] - New elements are:<toAdd>
> <resource enabled="true">
> <name>main-db</name>
> <provider>jeeves.resources.dbms.ApacheDBCPool</provider>
> <config>
> <user>admin</user>
> <password>gnos</password>
> <driver>org.h2.Driver</driver>
> <url>jdbc:h2:geonetwork</url>
> <poolSize>33</poolSize>
> <validationQuery>SELECT 1</validationQuery>
> </config>
> </resource>
> </toAdd>
> 2013-11-28 20:28:14,527 DEBUG [jeeves] - replacingXML of
/geonet/resources
> 2013-11-28 20:28:14,582 WARN [jeeves.dbmspool] - Using transaction
> isolation setting READ_COMMITTED
> 2013-11-28 20:28:17,110 ERROR [jeeves.engine] - Raised exception while
> initializing resource main-db in
> /usr/local/geosource/web/geosource/WEB-INF/config.xml. Skipped.
> 2013-11-28 20:28:17,110 ERROR [jeeves.engine] - Resource : main-db
> 2013-11-28 20:28:17,110 ERROR [jeeves.engine] - Provider :
> jeeves.resources.dbms.ApacheDBCPool
> 2013-11-28 20:28:17,111 ERROR [jeeves.engine] - Exception :
> org.apache.commons.dbcp.SQLNestedException: Cannot create
> PoolableConnectionFactory (IO Exception:
"java.io.FileNotFoundException:
> /var/lib/tomcat7/geonetwork.lock.db (Permission denied)";
> "/var/lib/tomcat7/geonetwork.lock.db" [90031-152])
> 2013-11-28 20:28:17,111 ERROR [jeeves.engine] - Message : Cannot
> create PoolableConnectionFactory (IO Exception:
> "java.io.FileNotFoundException: /var/lib/tomcat7/geonetwork.lock.db
> (Permission denied)"; "/var/lib/tomcat7/geonetwork.lock.db"
[90031-152])
> 2013-11-28 20:28:17,112 ERROR [jeeves.engine] - Stack :
> org.apache.commons.dbcp.SQLNestedException: Cannot create
> PoolableConnectionFactory (IO Exception:
"java.io.FileNotFoundException:
> /var/lib/tomcat7/geonetwork.lock.db (Permission denied)";
> "/var/lib/tomcat7/geonetwork.lock.db" [90031-152])
> at
>
org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
> at
>
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
> at
>
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
> [...]

D'après ces logs, je comprends bien que GeoSource ne prends pas en compte
mon config.xml et qu'il remplace ma ressource postgresql par une resource
H2. Par contre, je ne comprends pas du tout pourquoi...
La moindre piste serait la bienvenue.

*Détail de mon installation :*

J'ai créé une base de données et un utilisateur geosource.
J'ai modifié le fichier web/geosource/WEB-INF/config.xml pour utiliser ma
base de donnée :

   - j'ai désactivé la base par défaut H2 :

<resource enabled="false">
  <name>main-db</name>
  <provider>jeeves.resources.dbms.ApacheDBCPool</provider>
  <config>
    <user>admin</user>
    <password>gnos</password>
    <driver>org.h2.Driver</driver>

<url>jdbc:h2:geonetwork;LOCK_TIMEOUT=20000;DB_CLOSE_ON_EXIT=FALSE;MVCC=TRUE</url>
    <poolSize>33</poolSize>
    <validationQuery>SELECT 1</validationQuery>
  </config>
</resource>

   - et j'ai activé la base postgresql :

<resource enabled="true">
      <name>main-db</name>
      <provider>jeeves.resources.dbms.ApacheDBCPool</provider>
      <config>
              <user>geosource</user>
              <password>monpassword</password>
              <driver>org.postgresql.Driver</driver>
              <url>jdbc:postgresql://localhost:5432/geosource</url>
              <poolSize>10</poolSize>
              <validationQuery>SELECT 1</validationQuery>
      </config>
</resource>

j'ai bien vérifié qu'il n'y avait qu'une seule section resource avec
l'attribut "enable" à true.

Pour publié geosource dans tomcat, j'ai suivi les instructions de
http://trac.osgeo.org/geonetwork/wiki/HowToRunUnderTomcat

   - création le fichier geosource.xml

   dans /etc/tomcat7/Catalina/localhost/ :

    <Context docBase="/usr/local/geosource/web/geosource"
privileged="true" antiResourceLocking="false" antiJARLocking="false">
    </Context>

   - j'ai rendu tomcat7 propriétaire des dossiers geosource/web
   et geosource/data
   - j'ai vérifié que TOMCAT7_SECURITY=no
   - j'ai redémarré tomcat.

est-ce que j'ai oublié quelque chose?

Merci d'avance pour toutes vos suggestions.

Cordialement,
Mathilde Pellerin

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into
your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of
AppDynamics Pro!

http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
GeoNetwork-users-fr mailing list
GeoNetwork-users-fr@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users-fr