NutzCN Logo
问答 新建maven项目 启动报错 找不到类 怎么回事 明明有的啊
发布于 2626天前 作者 sofeik 4000 次浏览 复制 上一个帖子 下一个帖子
标签:

九月 14, 2017 11:26:33 上午 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:1332)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166)

9 回复

nutz没加到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"
4.0.0
com.dhcgs
dhcgs
war
1.0-SNAPSHOT

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>



org.nutz
nutz
1.r.62


mysql
mysql-connector-java
5.1.40


javax.servlet
javax.servlet-api
3.1.0
provided


com.alibaba
druid
1.0.27


jconsole
com.alibaba


tools
com.alibaba




org.nutz
nutzwx
1.r.62-SNAPSHOT


org.slf4j
slf4j-api
1.7.13


org.slf4j
slf4j-log4j12
1.7.9


log4j
log4j
1.2.17


junit
junit
4.12
test




dev

dev


true



prod

prod







maven-compiler-plugin
3.3

1.8
1.8

-parameters

false




src/main/resources/profiles/${env}.properties



${project.build.directory}/classes
src/main/resources
true

**/*.xml
**/*.properties
**/*.js






nutz
https://jfrog.nutz.cn/artifactory/jcenter


nutz-snapshots
https://jfrog.nutz.cn/artifactory/snapshots

true
always


false



帮我看看 兽总

用 "插入代码" 按钮重新贴一次

<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.dhcgs</groupId>
<artifactId>dhcgs</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
    <dependency>
        <groupId>org.nutz</groupId>
        <artifactId>nutz</artifactId>
        <version>1.r.62</version>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.40</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>druid</artifactId>
        <version>1.0.27</version>
        <exclusions>
            <exclusion>
                <artifactId>jconsole</artifactId>
                <groupId>com.alibaba</groupId>
            </exclusion>
            <exclusion>
                <artifactId>tools</artifactId>
                <groupId>com.alibaba</groupId>
            </exclusion>
        </exclusions>        
    </dependency>
	<dependency>  
		<groupId>org.nutz</groupId>
		<artifactId>nutzwx</artifactId>
		<version>1.r.62-SNAPSHOT</version>
	</dependency>	
	<dependency>					
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-api</artifactId>
		<version>1.7.13</version>
	</dependency>
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-log4j12</artifactId>
		<version>1.7.9</version>
	</dependency>	
	<dependency>
		<groupId>log4j</groupId>
		<artifactId>log4j</artifactId>
		<version>1.2.17</version>
	</dependency>  	    
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>
</dependencies>
<profiles>
    <profile>
        <id>dev</id>
        <properties>
            <env>dev</env>
        </properties>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>                
    </profile>
    <profile>
        <id>prod</id>
        <properties>
            <env>prod</env>
        </properties>
<!--         <activation>
            <activeByDefault>true</activeByDefault>
        </activation>     -->       
    </profile>
</profiles>
<build>
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.3</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <compilerArgs>
                    <arg>-parameters</arg>
                </compilerArgs>
                <useIncrementalCompilation>false</useIncrementalCompilation>
            </configuration>
        </plugin>
    </plugins>
    <filters>
        <filter>src/main/resources/profiles/${env}.properties</filter>
    </filters>    
	<resources>
		<resource>
			<targetPath>${project.build.directory}/classes</targetPath>
			<directory>src/main/resources</directory>
			<filtering>true</filtering>
			<includes>
				<include>**/*.xml</include>
				<include>**/*.properties</include>
				<include>**/*.js</include>
			</includes>
		</resource>
	</resources>    
</build>
<repositories>
    <repository>
        <id>nutz</id>
        <url>https://jfrog.nutz.cn/artifactory/jcenter</url>
    </repository>
    <repository>
        <id>nutz-snapshots</id>
        <url>https://jfrog.nutz.cn/artifactory/snapshots</url>
        <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
        </snapshots>
        <releases>
            <enabled>false</enabled>
        </releases>
    </repository>
</repositories>
</project>

命令行下 mvn package 看看出来的war里面有无nutz.jar

兽总 有的 war里面有nutz-1.r.62.jar

哦,那就是eclipse没配好吧

又莫名其妙的好了 兽总 醉了

我什么都没动 重新部署了而已 之前部署N遍都报错

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