Git Product home page Git Product logo

Comments (14)

trisberg avatar trisberg commented on July 30, 2024

Has anybody tried to use this on CF? I'm getting the following error when I deploy the admin app:

2016-02-08T11:02:52.52-0500 [APP/0]      ERR Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] is defined: expected single matching bean but found 2: mydb,dataSource

Also CloudFoundryModuleDeployerConfiguration now has spaces instead of tabs for indentation. It should also have copyright year of 2015-2016. Same for ContextLoadsTests.

from spring-cloud-dataflow-server-cloudfoundry.

ericbottard avatar ericbottard commented on July 30, 2024

This seems to be an issue with DataSourceAutoConfiguration not detecting that there is already a DataSource available. If you rename your explicit db from mysql to dataSource, then everything is fine.

from spring-cloud-dataflow-server-cloudfoundry.

markpollack avatar markpollack commented on July 30, 2024

before my bad merge. It had been working with binding a 'mysql' service to the admin, which also used DataSourceAutoConfig I would assume. The new enable annotation should be impacting just how the SPI impl is discovered, but there is some odd side effect it would seem.

from spring-cloud-dataflow-server-cloudfoundry.

jvalkeal avatar jvalkeal commented on July 30, 2024

These seem to be side-effects when a config is moved into auto-configuration and things happen on a different order. spring-cloud/spring-cloud-dataflow#366 is one of those ticking bombs which will blow up if i.e. EnableDataFlowServer is moved into auto-config or something else is kicking different order of config use.

Also DataSourceAutoConfiguration is a little brittle and I had to exclude its auto-config from gpfdist sink. One thing in DataSourceAutoConfiguration may be that it's checking beans of DataSource and XADataSource and if explicitly created bean only implements one of those, I think boot does(maybe, possibly) it's own magic.

from spring-cloud-dataflow-server-cloudfoundry.

ericbottard avatar ericbottard commented on July 30, 2024

One of the problems with our current approach is that
@EnableAutoConfiguration (and hence its excludes) is set on a class that is
in the starter, and so can't be overridden by consumers

On Tue, Feb 9, 2016 at 3:17 PM, Janne Valkealahti [email protected]
wrote:

These seem to be side-effects when a config is moved into
auto-configuration and things happen on a different order.
spring-cloud/spring-cloud-dataflow#366
spring-cloud/spring-cloud-dataflow#366 is one
of those ticking bombs which will blow up if i.e. EnableDataFlowServer is
moved into auto-config or something else is kicking different order of
config use.

Also DataSourceAutoConfiguration is a little brittle and I had to exclude
its auto-config from gpfdist sink. One thing in
DataSourceAutoConfiguration may be that it's checking beans of DataSource
and XADataSource and if explicitly created bean only implements one of
those, I think boot does(maybe, possibly) it's own magic.


Reply to this email directly or view it on GitHub
#32 (comment)
.

from spring-cloud-dataflow-server-cloudfoundry.

jvalkeal avatar jvalkeal commented on July 30, 2024

@ericbottard which starter? Because that's really bad and may cause something I tracked down in spring-cloud/spring-cloud-dataflow#367.

from spring-cloud-dataflow-server-cloudfoundry.

markpollack avatar markpollack commented on July 30, 2024

TBH, we have taken the most simple thing in Spring 1.0 - different apps inject a different impl of a strategy interface and made it complex. That commit in the issue you point to is not an obvious solution. Maybe we can have several @EnableDataFlow annotation, one for each SPI impl so that they can control what they need to themselves.

from spring-cloud-dataflow-server-cloudfoundry.

jvalkeal avatar jvalkeal commented on July 30, 2024

@EnableDataFlowServer is only enabling shared stuff from admin server(controllers, repos, etc) and afaik there's currently nothing spi specific.

from spring-cloud-dataflow-server-cloudfoundry.

markfisher avatar markfisher commented on July 30, 2024

What @jvalkeal said... also, let's avoid doing anything drastic at the @EnableDataFlowServer level until we have a better understanding of the boundaries of the generic app-deployer SPI, and specifically what, if anything, has to be configured in addition to that to support the Data Flow Server on each target platform.

from spring-cloud-dataflow-server-cloudfoundry.

ericbottard avatar ericbottard commented on July 30, 2024

I'm talking about AdminConfiguration, which is the one that bears @EnbleAutoConfiguration

from spring-cloud-dataflow-server-cloudfoundry.

jvalkeal avatar jvalkeal commented on July 30, 2024

lol, ok, 367 was about removing that @EnableAutoConfiguration. We're on a same page here ;)

from spring-cloud-dataflow-server-cloudfoundry.

markpollack avatar markpollack commented on July 30, 2024

So w/ the rant over, I think I understand the issue ATM, thanks Janne. We prob don't even need this configuration class at all (cf auto-reconfiguration would inject the right stuff). An @ConditionalOnMissingBean for the datasource here seems to work and also if there are tested configuration classes (not needed here, prob a cut-n-paste thing wrt to moving config out of a common admin) they should have @conditional on them (as ilaya also found in the mesos admin). I'll try out a few things and hope to get this resolved today.

from spring-cloud-dataflow-server-cloudfoundry.

markpollack avatar markpollack commented on July 30, 2024

Long term, want to get away from auto-reconfiguration anyway.

from spring-cloud-dataflow-server-cloudfoundry.

markpollack avatar markpollack commented on July 30, 2024

Fixed this by simply removing the explicit configuration and let auto-reconfig handle it for now.
2d7e051

from spring-cloud-dataflow-server-cloudfoundry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.