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

Troubleshooting with ImageIO plugin registry issue (NoClassDefFoundErrors) without web.xml file #868

Closed
bms82 opened this issue Nov 22, 2023 · 1 comment

Comments

@bms82
Copy link

bms82 commented Nov 22, 2023

Tag the question with javax-imageio and/or twelvemonkeys and we'll find them there.

I wanted to add that Spring Framework users who are not willing to use web.xml file, there is an alternative.
I added the following code for ServletInitializer class (which extends SpringBootServletInitializer).

import com.twelvemonkeys.servlet.image.IIOProviderContextListener;
@Override public void onStartup(ServletContext servletContext) throws ServletException { servletContext.addListener(IIOProviderContextListener.class); super.onStartup(servletContext); }

I hope this helps.

@haraldk
Copy link
Owner

haraldk commented Nov 23, 2023

Hi @bms82 !

Thank you for the information. I believe this is the programmatically equivalent in Spring to adding the class to the web.xml. Do you think it should be added to the readme? If so, would you create a PR for that? Otherwise it might be better to ask a question on StackOverflow, as I'm not sure if people will find this issue once I have closed it.

Closing for now, as there is no action to be taken.

@haraldk haraldk closed this as completed Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants