ClassNotFoundException Error when starting tomcat

后端 未结 1 957
南笙
南笙 2021-01-23 04:37

I\'m trying to setup the tomcat server from eclipse, but this error has beaten me for a long and i didn\'t find any solution..

I tried:

  • adding spring-con
相关标签:
1条回答
  • 2021-01-23 05:12

    The class in question is in spring-web-?????RELEASE.jar. Go to your war and either open it with the likes of winzip or 7Zip and look for the jar in WEB-INF/lib, my guess is that it isn't there. If your using maven include the dependency as:

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${or.springframework-version}</version>
    </dependency>
    

    If you're not using maven and I imagine you're doing this in Eclipse as you mentioned deployment assembly, you must add whatever libraries you used to make these jars available to your compile to the eclipse build. Or you can simply move the jar to WEB-INF/lib.

    Check your war after the build for the jar file.

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