NutzCN Logo
问答 fileter报错。配置文件及错误信息如下。
发布于 1795天前 作者 Mr.Hu 1761 次浏览 复制 上一个帖子 下一个帖子
标签:
<?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" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>preprocessing</display-name>
  <filter>
    <filter-name>DruidWebStatFilter</filter-name>
    <filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>
    <init-param>
      <param-name>exclusions</param-name>
      <param-value>*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*,/rs/*</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>DruidWebStatFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <filter>
    <filter-name>nutz</filter-name>
    <filter-class>org.nutz.mvc.NutFilter</filter-class>
    <init-param>
      <param-name>modules</param-name>
      <param-value>com.bsdkj.hdcyfwpt.preprocessing.modules.MainModule</param-value>
    </init-param>
    <init-param>
      <param-name>ignore</param-name>
      <param-value>^(.+[.])(jsp|png|gif|jpg|js|css|jspx|jpeg|html|mp3|mp4)$</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>nutz</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <servlet>
    <servlet-name>DruidStatView</servlet-name>
    <servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
    <init-param>
      <param-name>allow</param-name>
      <param-value>127.0.0.1</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>DruidStatView</servlet-name>
    <url-pattern>/druid/*</url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>index</welcome-file>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <error-page>
    <error-code>403</error-code>
    <location>/WEB-INF/error/403.html</location>
  </error-page>
  <error-page>
    <error-code>404</error-code>
    <location>/WEB-INF/error/404.html</location>
  </error-page>
  <error-page>
    <error-code>500</error-code>
    <location>/WEB-INF/error/500.html</location>
  </error-page>
</web-app>
十二月 24, 2019 12:28:21 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:preprocessing' did not find a matching property.
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/8.5.12
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Mar 8 2017 17:41:47 UTC
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         8.5.12.0
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 10
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            10.0
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             C:\Program Files\Java\jre1.8.0_121
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_121-b13
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         E:\WorkSpace\test\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         D:\Tomcat\apache-tomcat-8.5.12-windows-x64\apache-tomcat-8.5.12
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=E:\WorkSpace\test\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\Tomcat\apache-tomcat-8.5.12-windows-x64\apache-tomcat-8.5.12
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=E:\WorkSpace\test\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\Tomcat\apache-tomcat-8.5.12-windows-x64\apache-tomcat-8.5.12\endorsed
十二月 24, 2019 12:28:21 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
十二月 24, 2019 12:28:21 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.8.0_121\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_121/bin/server;C:/Program Files/Java/jre1.8.0_121/bin;C:/Program Files/Java/jre1.8.0_121/lib/amd64;E:\WinApp\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\ProgramData\Oracle\Java\javapath;E:\WinApp\oraclexe\app\oracle\product\11.2.0\server\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;E:\WinApp\MySql\mysql-5.7.11-winx64\bin;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\Program Files (x86)\Bitvise SSH Client;C:\Program Files\MySQL\MySQL Utilities 1.6\;C:\Program Files\Java\jdk1.8.0_25\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\WINDOWS\system32;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;D:\Program Files (x86)\Bitvise SSH Client;D:\Program Files (x86)\Microsoft VS Code\bin;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;D:\Program Files\apache-maven-3.6.3\bin;C:\Users\abc\AppData\Local\Microsoft\WindowsApps;;D:\Program Files\Fiddler;E:\WinApp\eclipse4.6;;.
十二月 24, 2019 12:28:22 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
十二月 24, 2019 12:28:22 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
十二月 24, 2019 12:28:22 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
十二月 24, 2019 12:28:22 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
十二月 24, 2019 12:28:22 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1756 ms
十二月 24, 2019 12:28:22 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
十二月 24, 2019 12:28:22 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.5.12
十二月 24, 2019 12:28:23 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter DruidWebStatFilter
java.lang.ClassNotFoundException: com.alibaba.druid.support.http.WebStatFilter
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
	at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:511)
	at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:492)
	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4599)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5242)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

十二月 24, 2019 12:28:23 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
java.lang.ClassNotFoundException: org.nutz.mvc.NutFilter
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
	at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:511)
	at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:492)
	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4599)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5242)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

十二月 24, 2019 12:28:23 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more Filters failed to start. Full details will be found in the appropriate container log file
十二月 24, 2019 12:28:23 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/preprocessing] startup failed due to previous errors
十二月 24, 2019 12:28:23 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler [http-nio-8080]
十二月 24, 2019 12:28:23 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler [ajp-nio-8009]
十二月 24, 2019 12:28:23 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 836 ms

版本信息:
nutz-1.r.56.r3
druid-1.0.19
未找到的类在maven仓中都有。头疼。

5 回复

同样的配置,在别的项目中都能用。这个不行。我应该往哪方面找问题得解决办法。

pom.xml贴一下看看

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.bsdkj.hdcyfwpt</groupId>
    <artifactId>preprocessing</artifactId>
    <packaging>war</packaging>
    <version>2.4.25</version>
    <name>DataPreprocessing</name>
    <url></url>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <developers>
        <developer>
            <id>cssun</id>
            <name>CSSUN</name>
            <email></email>
            <url></url>
        </developer>
    </developers>
    <repositories>
    </repositories>
    <dependencies>
        <dependency>
	        <groupId>javax.servlet</groupId>
	        <artifactId>servlet-api</artifactId>
	        <version>2.5</version>
	        <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutz</artifactId>
            <version>1.r.56.r3</version>
        </dependency>
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutz-integration-quartz</artifactId>
            <version>1.r.56</version>
        </dependency>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
            <version>2.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz-jobs</artifactId>
            <version>2.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.12</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.12</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.0.19</version>
            <exclusions>
                <exclusion>
                    <groupId>com.alibaba</groupId>
                    <artifactId>jconsole</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.alibaba</groupId>
                    <artifactId>tools</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.4</version>
        </dependency>
        <dependency>
        	<groupId>oracle</groupId>
        	<artifactId>oracle6</artifactId>
        	<version>11.2.0.4</version>
        </dependency>
    </dependencies>
    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <outputDirectory>classes</outputDirectory>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>**/*</exclude>
                </excludes>
                <filtering>true</filtering>
            </resource>
        </resources>
        <finalName>preprocessing</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <phase>prepare-package</phase>
                        <configuration>
                            <excludes>
                                <exclude>src/main/resources/**/*</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <archiveClasses>true</archiveClasses>
                    <packagingExcludes>WEB-INF/web.xml</packagingExcludes>
                    <warSourceExcludes>WEB-INF/classes/cn/**</warSourceExcludes>
                    <webResources>
                        <resource>
                            <directory>src/main/resources</directory>
                            <targetPath>WEB-INF/classes</targetPath>
                            <includes>
                                <include>**</include>
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

可能是我maven的配置出问题了。我再看看。感觉项目没有真实的加载到maven仓中的jar包。太奇怪了。

添加回复
请先登陆
回到顶部