【问题标题】:java.lang.IllegalArgumentException: The main resource set specified [...\org.eclipse.wst.server.core\tmp0\wtpwebapps\appname] is not valid [duplicate]java.lang.IllegalArgumentException:指定的主资源集 [...\org.eclipse.wst.server.core\tmp0\wtpwebapps\appname] 无效 [重复]
【发布时间】:2015-12-04 05:51:47
【问题描述】:

我遇到了一个问题。我写了一个使用jsp 的动态网络项目。我通过添加服务器运行时环境将tomcat server 8添加到eclipse,然后启动了一个项目,eclipse向我抛出了这个错误:

  Caused by: java.lang.IllegalArgumentException: The main resource set specified [C:\Users\Ajay Kulkarni-enEXL\Javaworkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\bistip] is not valid
    at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:723)
    at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:684)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 9 more

我该如何解决?击中这里。
这可能会有所帮助:
这是 WEB-INF:

这是 META-INF:

我正在尝试部署JunosDashboard

【问题讨论】:

  • 使用maven?还是标准的动态网络项目?右键单击服务器并清理服务器,重新启动服务器?
  • 我正在使用standard dynamic web project,将尝试所有这些,等待
  • 我清理了它,重新启动服务器,它没有工作
  • 转到这个位置 - C:\Users\Ajay Kulkarni-enEXL\Javaworkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\bistip 并验证什么是正在部署。如果您有疑问,请同时发布文件夹结构的屏幕截图。
  • 检查已编辑的问题

标签: eclipse tomcat servlets illegalargumentexception


【解决方案1】:

尝试为servlet添加依赖

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>servlet-api</artifactId>
    <version>${servlet-api-version}</version>
    <scope>provided</scope>
</dependency>

【讨论】:

  • 我不确定你的问题,但我有同样的问题,我用这种方法解决了。
猜你喜欢
  • 2015-10-17
  • 2014-10-25
  • 1970-01-01
  • 2016-02-24
  • 2016-06-16
  • 2014-10-24
  • 2013-06-04
  • 2018-11-13
  • 2019-02-02
相关资源
最近更新 更多