Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-88444

External Datasource doesn't work anymore in 7.1.1 GA2

    Details

      Description

      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>
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  39 weeks ago

                  Packages

                  Version Package
                  7.1.10 DXP FP10
                  7.1.10.2 SP2
                  7.1.3 CE GA4
                  7.1.X