大家看看这是什么错误,十万火急 Exception report

mingwang4193 2008-05-27 09:31:02
报错如下:
type Exception report

message

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

exception

javax.servlet.ServletException: Servlet execution threw an exception
com.stuman.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:62)


root cause

java.lang.NoClassDefFoundError: org/hibernate/HibernateException
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
java.lang.Class.getConstructor0(Class.java:2640)
java.lang.Class.newInstance0(Class.java:321)
java.lang.Class.newInstance(Class.java:303)
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:326)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:268)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.stuman.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:62)


note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.



SetCharacterEncodingFilter是一个转化字符编码的
这个文件是正确的,在其他工程中试过
Web.xml中这样配置
<filter>
<filter-name>SetCharsetEncodingFilter</filter-name>
<filter-class>com.stuman.util.SetCharacterEncodingFilter </filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
SetCharacterEncodingFilter文件内容
package com.stuman.util;

import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

public class SetCharacterEncodingFilter implements Filter {

/**
* The default character encoding to set for requests that pass through
* this filter.
*/
protected String encoding = null;

/**
* The filter configuration object we are associated with. If this value
* is null, this filter instance is not currently configured.
*/
protected FilterConfig filterConfig = null;

/**
* Should a character encoding specified by the client be ignored?
*/
protected boolean ignore = true;

/**
* Take this filter out of service.
*/
public void destroy() {

this.encoding = null;
this.filterConfig = null;

}

/**
* Select and set (if specified) the character encoding to be used to
* interpret request parameters for this request.
*
* @param request The servlet request we are processing
* @param result The servlet response we are creating
* @param chain The filter chain we are processing
*
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
*/
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {

// Conditionally select and set the character encoding to be used
if (ignore || (request.getCharacterEncoding() == null)) {
String encoding = selectEncoding(request);
if (encoding != null)
request.setCharacterEncoding(encoding);
}

// Pass control on to the next filter
chain.doFilter(request, response);

}

/**
* Place this filter into service.
*
* @param filterConfig The filter configuration object
*/
public void init(FilterConfig filterConfig) throws ServletException {

this.filterConfig = filterConfig;
this.encoding = filterConfig.getInitParameter("encoding");
String value = filterConfig.getInitParameter("ignore");
if (value == null)
this.ignore = true;
else if (value.equalsIgnoreCase("true"))
this.ignore = true;
else if (value.equalsIgnoreCase("yes"))
this.ignore = true;
else
this.ignore = false;

}

/**
* Select an appropriate character encoding to be used, based on the
* characteristics of the current request and/or filter initialization
* parameters. If no character encoding should be set, return
* <code>null</code>.
* <p>
* The default implementation unconditionally returns the value configured
* by the <strong>encoding</strong> initialization parameter for this
* filter.
*
* @param request The servlet request we are processing
*/
protected String selectEncoding(ServletRequest request) {

return (this.encoding);

}

}
这个错误是怎么回事,很急,请大家帮帮忙
...全文
426 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
kekeemx 2008-05-29
  • 打赏
  • 举报
回复
类路径中没有包含到用到的JAR包
检查一下lib目录下是否包含了所有需要的包
zhengxin070513 2008-05-29
  • 打赏
  • 举报
回复
你在Hibernate官网上面下hibernate的相关包呀,不然的话肯定提示找不到类呀
小官同志 2008-05-29
  • 打赏
  • 举报
回复
java.lang.NoClassDefFoundError: org/hibernate/HibernateException
说明这个包没找到。引入一下就ok
laorer 2008-05-27
  • 打赏
  • 举报
回复
java.lang.NoClassDefFoundError: org/hibernate/HibernateException


你把Hibernate的相关包放到web-inf/lib目录下了不?
zhj92lxs 2008-05-27
  • 打赏
  • 举报
回复

java.lang.NoClassDefFoundError: org/hibernate/HibernateException 类没有找到


导包了吗

打开tomcat找到logs文件夹,看看错误日志
内容概要:本文介绍了基于 NVMe 的 ExFAT IP 交付项目案例,采用 KU060 FPGA 芯片实现高可靠性的双通道数据存储方案。系统通过主备两路独立的 DDR4 和 NVMe 硬盘(如三星 970 EVO PLUS)同步存储业务数据,确保数据一致性与系统稳定性。KU060 内部集成了用户逻辑与 ExFAT 文件系统 IP,通过 M 个高速 FIFO 和 N 个低速 FIFO 实现多通道并发写入,每个 FIFO 对应一个独立 .dat 文件,单文件达 4GB 后自动续接下一文件。数据写入速率≥2.5GB/s,文件格式兼容 Windows,支持上电自动生成文件并通过 PC 直接读取。IP 还支持指令控制、状态反馈(如硬盘连接、温度、剩余空间等),已实际交付并运行三年。; 适合人群:从事 FPGA 开发、嵌入式存储系统设计或文件系统实现的工程师,具备一定硬件逻辑和存储协议基础的研发人员; 使用场景及目标:①实现高速、高可靠的实时数据记录系统;②开发兼容 Windows 的可插拔存储设备;③研究 ExFAT 文件系统在 FPGA 上的纯逻辑实现方法;④构建主备冗余存储架构以提升系统可靠性; 阅读建议:建议结合 Demo 工程和 VIO 控制实例进行实践,重点关注 FIFO 与文件映射机制、ExFAT 写入流程及状态监控接口的设计,调试时可通过 PC 拷贝验证数据完整性。

67,535

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧