【问题标题】:running maven jetty causing a dependency error运行 maven jetty 导致依赖错误
【发布时间】:2016-05-04 21:44:17
【问题描述】:

当我启动码头时,我遇到了这个有线 java 编译错误。我正在运行 naven build,它给了我成功,但是当我运行 mvn jetty:run 命令时,它给出了以下错误:

EXCEPTION org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP||PWC6199: Generated servlet error:|org.apache.jsp.tag.web.ui.static_tag is not abstract and does not override abstract method getDependants() in org.apache.jasper.runtime.JspSourceDependent||PWC6199: Generated servlet error:|getDependants() in org.apache.jsp.tag.web.ui.static_tag cannot implement getDependants() in org.apache.jasper.runtime.JspSourceDependent|  return type java.util.List<java.lang.String> is not compatible with java.util.Map<java.lang.String,java.lang.Long>||
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:129)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:299)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:392)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)

我正在使用 maven-jetty-plugin 来运行码头。 我尝试重新安装我当前正在工作的环境,并在不同的目录中签出我的项目。到目前为止没有任何效果。不知道可能出了什么问题?

【问题讨论】:

    标签: java maven maven-jetty-plugin


    【解决方案1】:

    您的问题可能是以下情况之一:

    • 您在 pom.xml 中依赖 glassfish:这就是我的问题

    • 您使用的 servlet-api 版本与您的码头使用的不同。要解决这个问题,您可以将提供的标签添加到您的 servlet-api 依赖项中,使码头使用自己的 servlet 版本:

      javax.servlet servlet-api 3.2 假如

    【讨论】:

      【解决方案2】:

      使用最新的 Jetty 插件帮助了我

      http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html 此链接指向问题的根本原因 https://support.lucidworks.com/hc/en-us/articles/201784186-Error-in-Javac-compilation-for-JSP-in-LucidWorks-Search-UI

      仅供参考我的插件配置

              <plugin>
                  <groupId>org.eclipse.jetty</groupId>
                  <artifactId>jetty-maven-plugin</artifactId>
                  <version>9.3.7.v20160115</version>
                  <configuration>
                      <scanIntervalSeconds>10</scanIntervalSeconds>
                  </configuration>
              </plugin>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-11-13
        • 1970-01-01
        • 2011-01-23
        • 1970-01-01
        • 2014-07-26
        • 2017-11-08
        • 2019-07-23
        • 2020-03-18
        相关资源
        最近更新 更多