Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Kevin Boger
Connecting LR 5.2.2 to Websphere datasource
8 de junio de 2009 11:12
Respuesta

Kevin Boger

Ranking: Junior Member

Mensajes: 63

Fecha de incorporación: 25 de febrero de 2009

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
Olaf Kock
RE: Connecting LR 5.2.2 to Websphere datasource
9 de junio de 2009 5:50
Respuesta

Olaf Kock

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 3464

Fecha de incorporación: 23 de septiembre de 2008

Mensajes recientes

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
11 de junio de 2009 12:32
Respuesta

Kevin Boger

Ranking: Junior Member

Mensajes: 63

Fecha de incorporación: 25 de febrero de 2009

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
Richard Sezov
RE: Connecting LR 5.2.2 to Websphere datasource
11 de junio de 2009 13:57
Respuesta

Richard Sezov

LIFERAY STAFF

Ranking: Regular Member

Mensajes: 211

Fecha de incorporación: 7 de febrero de 2007

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.