Trying to connect GN with postgresql - srv.xml has an illegal name. Node names must be of the form: [a-zA-Z_\-]+

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Trying to connect GN with postgresql - srv.xml has an illegal name. Node names must be of the form: [a-zA-Z_\-]+

zer0mode
This post was updated on .
Hi, can someone point me in the right direction how to correctly connect GN 3.2.x (deployed with war) with postgresql ?

Deployment with the default H2 database works fine. Then I used the procedure in the manual http://geonetwork-opensource.org/manuals/3.0.5/eng/users/maintainer-guide/installing/configuring-database.html :

+ Comment out the h2 and set the postgresql node in srv.xml :
   <!-- <import resource="../config-db/h2.xml"/> -->
   <import resource="../config-db/postgres.xml"/>
+ Modify the connection information in the jdbc.properties file :
  jdbc.username=user
  jdbc.password=pass
  jdbc.database=userdb
+ Restart the tomcat service.


This is the result :
FATAL [jeeves.engine] - Raised exception during init
FATAL [jeeves.engine] -    Exception : java.lang.IllegalArgumentException: srv.xml has an illegal name.  Node names must be of the form: [a-zA-Z_\-]+
FATAL [jeeves.engine] -    Message   : srv.xml has an illegal name.  Node names must be of the form: [a-zA-Z_\-]+
FATAL [jeeves.engine] -    Stack     : java.lang.IllegalArgumentException: srv.xml has an illegal name.  Node names must be of the form: [a-zA-Z_\-]+
        at jeeves.config.springutil.JeevesContextLoaderListener.contextInitialized(JeevesContextLoaderListener.java:103)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5027)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5525)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1879)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)


And the server response :
HTTP Status 404 - /geonetwork
type Status report
message /geonetwork
description The requested resource is not available.

I couldn't find no report about this error on this mailing list, nor on the web. I appeared as there was an issue with the jdbc.username structure as the first postgresql user name consisted of numbers, eg: user123. I changed the user name just in case, but didn't help.

Using the user name and db specified in the jdbc.properties via the command line to connect to psql works, so the postgresql configuration shouldn't be the issue neither.


The worst of all is that if changing back to H2 - using the default settings in srv.xml and jdbc.properties, geonetwork stays blocked with the same error. No and I didn't forget to restart tomcat. I have to deploy the war file from scratch if I want to get rid of this error.


I'd realy appreciate some feedback on this and thanks for checking it out !
Reply | Threaded
Open this post in threaded view
|

Re: Trying to connect GN with postgresql - srv.xml has an illegal name. Node names must be of the form: [a-zA-Z_\-]+

zer0mode
Editing the config-spring-geonetwork is not a part of the procedure in the manual. Is that a necessary step ?
http://osgeo-org.1560.x6.nabble.com/GeoNetwork-with-PostGIS-configuration-problem-tp5311204p5311210.html
Reply | Threaded
Open this post in threaded view
|

Re: Trying to connect GN with postgresql - srv.xml has an illegal name. Node names must be of the form: [a-zA-Z_\-]+

Juan Luis Rodríguez Ponce
In reply to this post by zer0mode
Check the name of the node config file. It looks like when you edited it you
added another exntension so instead of be named srv.xml it is now name
srv.xml.somethingelse.
If it is the case, please remove the new extension and restore the file name
back to srv.xml.



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Trying-to-connect-GN-with-postgresql-srv-xml-has-an-illegal-name-Node-names-must-be-of-the-form-a-zA-tp5322253p5322349.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Trying to connect GN with potgres - srv.xml has an illegal name. Node names must be of the form: [a-zA-Z_\-]+

Juan Luis Rodríguez Ponce
In reply to this post by zer0mode
On Tue, May 30, 2017 at 10:38 AM, zer0mode <[hidden email]> wrote:

> Hi, can someone point me in the right direction how to correctly connect GN
> 3.2.x (deployed with war) with postgresql ?
>
> Deployment with the default H2 database works fine. Then I used the
> procedure in the manual
> http://geonetwork-opensource.org/manuals/3.0.5/eng/users/
> maintainer-guide/installing/configuring-database.html
> :
>
> + Comment out the h2 and set the postgresql node in srv.xml :
>
> + Modify the connection information in the jdbc.properties file :
>
> + Restart the tomcat service.
>
>
> This is the result :
> /FATAL [jeeves.engine] - Raised exception during init
> FATAL [jeeves.engine] -    Exception : java.lang.IllegalArgumentException:
> srv.xml has an illegal name.  Node names must be of the form: [a-zA-Z_\-]+
> FATAL [jeeves.engine] -    Message   : srv.xml has an illegal name.  Node
> names must be of the form: [a-zA-Z_\-]+
> FATAL [jeeves.engine] -    Stack     : java.lang.IllegalArgumentException:
> srv.xml has an illegal name.  Node names must be of the form: [a-zA-Z_\-]+
>         at
> jeeves.config.springutil.JeevesContextLoaderListener.contextInitialized(
> JeevesContextLoaderListener.java:103)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(
> StandardContext.java:5027)
>         at
> org.apache.catalina.core.StandardContext.startInternal(
> StandardContext.java:5525)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(
> ContainerBase.java:901)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
>         at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
>         at
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1879)
>         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> /
> I couldn't find no report about this error on this mailing list, nor on the
> web. I appeared as there was an issue with the jdbc.username structure as
> the first postgresql user name consisted of numbers, eg: user123. I changed
> the user name just in case, but didn't help.
>
> Using the user name and db specified in the jdbc.properties via the command
> line to connect to psql works, so the postgresql configuration shouldn't be
> the issue neither.
>
>
> The worst of all is that if changing back to H2 - using the default
> settings
> in srv.xml and jdbc.properties, geonetwork stays blocked with the same
> error. No and I didn't forget to restart tomcat. I have to deploy the war
> file from scratch if I want to get rid of this error.
>
>
> I'd realy appreciate some feedback on this and thanks for checking it out !
>


Check the name of the node config file. It looks like when you edited it
you added another exntension so instead of be named srv.xml it is now name
srv.xml.somethingelse.
If it is the case, please remove the new extension and restore the file
name back to srv.xml.


--












*Vriendelijke groeten / Kind regards,Juan Luis Rodríguez.
<http://www.geocat.net/>Veenderweg 136721 WD BennekomThe NetherlandsT: +31
(0)318 416664 <+31318416664> <https://www.facebook.com/geocatbv>
<https://twitter.com/geocat_bv>
<https://plus.google.com/u/1/+GeocatNetbv/posts>Please consider the
environment before printing this email.*
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Trying to connect GN with potgres - srv.xml has an illegal name. Node names must be of the form: [a-zA-Z_\-]+

zer0mode
This post was updated on .
Right ! There were exactly 2 dots in the filename. On purpose. I usually make a copy of the original file before modifying its contents. In this case I had overlooked the multinode mode and got punished.

Thank you a lot for the input ! It works now.