Skip to content

Jar files added after build time are not loaded #19973

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

Closed
scottfrederick opened this issue Jan 28, 2020 · 3 comments
Closed

Jar files added after build time are not loaded #19973

scottfrederick opened this issue Jan 28, 2020 · 3 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@scottfrederick
Copy link
Contributor

scottfrederick commented Jan 28, 2020

The Cloud Foundry Java Buildpack adds jar files to a container while staging the application for running on CF. With Boot 2.3.0, these added jar files are not loaded when the application is started using the Spring Boot launcher, likely because they are not in the classpath index file that is generated with the fat jar that is typically exploded and sent to CF.

This causes Java Buildpack features like Spring Auto Reconfiguration, Client Certificate Mapper, Container Security Provider, MariaDB JDBC, and PostgreSQL JDBC to not work with Boot 2.3.0.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 28, 2020
@scottfrederick scottfrederick added for: team-attention An issue we'd like other members of the team to review and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 28, 2020
@scottfrederick scottfrederick added this to the 2.3.x milestone Jan 28, 2020
@wilkinsona
Copy link
Member

wilkinsona commented Jan 28, 2020

I guess this comment fell through the cracks. We could:

  1. Add files in BOOT-INF/lib that aren't in the index to the start of the classpath
  2. Add files in BOOT-INF/lib that aren't in the index to the end of the classpath
  3. Require the buildpack to update the index and put the files where it wants them to be

We could do 1 or 2 today and the buildpack could do 3 at some point in the future. 1 or 2 would then become a no-op as the index would be complete.

@scottfrederick
Copy link
Contributor Author

  1. Require the buildpack to update the index and put the files where it wants them to be

This would mean that older buildpacks without this change could not support Boot 2.3. That could be a problem for platform operators.

@wilkinsona
Copy link
Member

Yep. Hence the thought that we could do a mix of 1 or 2 and 3.

@wilkinsona wilkinsona added type: bug A general bug and removed for: team-attention An issue we'd like other members of the team to review labels Jan 29, 2020
@mbhave mbhave self-assigned this Jan 29, 2020
@mbhave mbhave closed this as completed in bceed13 Jan 30, 2020
@mbhave mbhave modified the milestones: 2.3.x, 2.3.0.M2 Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants