Skip to content
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

JDK 11: Illegal reflective access by org.springframework.util.ReflectionUtils [SPR-17480] #22012

Closed
spring-projects-issues opened this issue Nov 8, 2018 · 1 comment
Assignees
Labels
status: invalid An issue that we don't feel is valid

Comments

@spring-projects-issues
Copy link
Collaborator

Grigory Kislin opened SPR-17480 and commented

With --illegal-access=debug:

WARNING: Illegal reflective access by org.springframework.util.ReflectionUtils (file:/C:/java/maven_repo/org/springframework/spring-core/5.1.2.RELEASE/spring-core-5.1.2.RELEASE.jar) to method java.util.HashMap$Node.getKey()WARNING: Illegal reflective access by org.springframework.util.ReflectionUtils (file:/C:/java/maven_repo/org/springframework/spring-core/5.1.2.RELEASE/spring-core-5.1.2.RELEASE.jar) to method java.util.HashMap$Node.getKey() at org.springframework.util.ReflectionUtils.makeAccessible(ReflectionUtils.java:493) at org.springframework.expression.spel.support.ReflectivePropertyAccessor$OptimalPropertyAccessor.read(ReflectivePropertyAccessor.java:691) at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:204) at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104) at org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:51) at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:406) at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:90) at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:111) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:328) at org.thymeleaf.spring5.expression.SPELVariableExpressionEvaluator.evaluate(SPELVariableExpressionEvaluator.java:263) at org.thymeleaf.standard.expression.VariableExpression.executeVariableExpression(VariableExpression.java:166) at org.thymeleaf.standard.expression.SimpleExpression.executeSimple(SimpleExpression.java:66) at org.thymeleaf.standard.expression.Expression.execute(Expression.java:109) at org.thymeleaf.standard.expression.Expression.execute(Expression.java:138) at org.thymeleaf.standard.processor.AbstractStandardExpressionAttributeTagProcessor.doProcess(AbstractStandardExpressionAttributeTagProcessor.java:144) at org.thymeleaf.processor.element.AbstractAttributeTagProcessor.doProcess(AbstractAttributeTagProcessor.java:74) at org.thymeleaf.processor.element.AbstractElementTagProcessor.process(AbstractElementTagProcessor.java:95) at org.thymeleaf.util.ProcessorConfigurationUtils$ElementTagProcessorWrapper.process(ProcessorConfigurationUtils.java:633) at org.thymeleaf.engine.ProcessorTemplateHandler.handleStandaloneElement(ProcessorTemplateHandler.java:918) at org.thymeleaf.engine.StandaloneElementTag.beHandled(StandaloneElementTag.java:228) at org.thymeleaf.engine.Model.process(Model.java:282) at org.thymeleaf.engine.Model.process(Model.java:290) at org.thymeleaf.engine.IteratedGatheringModelProcessable.processIterationModel(IteratedGatheringModelProcessable.java:367) at org.thymeleaf.engine.IteratedGatheringModelProcessable.process(IteratedGatheringModelProcessable.java:221) at org.thymeleaf.engine.ProcessorTemplateHandler.handleCloseElement(ProcessorTemplateHandler.java:1640) at org.thymeleaf.engine.CloseElementTag.beHandled(CloseElementTag.java:139) at org.thymeleaf.engine.Model.process(Model.java:282) at org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1587) at org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) at org.thymeleaf.engine.Model.process(Model.java:282) at org.thymeleaf.engine.Model.process(Model.java:290) at org.thymeleaf.engine.GatheringModelProcessable.process(GatheringModelProcessable.java:78)


Affects: 5.1.2

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

This is SpEL and our core ReflectionUtils being used as a tool here... The real culprit seems to be a Thymeleaf expression which tries to dereference HashMap.Node.key. In any case, this needs to be fixed on Thymeleaf's end or in the application code containing that expression; there is nothing we can about it on the core framework's end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

2 participants