Skip to content

Servlet class loaded with the wrong class loader #506

Closed
@Artur-

Description

@Artur-

Serverless Java Container version: 1.9.1

Implementations: Spring Boot 2

Framework version: SpringBoot 2.7.5

Frontend service: HTTP API

Deployment method: SAM

Scenario

A servlet class should be loaded by the application class loader. The current approach here loads it with the system class loader. This causes resource lookups inside a servlet to fail as the system class loader does not know anything about the resources on the application classpath.

Expected behavior

The system class loader is not used to load the servlet.

Actual behavior

The system class loader is used, is this what AwsServletContext.getClassLoader causes? Not sure why it would use the system class loader there. Can it just be changed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions