Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 3 字节的 UTF-8 序列

http://blog.csdn.net/lzupb/article/details/53008481
maven项目编译正常,运行时候报以下错误:
3 字节的 UTF-8 序列的字节 3 无效

仔细看这个错误的详细信息,会发现是某个xml文件中字符识别的问题,解决办法如下:
在pom.xml中添加以下


            <plugin>
                <groupId>org.apache.maven.pluginsgroupId>
                <artifactId>maven-resources-pluginartifactId>
                <version>2.6version>
                <configuration>
                    <encoding>UTF-8encoding>
                configuration>
            plugin>

重点是上面配置中的UTF-8编码。

重新编译后运行正常。

你可能感兴趣的:(项目中需要的各种错误)