java.lang.ClassFormatError:JVMCFRE074未指定Code属性; class = javax / servlet / http / HttpServlet,method = <init>()V,pc = 0?</init>

时间:2014-08-01 08:33:44

标签: java-ee maven-3

启动服务器时出现此错误? &#39; java.lang.ClassFormatError:JVMCFRE074未指定Code属性; class = javax / servlet / http / HttpServlet,method =()V,pc = 0&#39;

有人可以帮我解决这个问题吗?

1 个答案:

答案 0 :(得分:2)

尝试从依赖项中排除javaee-api:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
      <classpathDependencyExcludes>
        <classpathDependencyExclude>javax:javaee-api</classpathDependencyExclude>
      </classpathDependencyExcludes>
    </configuration>
  </plugin>