[teiid-issues] [JBoss JIRA] (TEIIDSB-160) Initialization order issue
Steven Hawkins (Jira)
issues at jboss.org
Tue Jan 21 08:16:09 EST 2020
[ https://issues.redhat.com/browse/TEIIDSB-160?focusedWorklogId=12449926&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-12449926 ]
Steven Hawkins logged work on TEIIDSB-160:
------------------------------------------
Author: Steven Hawkins
Created on: 21/Jan/20 8:13 AM
Start Date: 21/Jan/20 8:13 AM
Worklog Time Spent: 2 hours
Issue Time Tracking
-------------------
Remaining Estimate: 0 minutes (was: 2 hours)
Time Spent: 2 hours
Worklog Id: (was: 12449926)
> Initialization order issue
> --------------------------
>
> Key: TEIIDSB-160
> URL: https://issues.redhat.com/browse/TEIIDSB-160
> Project: Teiid Spring Boot
> Issue Type: Bug
> Components: core
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 1.4.0, 1.3.1
>
> Original Estimate: 2 hours
> Time Spent: 2 hours
> Remaining Estimate: 0 minutes
>
> In working with the infinispan translator there is a situation where defining a project that has no relational sources, but uses infinispan and a rest source on startup gives:
> {code}
> Description:
> The bean 'dataSource', defined in class path resource [org/teiid/spring/autoconfigure/TeiidAutoConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class] and overriding is disabled.
> Action:
> Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
> {code}
> Our starter has a reference to tomcat-jdbc, so that will always be in the classpath making that DataSourceConfiguration eligible.
> The best solution seems to be for the TeiidAutoConfiguration to be marked with {code}@AutoConfigureBefore({ DataSourceAutoConfiguration.class }){code} so that it will install the primary datasource bean first.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the teiid-issues
mailing list