-
Type:
Regression Bug
-
Status: Resolved
-
Resolution: Fixed
-
Affects Version/s: 7.1.10 DXP FP3, 7.1.1 CE GA2, 7.1.X
-
Fix Version/s: 7.1.10 DXP FP10, 7.1.10.2 SP2, 7.1.3 CE GA4, 7.1.X
-
Component/s: Core Infrastructure > Service Builder
-
Branch Version/s:7.1.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Last Working Version:
-
Git Pull Request:
Service Builder OSGI modules with external datasource definition doesn't work anymore with Liferay 7.1.1 GA2.
The services are connected to the internal Datasource (confirmed by creating missing tables in it).
There was no trouble with LP 7.1.0 GA1.
Not the only one with that trouble (cf https://community.liferay.com/forums/-/message_boards/message/111742415)
here is how my ext-spring is defined, following thisd guide : https://dev.liferay.com/de/develop/tutorials/-/knowledge_base/7-1/connecting-service-builder-to-external-databases
<beans default-destroy-method="destroy" default-init-method="afterPropertiesSet" xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <!-- To define an external data source, the liferayDataSource Spring bean must be overridden. Other default Spring beans like liferaySessionFactory and liferayTransactionManager may optionally be overridden. liferayDataSourceFactory refers to the data source configured on the application server. --> <bean class="com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean" id="liferayDataSourceFactory"> <property name="propertyPrefix" value="custom." /> <property name="properties"> <props> <prop key="custom.jndi.name">jdbc/ober</prop> </props> </property> </bean> <!-- The data source bean refers to the factory to access the data source. --> <bean class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy" id="liferayDataSource"> <property name="targetDataSource" ref="liferayDataSourceFactory" /> </bean> <!-- In service.xml, we associated our entity with the extDataSource. To associate the extDataSource with our overridden liferayDataSource, we define this alias. --> <alias alias="oberDataSource" name="liferayDataSource" /> </beans>