Skip to content

So many circular reference errors for OData setup #337

@ozzioma

Description

@ozzioma
org.teiid teiid-spring-boot-starter 1.7.2 https://mvnrepository.com/artifact/org.teiid/spring-odata org.teiid spring-odata 1.7.2

spring.datasource.equity.url=jdbc:postgresql://localhost:5432/db
spring.datasource.equity.username=user
spring.datasource.equity.password=pwd
spring.datasource.equity.driver-class-name=org.postgresql.Driver
spring.datasource.equity.platform=equity

spring.teiid.model.package=com.ap.greenpole2.odata.equity.entities

@ConfigurationProperties(prefix = "spring.datasource.equity")
@bean
public DataSource equity() {
return DataSourceBuilder.create().build();
}

The dependencies of some of the beans in the application context form a cycle:

dataSourceScriptDatabaseInitializer defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]

equity defined in class path resource [com/ap/greenpole2/odata/equity/config/ODataConfig.class]
┌─────┐
| teiid defined in class path resource [org/teiid/spring/autoconfigure/TeiidAutoConfiguration.class]
↑ ↓
| teiidInitializer
└─────┘

Another one

webConfig
┌─────┐
| teiid defined in class path resource [org/teiid/spring/autoconfigure/TeiidAutoConfiguration.class]
↑ ↓
| teiidInitializer
└─────┘

Another one

org.teiid.spring.odata.WebConfig (field org.teiid.spring.autoconfigure.TeiidServer org.teiid.spring.odata.WebConfig.server)
┌─────┐
| teiid defined in class path resource [org/teiid/spring/autoconfigure/TeiidAutoConfiguration.class]
↑ ↓
| teiidInitializer
└─────┘

The above errors are few of so many.
I cloned the spring-odata module and used the SpringClient, SpringODataFilter, WebConfig,SimpleErrorController, StaticContentController,ODataController classes directly all to no avail.

Was this project properly tested before releasing both the binaries and user guides?
Nothing appears to work, as so many DataSource, TeiidServer and AutoConfiguration circular reference errors abound on startup.

How does this work?
Clearly the user guide needs reworking to explain the circular reference errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions