我们正在使用JBoss EAP 6;一切正常,直到生产环境为止。但是在生产中进行后期部署时,出现以下错误:
java.lang.NoClassDefFoundError: Could not initialize class javax.imageio.ImageIO
该错误发生在我们创建验证码的servlet之一中。这是发生此错误的行:
ImageIO.write(bufferedImage, "png", baos);
这是Error的堆栈跟踪:
Server:server-three] Caused by: java.lang.NoClassDefFoundError: Could not initialize class javax.imageio.ImageIO [Server:server-three] at org.fwcms.tc.servlet.Captcha.doGet(Captcha.java:150) [classes:] [Server:server-three] at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec.jar:1.0.2.Final-redhat-1] [Server:server-three] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec.jar:1.0.2.Final-redhat-1] [Server:server-three] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb.jar:7.2.2.Final-redhat-1] [Server:server-three] ... 36 more
这在任何其他环境中都不会发生。我们正在部署该应用程序。解决这个问题的任何建议/建议都会对我有很大帮助。
先感谢您。
问候,Manjunath