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

Docker native image fails at runtime with missing ProxyCachingConfiguration class #451

Closed

Description

@iompo

Hi all,
I was able to build a native image for docker with spring native. However, when I try to start a container from it, I get the error:

2021-01-25 15:34:50.918 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [it.app.test.dataset.DatasetSpringApplication]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/cache/annotation/ProxyCachingConfiguration.class] cannot be opened because it does not exist
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:610) ~[na:na]
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:311) ~[na:na]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:250) ~[na:na]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:207) ~[na:na]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:175) ~[na:na]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:336)

I'm using spring boot 2.4.1, spring-graalvm-native 0.8.5, and java 11.

The application runs fine If I try to execute directly the generated jar file.
I also tried to check what's in it (the generated jar), the missing class is defined inside the dependency ./BOOT-INF/lib/spring-context-5.3.2.jar

Am I doing something wrong?

Marco.

Activity

  1. added
    status: waiting-for-triage
    type: compatibility
    on Jan 28, 2021
  2. sdeleuze commented on Jan 28, 2021

    @sdeleuze
    Contributor

    It sounds like the hints need to be refined for caching, could you please provide a repro project?

  3. sdeleuze commented on Feb 1, 2021

    @sdeleuze
    Contributor

    Closing it due to lack of feedback. Please comment with a link to a repro.

  4. removed
    status: waiting-for-triage
    on Feb 1, 2021
  5. iompo commented on Feb 1, 2021

    @iompo
    Author

    Hi,
    here a repo that can be used to reproduce the problem. Sorry, but the original code was part of a private project, so it took me a bit to extract only what was needed to reproduce the issue.

    Marco.

  6. self-assigned this
    on Feb 4, 2021
  7. added this to the 0.9.0 milestone on Feb 4, 2021
  8. sdeleuze commented on Feb 4, 2021

    @sdeleuze
    Contributor

    Fixed but will require more work for proper caching support, see #465.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: compatibility

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions