Foros de discusión

Connecting LR 5.2.2 to Websphere datasource

Kevin Boger, modificado hace 14 años.

Connecting LR 5.2.2 to Websphere datasource

Junior Member Mensajes: 63 Fecha de incorporación: 25/02/09 Mensajes recientes
Hi All...

I've installed 5.2.2 on Websphere 6.1.0.21 with the default hypersonic db and it works fine... I then created a datasource in the WAS admin console

Name: LiferayPool
JNDI: jdbc/LiferayPool
DB: lportal

I test and the datasource connects in the admin console... I then create a ext-spring.xml file and place it in the /META-INF folder:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
<bean id="liferayDataSource" class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy">
<property name="LiferayPool">
<bean class="com.liferay.portal.spring.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jdbc/LiferayPool" />
</bean>
</property>
</bean>
</beans>

But when I restarted the app server and access liferay... I get the following error...

Error 500: Filter [Virtual Host Filter]: filter is unavailable.

Can anyone help me with this? Do I need to make additional changes to a portal-ext.properties file?

thanks in advance... Kevykev
thumbnail
Olaf Kock, modificado hace 14 años.

RE: Connecting LR 5.2.2 to Websphere datasource

Liferay Legend Mensajes: 6403 Fecha de incorporación: 23/09/08 Mensajes recientes
According to this wiki article there should be a change in portal-ext.properties:
jdbc.default.jndi.name=jdbc/LiferayPool

Disclaimer: haven't tried, never installed Liferay on Websphere. Hope it helps.
Kevin Boger, modificado hace 14 años.

RE: Connecting LR 5.2.2 to Websphere datasource

Junior Member Mensajes: 63 Fecha de incorporación: 25/02/09 Mensajes recientes
You were correct... This fixed my db2 connection issues...

portal-ext.properties:

# Hibernate settings from liferay for db2
hibernate.dialect=com.liferay.portal.dao.orm.hibernate.DB2Dialect
custom.sql.function.isnull=CAST(? AS VARCHAR(32672)) IS NULL
custom.sql.function.isnotnull=CAST(? AS VARCHAR(32672)) IS NOT NULL


jdbc.default.driverClassName=com.ibm.db2.jcc.DB2Driver
jdbc.default.url=jdbc:db2://hostname:50000/lportal
jdbc.default.username=db2admin
jdbc.default.password=db2admin
thumbnail
Rich Sezov, modificado hace 14 años.

RE: Connecting LR 5.2.2 to Websphere datasource

Regular Member Mensajes: 220 Fecha de incorporación: 7/02/07 Mensajes recientes
Note that by using the properties you used, you have configured Liferay to use its internal data source, which is implemented by C3P0, instead of the WebSphere data source you configured.

To use the WebSphere data source, use the property Olaf mentioned.

For full WebSphere deployment instructions, see the newly released Liferay Portal Administrator's Guide, beginning on page 58.