1
최대 절전 모드로 JSF 웹 애플리케이션을 개발 중입니다. 메인 클래스로 테스트했는데 데이터베이스에 삽입 할 수는 있지만 Webapp를 Glassfish에 배치 할 수는 없습니다. HTTP 500 오류로 인해 항상 오류가 발생합니다.java.lang.NoClassDefFoundError : net/sf/hibernate/HibernateException
faces-config
:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>
<managed-bean>
<managed-bean-name>timesheetBean</managed-bean-name>
<managed-bean-class>hibernate.timeBean.TimesheetBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/EditTimesheet.jsp</from-view-id>
</navigation-rule>
</faces-config>
web.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>test</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
EditTimesheet.jsp
:
<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSF 'EditDepartement.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<f:view>
<h:form>
<h:inputHidden id="id" value="#{timesheetBean.currentTimesheet.id}" />
<h:panelGrid columns="2" border="1">
<h:inputText value="#{timesheetBean.currentTimesheet.action}">
</h:inputText>
<h:outputText value="heure:" />
<h:inputText value="#{timesheetBean.currentTimesheet.heure}">
</h:inputText>
<h:outputText value="date:" />
<h:inputText value="#{timesheetBean.currentTimesheet.date}">
</h:inputText>
</h:panelGrid>
<h:commandButton value="Save" action="listeDepartements" actionListener="#{timesheetBean.saveTimesheet}" />
<h:commandButton value="Annuler" action="listeTimesheet"/>
</h:form>
</f:view>
</body>
</html>
예외에는 다음과 같습니다
여기 내 코드입니다어떻게 이런 일이 발생하며 어떻게 해결할 수 있습니까?
이것은 예외입니다. .JasperException : /test.jsp(5,57) PWC6188 : 절대 URI : http://richfaces.org/rich는 web.xml 또는이 함께 배포 된 jar 파일에서 확인할 수 없습니다. 응용 프로그램 – user726991
최대 절전 모드 예외를 해결 한 후이 새로운 문제입니까? 그렇다면 (이 대답은 Hibernate 예외를 해결하는 데 도움이되었다.)이 예외를 검색 할 미래의 사람들이 찾을 수 있도록이 응답에 허용 된 것으로 표시해 주실 수 있습니까? 그런 다음 새 질문을 새로운 질문에 게시 할 수 있습니다. 즉 사이트에서 특정 문제와 제목 관련성을 제공합니다. –