3
  1. I have pushed the scdf server jar and skipper server in PCF, now I want to change the existing DB i.e. H2 to MySQL, For this I have created the MySQL service from marketplace , but when I tried to bind the MySQL service to skipper server app I am getting below exception
java.lang.IllegalStateException: Exiting the application 
since the Spring Cloud Connector library has been detected 
on the classpath. 
Please remove this dependency from your project 
and set the environment variable 
JBP_CONFIG_SPRING_AUTO_RECONFIGURATION '{enabled: false}' 
in the Cloud Foundry manifest.
  1. I tried to apply JBP_CONFIG_SPRING_AUTO_RECONFIGURATION '{enabled: false}' to skipper server environment variable but I still gets the same exception.

  2. As per the exception I need to remove `Spring cloud connector libraryv from classpath, but I have used to push skkiper server jar to pcf, so how can I remove this dependency(do I need to take skipper server code and manually remove the dependency ? If yes then what is the dependency I need to exclude in maven ?)

skipper version used : 2.1.0

DomQ
  • 4,184
  • 38
  • 37
Pravin
  • 45
  • 1
  • 4

1 Answers1

3

Starting with v2.0, SCDF and Skipper switched to the Java-CFEnv project to autoconfigure datasource and other services automatically in CF.

In this foundation, specifically on CF, you'd have to explicitly override 2 extra properties, so that we can successfully negate the Java-Buildpack and its Auto-reconfiguration conflicts at runtime. And, those properties are:

SPRING_PROFILES_ACTIVE: cloud
JBP_CONFIG_SPRING_AUTO_RECONFIGURATION: '{enabled: false}'

They are both included in the sample manifest files in the SCDF for CF getting-started guide.

Also, if you are using SCDF for PCF tile, you don't have to configure all of these properties. They are automatically provisioned for you when you create a service-instance for SCDF in the Org/Space.

Sabby Anandan
  • 5,636
  • 2
  • 12
  • 21
  • Thanks Sabby. Our organisation does provide a SCDF service which comes with inbuild messaging and datastore. But when I used that service I couldn't able to apply properties such as enableRandomAppNamePrefix. Most of the properties are getting applied at skipper server level, but whenever I use marketplace scdf service I don't get access to skipper server env properties and if I apply those properties at scdf service configure instance then don't get applied. Is something I am doing wrong here for marketplace scdf service? – Pravin Aug 16 '19 at 03:13
  • I bumped on the same issue when trying to deploy on PWS an App using SCS and MySQL. Interestingly enough,I can use each of them in separate but not both at the same time. I fixed the problem following your guidance. There seems to be a conflict between them when using Java-Buildpack's auto-reconfiguration. Thanks a lot @Pravin and Sabby. – dbaltor Oct 21 '20 at 18:36