Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Kevin Boger
Connecting LR 5.2.2 to Websphere datasource
June 8, 2009 11:12 AM
Answer

Kevin Boger

Rank: Junior Member

Posts: 63

Join Date: February 25, 2009

Recent Posts

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
Olaf Kock
RE: Connecting LR 5.2.2 to Websphere datasource
June 9, 2009 5:50 AM
Answer

Olaf Kock

LIFERAY STAFF

Rank: Liferay Legend

Posts: 3523

Join Date: September 23, 2008

Recent Posts

According to this wiki article there should be a change in portal-ext.properties:
1jdbc.default.jndi.name=jdbc/LiferayPool

Disclaimer: haven't tried, never installed Liferay on Websphere. Hope it helps.
Kevin Boger
RE: Connecting LR 5.2.2 to Websphere datasource
June 11, 2009 12:32 PM
Answer

Kevin Boger

Rank: Junior Member

Posts: 63

Join Date: February 25, 2009

Recent Posts

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
Richard Sezov
RE: Connecting LR 5.2.2 to Websphere datasource
June 11, 2009 1:57 PM
Answer

Richard Sezov

LIFERAY STAFF

Rank: Regular Member

Posts: 211

Join Date: February 7, 2007

Recent Posts

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.