Re: Jahia access to remote postgresql failed

Javier TurĂ©gano <[email protected]> Tue, 13 Nov 2007 11:13:28 +0100 (CET)
Newsgroups gmane.comp.cms.jahia.install
Message-ID <[email protected]>
El Lun, 12 de Noviembre de 2007, 5:13 pm, Sergiy Shyrkov escribi=F3:
> Hi Javier,
>
> please, let me know, which version of Jahia you use and post the
> exception stack trace that you get after changes, I described
> (datasource in the jahia.xml and Hibernate dialect in the
> applicationcontext-hibernate.xml).
>

We are running Jahia Profesional 5.x, not sure about the revision... any
place to look for it in the filesystem?

Here are the changes we made to the files you suggested:

[tomcat/webapps/ROOT/WEB-INF/etc/spring/applicationcontext-hibernate.xml]
-------------------------------------------------------------------------

                <!-- <prop
key=3D"hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop>
-->
                <prop
key=3D"hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
                <prop key=3D"hibernate.hbm2ddl.auto">update</prop>
                <prop key=3D"hibernate.show_sql">false</prop>



[tomcat/conf/Catalina/localhost/jahia.xml]
-----------------------------------------------------------

<Context path=3D"" docBase=3D"ROOT" 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"true"
            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" password=3D"..=
jahia"
            driverClassName=3D"org.postgresql.Driver"
url=3D"jdbc:postgresql://192.168.1.5:5432/jahia"
defaultAutoCommit=3D"true"
            maxActive=3D"20" maxIdle=3D"30" maxWait=3D"10000"/>

  <!-- Resource configuration for UserTransaction use JOTM -->
  <!--
  <ResourceLink name=3D"UserTransaction"
        global=3D"UserTransaction"
        type=3D"javax.transaction.UserTransaction"/>
  -->
</Context>

I mail directly to you the full catalina.out of a server startup, for not
to flooding the list.

> Could you also provide more details about the migration, you done from
> HSQL to PostgreSQL?
>

We have not found many documentation about this process, so our aprox was:

Adapting the HSQL sql script, some datatype needed to be adapted in order
to load into postgresql. Then loaded it intro a new jahia database in
postgres and updated rights to allow the jahia machine to ask that
database.

> Thank you!
> Sergiy
>
> Javier Tur=E9gano wrote:
>> 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"t=
rue"
>>>             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"t=
rue"
>>>             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 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