0

我发现以前在这里问过同样的问题,但我没有找到合适的答案。我正在使用 PrimeFaces 3.5 作为 JSF 组件套件在 JSF2.0 中设计我的网站。以下是自动部署过程中出现的错误 -

在此处输入图像描述

以下是重新启动时出现的错误GlassFish Server 3.1.2(由于自动部署不起作用,所以我想重新启动它) -

在此处输入图像描述

以下是GlassFish Server 3.1.2Eclipse 控制台中显示的错误 -

SEVERE: service exception
java.lang.NullPointerExceptionnull  at java.lang.String.replace(String.java:2219)null   at com.sun.enterprise.v3.common.PropsFileActionReporter.setMessage(PropsFileActionReporter.java:67)null at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:219)null  at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)null   at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)null   at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)null at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)null    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)null at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)null at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)null  at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)null   at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)null    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)null  at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)null   at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)null    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)null    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)null    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)null at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)null   at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)null  at java.lang.Thread.run(Thread.java:679)null

我的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_3_0.xsd"
    id="portal" version="3.0">
    <display-name>Portal</display-name>


    <!-- Change to "Production" when you are ready to deploy -->
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <context-param>
        <param-name>primefaces.THEME</param-name>
        <param-value>cupertino</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
        <param-value>true</param-value>
    </context-param>


    <!-- Primefaces file upload -->
    <!-- thresholdSize specifies the maximum file size in bytes to keep uploaded 
        files in memory. If it exceeds this limit, it’ll be temporarily written to 
        disk. -->
    <!-- uploadDirectory is the folder where to keep temporary files that exceed 
        thresholdSize. -->
    <filter>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
        <init-param>
            <param-name>thresholdSize</param-name>
            <param-value>51200</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    <context-param>
        <param-name>uploadDirectory</param-name>
        <param-value>/opt/upload/</param-value>
    </context-param>


    <welcome-file-list>
        <welcome-file>index.xhtml</welcome-file>
    </welcome-file-list>


    <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>*.xhtml</url-pattern>
    </servlet-mapping>


    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>

</web-app>

我正在Eclipse Indigo使用Ubuntu 10.04.4 LTS.

4

0 回答 0