gpt4 book ai didi

java - 加载 jcaptcha servlet 时无法初始化类错误

转载 作者:行者123 更新时间:2023-11-28 23:26:04 25 4
gpt4 key购买 nike

在本地调试我的 webapp 时一切都运行良好,但是当将它部署到服务器(Microsoft Azure,操作系统:Ubuntu 14.04 tomcat7+apache)时,找不到 jcaptcha servlet,它抛出异常为“java.lang .NoClassDefFoundError: 无法初始化类 "

type Exception report

message Servlet execution threw an exception

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
root cause

java.lang.NoClassDefFoundError: Could not initialize class com.tjw.hrmanage.util.jcaptcha.CaptchaServiceSingleton
com.tjw.hrmanage.util.jcaptcha.JcaptchaServlet.doGet(JcaptchaServlet.java:40)
javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.52 (Ubuntu) logs.

最佳答案

这是因为你的app在ubuntu中找不到对应的jar文件。您可以将此类的 jar 文件添加到/lib 并在 eclipse 的“构建路径”中添加对此 jar 的引用,然后再次将您的项目重新部署到 azure。

关于java - 加载 jcaptcha servlet 时无法初始化类错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36983033/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com