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

java.lang.IllegalAccessError: tried to access class org.springframework.web.servlet.tags.form.ValueFormatter from class org.springframework.web.servlet.tags.form.ValueFormatterWrapper #211

Open
alextadams88 opened this issue Mar 17, 2019 · 0 comments

Comments

@alextadams88
Copy link

Using: Spring version 4.3.20.RELEASE
Thymeleaf version 3.0.10.RELEASE

Having an issue where, in my thymeleaf template, whenever spring/thymeleaf attemps to process any th:field tags, the rendering fails and the exception java.lang.IllegalAccessError: tried to access class org.springframework.web.servlet.tags.form.ValueFormatter from class org.springframework.web.servlet.tags.form.ValueFormatterWrapper appears in the logs.

I know it is not an issue with my template and format, because if I use th:text instead of th:field, the page renders just fine. I'm not sure where else to turn - the stack trace is full of Spring and Thymeleaf code, and contains very little of my application code. And even if my application is doing something wrong, the error message does not indicate this, indicating some sort of error handling issue inside of thymeleaf/spring that is not handling my error case properly.

Stack trace excerpt:

Caused by: java.lang.IllegalAccessError: tried to access class org.springframework.web.servlet.tags.form.ValueFormatter from class org.springframework.web.servlet.tags.form.ValueFormatterWrapper at org.springframework.web.servlet.tags.form.ValueFormatterWrapper.getDisplayString(ValueFormatterWrapper.java:40) at org.thymeleaf.spring4.processor.SpringInputGeneralFieldTagProcessor.doProcess(SpringInputGeneralFieldTagProcessor.java:110) at org.thymeleaf.spring4.processor.AbstractSpringFieldTagProcessor.doProcess(AbstractSpringFieldTagProcessor.java:179) 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.TemplateModel.process(TemplateModel.java:136) at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:661) at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098) at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072) at org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView.java:360) at org.thymeleaf.spring4.view.ThymeleafView.render(ThymeleafView.java:192) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1286) at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1041) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:984) ... 49 more

Full stack trace: https://pastebin.com/07dbNv6p

Minimum Thymeleaf Template which I have used to reproduce the issue: https://pastebin.com/HqzRr1EJ

Related Spring code: https://pastebin.com/54EvUbN4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant