Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Static resources don't work in native image anymore #1174

Closed
phejl opened this issue Oct 23, 2021 · 7 comments
Closed

Static resources don't work in native image anymore #1174

phejl opened this issue Oct 23, 2021 · 7 comments
Assignees
Labels
type: regression A bug that is also a regression
Milestone

Comments

@phejl
Copy link

phejl commented Oct 23, 2021

Static resources declared in the sample don't work in native image. Works ok in jar.

@phejl
Copy link
Author

phejl commented Oct 23, 2021

Native image log: Mapped to ResourceHttpRequestHandler [ServletContext [/]]
Jar log: Mapped to ResourceHttpRequestHandler [classpath [static/], classpath [public/], ServletContext [/]]

@sdeleuze
Copy link
Contributor

Hum, I am surprised since:

Could you please provide a repro?

@sdeleuze sdeleuze added the status: waiting-for-feedback We need additional information before we can continue label Oct 24, 2021
@phejl
Copy link
Author

phejl commented Oct 24, 2021

@sdeleuze Let me double check. In meantime can you point me to the pipeline please? I'm wondering whether it runs as a native image in the CI (as I can only see AOT mode in the logs). In AOT mode it is not an issue.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Oct 24, 2021
@phejl
Copy link
Author

phejl commented Oct 24, 2021

I'm sorry for false alarm. I can't reproduce it now. Perhaps I didn't rebuild the whole project while swithcing branches.

@phejl phejl closed this as completed Oct 24, 2021
@phejl
Copy link
Author

phejl commented Oct 24, 2021

@sdeleuze Aha, so unless I'm mistaken this issue appears only in branch for #1175

@sdeleuze
Copy link
Contributor

Can reproduce on 0.10.x branch with WebMVC and WebFlux.

@sdeleuze sdeleuze added type: bug A general bug type: regression A bug that is also a regression and removed status: waiting-for-triage An issue we've not yet triaged or decided on status: feedback-provided Feedback has been provided type: bug A general bug labels Oct 28, 2021
@sdeleuze sdeleuze self-assigned this Oct 28, 2021
@sdeleuze sdeleuze added this to the 0.10.5 milestone Oct 28, 2021
@sdeleuze sdeleuze reopened this Oct 28, 2021
@sdeleuze sdeleuze changed the title webmvc-tomcat sample - static resources don't work in native image Static resources don't work in native image anymore Oct 28, 2021
@sdeleuze
Copy link
Contributor

Ok so this is coming from spring-projects/spring-framework#27538 and seems to be reproducible with GraalVM 21.2.0 not GraalVM 21.3.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: regression A bug that is also a regression
Development

No branches or pull requests

3 participants