1、问题:

Target runtime Apache Tomcat v7.0 is not defined

解决方法:

          right click on your project > Properties > Targeted Runtime > Click the version required 8.0

相关资料:

问题网址

2、问题:

Maven项目中的Dynamic Web Module 3.0 requires Java 1.6 or newer

解决方法

在项目的pom.xml的 build 标签中加入:

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>

相关资料:

http://blog.csdn.net/liuxinghao/article/details/37088063

3、问题

Cannot change version of project facet Dynamic web module to 3.0

解决方法

打开工程目录下的.settings文件夹中的 org.eclipse.wst.common.project.facet.core.xml文件修改标签 facet="jst.web" 中的version版本为3.0,

修改后如下所示:

<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="jst.jaxrs" version="2.0"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.jsf" version="2.2"/>
</faceted-project>

 4、问题

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'tx:annotation- driven'

解决办法

在 spring-mybatis.xml的标签 http://www.springframework.org/schema/context/spring-context-3.5.xsd 中,去掉后面的版本号 。

5、问题

Failed to read artifact descriptor for org.springframework:spring-orm:jar:${spring.version}

解决办法

因为上面jar包的版本是用变量定义的,所有需要定义变量的版本号,下面就是定义spring的包的版本号。

  <properties>
<spring.version>3.1.1.RELEASE</spring.version>
<org.aspectj-version>1.6.10</org.aspectj-version>
<org.slf4j-version>1.6.6</org.slf4j-version>
</properties>

 6、问题

Could not open ServletContext resource [/WEB-INF/springmvc-servlet.xml]

解决办法

在WEB-INF文件夹中找到web.xml,在该文件中添加server配置,如下所示:

<!-- 前端控制器 -->
<servlet>
<!-- 名称,真实的文件名需要在这个名字后面加上-servlet后缀 -->
<servlet-name>spring-mvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<!--设置spring-mvc.xml文件路径,确保和文件名相同-->
<param-value>classpath:spring-mvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

spring-mvc.xml 配置文件在src/main/resource文件夹中。用于启动对应的控制器(controller),核心配置如下:

<context:component-scan base-package="com.bicycleway.controller" />

base-package 后面的内容要和服务类相同,如下图所示:

 7.问题

1、Failed to read artifact descriptor 
2、Cannot find the declaration of element 'beans'.
解决办法
在更新项目的时候,勾选 "Force Update of Snapshot/Releases",如下图所示:

8、java.lang.NullPointerException

可能是方法没有真确的调用,调用的服务没有使用@Resource

笔记

1、maven插件和仓库配置

打开下载下来的maven包的settings.xml文件,路径如下:F:\workspace\apache-maven-3.3.9\conf

配置仓库地址,如下图:

网络资源:

http://stackoverflow.com/questions/23290699/cvc-complex-type-2-4-c-the-matching-wildcard-is-strict-but-no-declaration-can

https://stackoverflow.com/questions/18145774/eclipse-an-error-occurred-while-filtering-resources

9、

Cannot change version of project facet Dynamic web module to 2.5

将web.xml进行修改:

修改前:

!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app>
<display-name>Archetype Created Web Application</display-name>
</web-app>

修改后:

<?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" version="3.0">
<display-name>Archetype Created Web Application</display-name>
</web-app>

eclipse maven工程错误总汇的更多相关文章

  1. eclipse maven项目错误

    eclipse maven项目错误:Failure to transfer org.codehaus.plexus:plexus-interpolation:jar:1.15 from http:// ...

  2. Maven 工程错误Failure to transfer org.codehaus.plexus:plexus-io:pom:1.0,Failure to transfer org.codehaus.plexus:plexus-archiver:jar:2.0.1

    原本好好的Maven工程却出现了莫名的错误 Failure to transfer org.codehaus.plexus:plexus-archiver:jar:2.0.1 from http:// ...

  3. Eclipse maven工程 Missing artifact com.sun:tools:jar:1.5.0:system 解决方法

    今天同事在使用eclipse,引入一个新的maven工程时报错:      Missing artifact com.sun:tools:jar:1.6.0:system   这个问题很奇怪,相同的代 ...

  4. (转) Eclipse Maven 编译错误 Dynamic Web Module 3.1 requires Java 1.7 or newer 解决方案

    场景:在导入Maven项目时候遇到如下错误. 1 问题描述及解决 Eclipse Maven 开发一个 jee 项目时,编译时遇到以下错误:Description Resource Path Loca ...

  5. Eclipse Maven 编译错误 Dynamic Web Module 3.0 requires Java 1.6 or newer 解决方案

    Eclipse Maven 开发一个 jee 项目时,编译时遇到以下错误:Description Resource Path Location TypeDynamic Web Module 3.0 r ...

  6. 导入maven工程错误

    有时候导入maven工程会报空指针异常: An internal error occurred during: “Updating Maven Project”. java.lang.NullPoin ...

  7. 解决eclipse maven工程中src/main/resources目录下创建的文件夹所显示样式不是文件夹,而是"包"图标样式的问题

    参考:http://blog.csdn.net/luwei42768/article/details/72268246 eclipse项目中创建maven项目后,有时在执行命令maven update ...

  8. eclipse maven工程打包失败

    报错如下: Maven install失败 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:comp ...

  9. Eclipse maven工程 Missing artifact com.sun:tools:jar:1.7.0:system 解决方法

    解决方案一:通过maven取运行时参数,eclipse提供的环境变量,基本类似System.getProperty("java.home") <dependency> ...

随机推荐

  1. jQuery的引入和使用

    https://www.cnblogs.com/sandraryan/ 前端代码优化:无效循环越少越好,DOM节点操作越少越好,HTTP请求越少越好 jq是一个js库.(不是框架) JQ优点 1. 方 ...

  2. poj 2993

    跟poj 2996反过来了,这里比较麻烦的就是处理白棋和黑棋各棋子对应的位置 还有在最后打印棋盘式|,:,.的时候会有点繁琐(- - ACMer新手 ): 直接看代码吧: #include<cs ...

  3. C# const 和 readonly 有什么区别

    在写常量的时候,是选择使用 const 还是 static readonly 是一个让人难以决定的问题,本文告诉大家这两个方法的区别 如果一个类有静态字段,会如何初始化 可以使用的方法有两个,第一个方 ...

  4. python模块之random模块

    random模块 随机模块,用于处理随机问题. import random # 随机整数 print(random.randint(0, 9)) # 0到9之间随机一个整数 print(random. ...

  5. H3C RIPv2配置任务

  6. 2018-8-10-如何在-UWP-使用-wpf-的-Trigger-

    title author date CreateTime categories 如何在 UWP 使用 wpf 的 Trigger lindexi 2018-08-10 19:16:51 +0800 2 ...

  7. H3C DHCP服务器基本配置示例

  8. vue-learning:37 - router - 目录

    vue路由vue-router 目录 前端路由历史 服务端渲染(SSR:server side render) 客户端路由(client side routing) 前端路由实现原理 hash模式: ...

  9. ES6/ES7/ES8新特性

    ES6 变量的改变 let const 2. 字符串新增方法 let str = 'react'; str.includes('re') // true str.repeat(3) // reactr ...

  10. 牛客多校第一场 B Inergratiion

    牛客多校第一场 B Inergratiion 传送门:https://ac.nowcoder.com/acm/contest/881/B 题意: 给你一个 [求值为多少 题解: 根据线代的知识 我们可 ...