Re: Jahia access to remote postgresql failed
Javier Turégano <[email protected]> Mon, 12 Nov 2007 16:58:46 +0100 (CET)
| Newsgroups | gmane.comp.cms.jahia.install |
|---|---|
| Message-ID | <[email protected]> |
Hi Sergiy, El Lun, 12 de Noviembre de 2007, 4:41 pm, Sergiy Shyrkov escribi=F3: > Hi Javier, > First of all thanks for your fast answer. > in the default installation the database connection is configured using > the JNDI datasource that is used in Jahia. > Its name is configured as 'datasource.name' in the jahia.properties > file. If it is specified, other settings have no influence in this case. > The same datasource is used across all Jahia services. > Its configuration is located in the > <TOMCAT_HOME>/conf/Catalina/localhost/jahia.xml file (in the default > installation). > > You need to change the datasource configuration in the jahia.xml file > from HSQL to PostgreSQL, i.e.: > We have done this change also, but it looks like that has no effect over our instalation. After the change is enough a tomcat restart or there is more work to do? Is necesary to change also the jahia.xml located in the src tree? > <Context path=3D"/jahia" docBase=3D"jahia" crossContext=3D"true"> > > <Manager pathname=3D""/> > > <Resource name=3D"jdbc/jetspeed" auth=3D"Container" > factory=3D"org.apache.commons.dbcp.BasicDataSourceFactory" > type=3D"javax.sql.DataSource" username=3D"jahia_user" > password=3D"jahia_pass" > driverClassName=3D"org.postgresql.Driver" > url=3D"jdbc:postgresql://192.168.1.5:5432/jahia" defaultAutoCommit=3D"tru= e" > maxActive=3D"100" maxIdle=3D"30" maxWait=3D"10000"/> > > <Resource name=3D"jdbc/jetspeedNonTx" auth=3D"Container" > factory=3D"org.apache.commons.dbcp.BasicDataSourceFactory" > type=3D"javax.sql.DataSource" username=3D"jahia_user" > password=3D"jahia_pass" > driverClassName=3D"org.postgresql.Driver" > url=3D"jdbc:postgresql://192.168.1.5:5432/jahia" defaultAutoCommit=3D"tru= e" > maxActive=3D"20" maxIdle=3D"30" maxWait=3D"10000"/> > > </Context> > > > Kind regards > Sergiy Shyrkov > Any other idea or posibility about where the source of the problem is? > Javier Tur=E9gano wrote: >> Hi all, >> >> We are trying to migrate our actual instalation of Jahia 5 from HSQL to >> Postgresql. After some difficulties we were able to load the hsqldb into >> postgresql. >> >> Then actualized the jahia.properties file this way: >> >> db_script =3D >> postgresql.script >> db_driver =3D >> org.postgresql.Driver >> db_url =3D >> jdbc\:postgresql\://192.168.1.5\:5432/jahia >> db_username =3D jahia_user >> db_password =3D jahia_pass >> db_transactions =3D false >> db_support_embedded_select_statement =3D true >> db_starthsqlserver =3D false >> >> And restarted jahia. Also tried the db_url withouth \ . But the jahia >> host >> is unable to connect to the postgres host. Looked in the lists for that >> kind of problems and we only find one unresolved question about the same >> problem. We have checked that there are no network issues: we were able >> to >> ask the postgresql server for data from the command line in the jahia >> host. >> >> We found in the catalina.out log surprising things like this: >> >> - dbLocation=3D/WEB-INF/var/dbdata/hsqldbjahia >> - realPath =3D >> /var/jahia/tomcat/webapps/ROOT/WEB-INF/var/dbdata/hsqldbjahia >> - jahia.config=3D/WEB-INF/etc/config/jahia.properties >> - HSQL server will not be started. >> >> It looks like Jahia still has info about the old hsql database. Any >> other >> configuration file or parameter we should change? >> >> The errors we can find in the log: >> >> org.springframework.beans.factory.BeanCreationException: Error creating >> bean with name 'PlatformConfigurator' defined in ServletContext resource >> [/WEB-INF/etc/jetspeed/conf/assembly/boot/datasource.xml]: >> Initialization >> of bean failed; nested exception is >> org.apache.ojb.broker.metadata.MetadataException: Could not get the >> metadata from the given datasource >> org.apache.ojb.broker.metadata.MetadataException: Could not get the >> metadata from the given datasource >> at >> org.apache.ojb.broker.metadata.JdbcMetadataUtils.fillJCDFromDataSource(J= dbcMetadataUtils.java:277) >> >> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create >> PoolableConnectionFactory (socket creation error) >> >> Caused by: java.sql.SQLException: socket creation error >> >> 491 [main] ERROR org.apache.jetspeed.engine.JetspeedEngine.start:130 >> - >> org.springframework.beans.factory.BeanCreationException: Error creating >> bean with name 'PlatformConfigurator' defined in ServletContext >> resource [/WEB-INF/etc/jetspeed/conf/assembly/boot/datasource.xml]: >> Initialization of bean failed; nested exception is >> org.apache.ojb.broker.metadata.MetadataException: Could not get the >> metadata from the given datasource >> 491 [2007-11-12 13:30:49,081] >> [org.apache.jetspeed.engine.JetspeedEngine] ERROR - >> org.springframework.beans.factory.BeanCreationException: Error creating >> bean with name 'PlatformConfigurator' defined in ServletContext >> resource [/WEB-INF/etc/jetspeed/conf/assembly/boot/datasource.xml]: >> Initialization of bean failed; nested exception is >> org.apache.ojb.broker.metadata.MetadataException: Could not get the >> metadata from the given datasource >> 493 [2007-11-12 13:30:49,083] [org.jahia.bin.JahiaJetspeedServlet] >> FATAL - Jetspeed: init() failed: >> org.apache.jetspeed.exception.JetspeedException: Jetspeed Initialization >> exception! >> >> Any idea or sugestion to find the problem? If you need more information >> about the instalation just ask for it. >> >> Thank you. >> >> --------------------------------- >> Javier Tur=E9gano Molina >> Andago Ingenier=EDa >> www.andago.com >> >> >> _______________________________________________ >> install_list mailing list >> [email protected] >> http://lists.jahia.org/cgi-bin/mailman/listinfo/install_list >> >> > > -- = --------------------------------- Javier Tur=E9gano Molina Jefe de Proyecto Andago Ingenier=EDa www.andago.com t: 916011373 Ext. 45 f: 916011372 -------------------------------- ADE7 A690 29BB C644 3021 3919 C702 E423 014A D1F6 _______________________________________________ install_list mailing list [email protected] http://lists.jahia.org/cgi-bin/mailman/listinfo/install_list