调用ServletContext时的org.zkoss.less.ZKLessServlet.initLessResource中的java.lang.NullPointerException#getResourcePaths()

时间:2014-02-18 08:24:29

标签: servlets zk

我正在使用ZK7,ZKLess。以下是我的web.xml。

<?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebAppId" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
        xsi="http://www.w3.org/2001/XMLSchema-instance"
        schemalocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
      <display-name>SAMPLE</display-name>       
        <servlet>
            <servlet-name>zkLess</servlet-name>
            <servlet-class>org.zkoss.less.ZKLessServlet</servlet-class>
            <init-param>
                <param-name>org.zkoss.less.LessResource</param-name>
                <param-value>/css/less/*</param-value><!-- specify to the folder that contains *.less -->
            </init-param>
            <init-param>
                <param-name>org.zkoss.less.OutputFormat</param-name>
                <param-value>.css.dsp</param-value><!-- specify output file suffix, default .css.dsp -->
            </init-param>
            <init-param>
                <param-name>org.zkoss.less.CompressOutput</param-name>
                <param-value>true</param-value><!-- compress output, default true -->
            </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>zkLess</servlet-name>
            <url-pattern>*.less</url-pattern><!-- specify to folder that contains *.less -->
        </servlet-mapping>
       <distributable/>
     </web-app>

我在启动应用程序NullPointerException时调用org.zkoss.less.ZKLessServlet.initLessResourceServletContext.getResourcePaths(LessResourcePath) LessResourcePath,其中SEVERE: Servlet /IPSMWeb threw load() exception java.lang.NullPointerException at org.zkoss.less.ZKLessServlet.initLessResource(ZKLessServlet.java:121) at org.zkoss.less.ZKLessServlet.init(ZKLessServlet.java:90) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1190) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1103) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1010) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4957) at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5284) at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5279) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) 是包含较少文件的路径。 如何纠正这个问题?

错误的完整堆栈跟踪是:

{{1}}

0 个答案:

没有答案