简体   繁体   English

部署到JBoss EAP6服务器时,Spring MVC文件上传出现问题

[英]Issue with Spring MVC file upload when deployed to JBoss EAP6 server

I have a Spring MVC application that works locally, but when deployed to JBoss EAP6 server, the file upload fails to read the MultipartFile that is being passed in. I am seeing this exception: 我有一个在本地工作的Spring MVC应用程序,但是当部署到JBoss EAP6服务器时,文件上传无法读取正在传递的MultipartFile。我看到此异常:

org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is sun.misc.ServiceConfigurationError: javax.imageio.spi.ImageOutputStreamSpi: Provider com.sun.media.imageioimpl.stream.ChannelImageOutputStreamSpi not found
    org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1259)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
    org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

This is where the application is failing once deployed to the server: 一旦将应用程序部署到服务器,这就是失败的地方:

BufferedImage originalImage = ImageIO.read(multipartFile.getInputStream());

If someone has experienced this, please point me in the right direction. 如果有人遇到过这种情况,请指出正确的方向。 What am I missing? 我想念什么? Thanks. 谢谢。

The problem was that the JRE version on the server was 1.6.0_25. 问题是服务器上的JRE版本是1.6.0_25。 Changing the JRE to a later version solved this issue. 将JRE更改为更高版本可以解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM