GithubHelp home page GithubHelp logo

Comments (8)

ramnivas avatar ramnivas commented on May 28, 2024

Not really. Try a project without one of these dependencies and use AbstractCloudConfig. You will find that it all works fine. In fact, the reason I added ServiceConnectionFactory as an intermediate object was to ensure that these optional dependencies remain so. Otherwise, cloud().dataSource() instead of current cloud().connectionFactory().dataSource() would have worked and preferred.

from spring-cloud-connectors.

chrylis avatar chrylis commented on May 28, 2024

I did, and I got ClassNotFoundException all over the place that only went away when I added the dependencies in my deployment project when trying to classload AbstractCloudConfig.

from spring-cloud-connectors.

ramnivas avatar ramnivas commented on May 28, 2024

I just pushed https://github.com/cloudfoundry-samples/spring-sendgrid (which does not have dependencies on anything but mail-related artifacts). It worked fine for me.

When you say you got CNFEs, do you mean as warnings or as errors. If it is the latter, can you share a small project that exhibits the issue?

from spring-cloud-connectors.

chrylis avatar chrylis commented on May 28, 2024

Exceptions, not warnings. Not sure whether this is the specific issue at hand, but the JVMS says that linking may be eager or lazy at the discretion of the implementor, and I was running on 1.8. A difference in link eagerness could produce the issue I'm seeing (CFNE on trying to load ServiceConnectorFactory, whose methods refer to the Spring Data factory classes).

from spring-cloud-connectors.

ramnivas avatar ramnivas commented on May 28, 2024

I tried the same sendgrid app with https://github.com/spring-io/java-buildpack buildpack (uses openjdk 1.8.0_11) and it worked fine. Which version of JDK are you using? Can you try to push your app to CF using the https://github.com/spring-io/java-buildpack buildpack?

from spring-cloud-connectors.

chrylis avatar chrylis commented on May 28, 2024

I was running Oracle 1.8.0 (I think revision 5 at that point) locally, and I was getting the CNFE on a subclass of AbstractCloudConfig where the entire method body for the only method was return cloud.cloudConnector().mongoDbFactory();.

from spring-cloud-connectors.

ramnivas avatar ramnivas commented on May 28, 2024

Still no luck. I tried with Oracle JDK, with https://github.com/cloudfoundry-samples/springmvc-hibernate-template, along with localconfig cloud connector. I didn't see any CFNE.

My JRE version info:

java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)

Can you try with the latest version of either/both Oracle and openjdk?

from spring-cloud-connectors.

scottfrederick avatar scottfrederick commented on May 28, 2024

See resolution in #88.

from spring-cloud-connectors.

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.