重新发布JBoss后JSP上的随机异常

时间:2012-01-07 00:33:49

标签: jsp exception servlets deployment jboss5.x

在使用JBoss 5.1重新发布项目后,我随机获得此异常。我无法理解原因,因为如果我不重新发布我的应用程序正常;当我重新发布它有时(并不总是)给我这个错误:

org.apache.jasper.JasperException: javax.el.ELException: java.lang.IllegalStateException: BaseClassLoader@1c1902d{vfszip:/C:/.../eclipse/jboss-5.1.0.GA/server/default/deploy/MPH-EJB.jar/} classLoader is not connected to a domain (probably undeployed?) for class sun.reflect.MethodAccessorImpl
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:515)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause

javax.el.ELException: java.lang.IllegalStateException: BaseClassLoader@1c1902d{vfszip:/C:/Users/Simone/Desktop/eclipse/jboss-5.1.0.GA/server/default/deploy/MPH-EJB.jar/} classLoader is not connected to a domain (probably undeployed?) for class sun.reflect.MethodAccessorImpl
    javax.el.BeanELResolver.getValue(BeanELResolver.java:70)
    javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
    org.apache.el.parser.AstValue.getValue(AstValue.java:118)
    org.apache.el.parser.AstEqual.getValue(AstEqual.java:37)
    org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
    org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:925)
    org.apache.jsp.Index_jsp._jspx_meth_c_005fwhen_005f1(Index_jsp.java:349)
    org.apache.jsp.Index_jsp._jspx_meth_c_005fchoose_005f1(Index_jsp.java:315)
    org.apache.jsp.Index_jsp._jspx_meth_c_005fotherwise_005f0(Index_jsp.java:258)
    org.apache.jsp.Index_jsp._jspx_meth_c_005fchoose_005f0(Index_jsp.java:189)
    org.apache.jsp.Index_jsp._jspService(Index_jsp.java:99)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause

java.lang.IllegalStateException: BaseClassLoader@1c1902d{vfszip:/C:/.../eclipse/jboss-5.1.0.GA/server/default/deploy/MPH-EJB.jar/} classLoader is not connected to a domain (probably undeployed?) for class sun.reflect.MethodAccessorImpl
    org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:793)
    org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)
    java.lang.ClassLoader.loadClass(Unknown Source)
    sun.misc.Unsafe.defineClass(Native Method)
    sun.reflect.ClassDefiner.defineClass(Unknown Source)
    sun.reflect.MethodAccessorGenerator$1.run(Unknown Source)
    java.security.AccessController.doPrivileged(Native Method)
    sun.reflect.MethodAccessorGenerator.generate(Unknown Source)
    sun.reflect.MethodAccessorGenerator.generateMethod(Unknown Source)
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    java.lang.reflect.Method.invoke(Unknown Source)
    javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
    javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
    org.apache.el.parser.AstValue.getValue(AstValue.java:118)
    org.apache.el.parser.AstEqual.getValue(AstEqual.java:37)
    org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
    org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:925)
    org.apache.jsp.Index_jsp._jspx_meth_c_005fwhen_005f1(Index_jsp.java:349)
    org.apache.jsp.Index_jsp._jspx_meth_c_005fchoose_005f1(Index_jsp.java:315)
    org.apache.jsp.Index_jsp._jspx_meth_c_005fotherwise_005f0(Index_jsp.java:258)
    org.apache.jsp.Index_jsp._jspx_meth_c_005fchoose_005f0(Index_jsp.java:189)
    org.apache.jsp.Index_jsp._jspService(Index_jsp.java:99)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

这是Index.jps:

<%@ page import="supporto.LoginToken"%>
<%@ page import="supporto.TipoAccesso"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" href="AspettoPagine.css" type="text/css" />
<title>MPH - Index</title>
</head>
<body>
    <c:if test="${! empty param}">
        <jsp:forward page="/Errori/Errore404.jsp"/>
    </c:if>
    <c:set var="token" value="${sessionScope.LoginToken}"/>
    <c:choose>
        <c:when test="${empty token}">
            <jsp:forward page="/Homes/HomeNonLoggato.jsp"/>
        </c:when>
        <c:otherwise>
            <c:import url="accesso?to=home"/>
            <c:choose>
                <c:when test="${token.tipoAccesso eq 'STUDENTE'}">
                    <jsp:forward page="/Homes/HomeStudente.jsp"/>
                </c:when>
                <c:when test="${token.tipoAccesso eq 'DOCENTE'}">
                    <jsp:forward page="/Homes/HomeDocente.jsp"/>
                </c:when>
                <c:when test="${token.tipoAccesso eq 'ADMIN'}">
                    <jsp:forward page="/Homes/HomeAdmin.jsp"/>
                </c:when>
            </c:choose>
        </c:otherwise>
    </c:choose>
</body>
</html>

<c:import url="accesso?to=home"/>调用一个servlet,它根据LoginToken对象调用不同的会话bean来准备我需要显示主页的对象。然后操作返回到Index.jps,后者转发到右侧主页。

如果有必要,我也会发布剩下的代码(不要现在发布,因为我认为现在已经很久了。)

0 个答案:

没有答案