Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

So many circular reference errors for OData setup #337

Open
ozzioma opened this issue Feb 2, 2023 · 0 comments
Open

So many circular reference errors for OData setup #337

ozzioma opened this issue Feb 2, 2023 · 0 comments

Comments

@ozzioma
Copy link

ozzioma commented Feb 2, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant