Skip to content

Reflective illegal access to java.lang.SecurityManager.getClassContext() #663

@MR6996

Description

@MR6996

When running a spring-boot application i have this warning.

Running with --illegal-access=debug i found this:

WARNING: Illegal reflective access by nonapi.io.github.classgraph.classpath.CallStackReader (file:.../.m2/repository/io/github/classgraph/classgraph/4.8.138/classgraph-4.8.138.jar) to method java.lang.SecurityManager.getClassContext()
at nonapi.io.github.classgraph.classpath.CallStackReader.getCallStackViaSecurityManager(CallStackReader.java:119)
at nonapi.io.github.classgraph.classpath.CallStackReader.access$100(CallStackReader.java:44)
at nonapi.io.github.classgraph.classpath.CallStackReader$3.call(CallStackReader.java:178)
at nonapi.io.github.classgraph.classpath.CallStackReader$3.call(CallStackReader.java:175)
at nonapi.io.github.classgraph.reflection.ReflectionUtils$PrivilegedActionInvocationHandler.invoke(ReflectionUtils.java:383)
at com.sun.proxy.$Proxy139.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at nonapi.io.github.classgraph.reflection.ReflectionUtils.doPrivileged(ReflectionUtils.java:396)
at nonapi.io.github.classgraph.classpath.CallStackReader.getClassContext(CallStackReader.java:175)
at nonapi.io.github.classgraph.classpath.ClasspathFinder.(ClasspathFinder.java:163)
at io.github.classgraph.Scanner.(Scanner.java:169)
at io.github.classgraph.ClassGraph.scanAsync(ClassGraph.java:1531)
at io.github.classgraph.ClassGraph.scanAsync(ClassGraph.java:1559)
at io.github.classgraph.ClassGraph.scan(ClassGraph.java:1584)
at io.github.classgraph.ClassGraph.scan(ClassGraph.java:1623)
at io.github.classgraph.ClassGraph.scan(ClassGraph.java:1636)
at org.webjars.WebJarAssetLocator.scanForWebJars(WebJarAssetLocator.java:144)
at org.webjars.WebJarAssetLocator.(WebJarAssetLocator.java:150)
at org.springframework.web.servlet.resource.WebJarsResourceResolver.(WebJarsResourceResolver.java:61)
at org.springframework.web.servlet.config.annotation.ResourceChainRegistration.getResourceResolvers(ResourceChainRegistration.java:114)
at org.springframework.web.servlet.config.annotation.ResourceHandlerRegistration.getRequestHandler(ResourceHandlerRegistration.java:215)
at org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry.getRequestHandler(ResourceHandlerRegistry.java:178)
at org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry.getHandlerMapping(ResourceHandlerRegistry.java:168)
at org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.resourceHandlerMapping(WebMvcConfigurationSupport.java:599)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
Do i have to worry about that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions