java.lang.IllegalArgumentException: The main resource set specified […] is not valid

后端 未结 6 1377
萌比男神i
萌比男神i 2020-11-29 11:47

I\'m having trouble starting my Tomcat server, it used to work, but I did something wrong and now it throws me this exception:

Caused by: java.lang.IllegalAr         


        
相关标签:
6条回答
  • 2020-11-29 12:23

    Seems like you have an outdated web application referenced in your Tomcat embeded server (You are using Tomcat As within Eclipse right?).

    First checkout the deployed application within you server, and check the artifact name j2eeapplication-0.0.1-SNAPSHOT and version. You may need to remove it and clean your working directory the redeploy it and you should be safe.

    0 讨论(0)
  • 2020-11-29 12:34

    I had a similar issue. Just if someone else runs into this problem:

    For me it was caused because I had an old project deployed, then closed that project. For several weeks, everything was fine, until I used the "Clean..." command of eclipse on that tomcat server. From that point on the famous The main resource set specified [...path to deployment location of this project...] is not valid was raised every time I tried to start Tomcat. What solved this problem for me was just removing that old project from tomcat (Right click on that entry under Tomcat Server and choose "Remove").

    0 讨论(0)
  • 2020-11-29 12:36

    For me, this was caused by a file permission issue. We use a different deployment strategy where I work (not something I can change) which means the webapp exists in a completely different directory to the normal Tomcat directory structure. The above exception occurred when the Tomcat runtime didn't have permission to access that directory.

    0 讨论(0)
  • 2020-11-29 12:42

    A maven update did the trick for me.

    Right click on your maven project:

    • Maven > Update Project...
    • Select All
    • Check "Force Update of Snapshots/Releases"
    • Click Ok

    Now, right click on your server:

    • Clean...
    0 讨论(0)
  • 2020-11-29 12:47

    I had this error when I was starting an application that was designed for Tomcat 8 using Tomcat 7.

    0 讨论(0)
  • 2020-11-29 12:50

    Just in case this might help anyone who come later, I managed to start my tomcat8 server after close and reopen the front project in:

    The main resource set specified [project-to-be-reopened]

    In my case, it's maven dependency that's causing me this issue, updating maven-dependency will also help.

    0 讨论(0)
提交回复
热议问题