java.lang.NoClassDefFoundError: javax/servlet/ServletContext

@java.lang.NoClassDefFoundError: javax/servlet/ServletContextTOC

java.lang.NoClassDefFoundError: javax/servlet/ServletContext

使用idea 开发项目,启动时报如下错误

"D:\Program Files\Java\jdk1.8.0_211\bin\java.exe" "-javaagent:D:\Program Files\IntelliJ IDEA Community Edition 2019.2\lib\idea_rt.jar=55860:D:\Program Files\IntelliJ IDEA Community Edition 2019.2\bin" -Dfile.encoding=UTF-8 -classpath "D:\Program Files\Java\jdk1.8.0_211\jre\lib\charsets.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\deploy.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\access-bridge-64.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\cldrdata.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\dnsns.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\jaccess.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\jfxrt.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\localedata.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\nashorn.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunec.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunjce_provider.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunmscapi.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\sunpkcs11.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\ext\zipfs.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\javaws.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\jce.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\jfr.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\jfxswt.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\jsse.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\management-agent.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\plugin.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\resources.jar;D:\Program Files\Java\jdk1.8.0_211\jre\lib\rt.jar;D:\workspace\workflow_life\zabank-tks-workflow-service\workflow_\target\classes;D:\development\repository\org\apache\tomcat\tomcat-juli\8.5.11\tomcat-juli-8.5.11.jar;D:\development\repository\junit\junit\4.12\junit-4.12.jar;D:\development\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;D:\development\repository\com\zatech\za-bank-framework-model\0.7.6\za-bank-framework-model-0.7.6.jar;D:\development\repository\org\springframework\boot\spring-boot-starter-web\1.5.7.RELEASE\spring-boot-starter-web-1.5.7.RELEASE.jar;D:\development\repository\org\springframework\boot\spring-boot-starter\1.5.7.RELEASE\spring-boot-starter-1.5.7.RELEASE.jar;D:\development\repository\org\springframework\boot\spring-boot-starter-logging\1.5.7.RELEASE\spring-boot-starter-logging-1.5.7.RELEASE.jar;D:\development\repository\ch\qos\logback\logback-classic\1.1.11\logback-classic-1.1.11.jar;D:\development\repository\ch\qos\logback\logback-core\1.1.11\logback-core-1.1.11.jar;D:\development\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;D:\development\repository\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;D:\development\repository\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;D:\development\repository\org\hibernate\hibernate-validator\5.3.5.Final\hibernate-validator-5.3.5.Final.jar;D:\development\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;D:\development\repository\org\jboss\logging\jboss-logging\3.3.1.Final\jboss-logging-3.3.1.Final.jar;D:\development\repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;D:\development\repository\org\springframework\spring-web\4.3.11.RELEASE\spring-web-4.3.11.RELEASE.jar;D:\development\repository\org\springframework\spring-webmvc\4.3.11.RELEASE\spring-webmvc-4.3.11.RELEASE.jar;D:\development\repository\org\springframework\spring-expression\4.3.11.RELEASE\spring-expression-4.3.11.RELEASE.jar;D:\development\repository\org\springframework\boot\spring-boot-starter-data-redis\1.5.7.RELEASE\spring-boot-starter-data-redis-1.5.7.RELEASE.jar;D:\development\repository\org\springframework\spring-core\4.3.11.RELEASE\spring-core-4.3.11.RELEASE.jar;D:\development\repository\org\springframework\spring-context-support\4.3.11.RELEASE\spring-context-support-4.3.11.RELEASE.jar;D:\development\repository\org\springframework\spring-beans\4.3.11.RELEASE\spring-beans-4.3.11.RELEASE.jar;D:\development\repository\org\springframework\spring-context\4.3.11.RELEASE\spring-context-4.3.11.RELEASE.jar;D:\development\repository\org\unidal\framework\foundation-service\2.5.0\foundation-service-2.5.0.jar;D:\development\repository\org\codehaus\plexus\plexus-container-default\1.6\plexus-container-default-1.6.jar;D:\development\repository\org\codehaus\plexus\plexus-classworlds\2.5.1\plexus-classworlds-2.5.1.jar;D:\development\repository\org\apache\xbean\xbean-reflect\3.7\xbean-reflect-3.7.jar;D:\development\repository\com\google\guava\guava\18.0\guava-18.0.jar;D:\development\repository\org\codehaus\plexus\plexus-utils\3.0.24\plexus-utils-3.0.24.jar;D:\development\repository\javax\activation\activation\1.1.1\activation-1.1.1.jar;D:\development\repository\com\mashape\unirest\unirest-java\1.4.9\unirest-java-1.4.9.jar;D:\development\repository\org\apache\httpcomponents\httpasyncclient\4.1.3\httpasyncclient-4.1.3.jar;D:\development\repository\org\apache\httpcomponents\httpcore-nio\4.4.6\httpcore-nio-4.4.6.jar;D:\development\repository\org\activiti\activiti-explorer\5.21.0\activiti-explorer-5.21.0.jar;D:\development\repository\org\activiti\activiti-simple-workflow\5.21.0\activiti-simple-workflow-5.21.0.jar;D:\development\repository\org\activiti\activiti-crystalball\5.21.0\activiti-crystalball-5.21.0.jar;D:\development\repository\com\vaadin\vaadin\6.8.8\vaadin-6.8.8.jar;D:\development\repository\commons-dbcp\commons-dbcp\1.4\commons-dbcp-1.4.jar;D:\development\repository\commons-pool\commons-pool\1.6\commons-pool-1.6.jar;D:\development\repository\com\h2database\h2\1.4.196\h2-1.4.196.jar;D:\development\repository\org\springframework\spring-jdbc\4.3.11.RELEASE\spring-jdbc-4.3.11.RELEASE.jar;D:\development\repository\org\imgscalr\imgscalr-lib\4.2\imgscalr-lib-4.2.jar;D:\development\repository\org\codehaus\groovy\groovy-all\2.4.12\groovy-all-2.4.12.jar;D:\development\repository\org\vaadin\addons\dcharts-widget\0.10.0\dcharts-widget-0.10.0.jar;D:\development\repository\org\activiti\activiti-bpmn-converter\5.21.0\activiti-bpmn-converter-5.21.0.jar;D:\development\repository\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;D:\development\repository\org\activiti\activiti-bpmn-layout\5.21.0\activiti-bpmn-layout-5.21.0.jar;D:\development\repository\org\tinyjee\jgraphx\jgraphx\1.10.4.1\jgraphx-1.10.4.1.jar;D:\development\repository\org\activiti\activiti-bpmn-model\5.21.0\activiti-bpmn-model-5.21.0.jar;D:\development\repository\org\activiti\activiti-diagram-rest\5.21.0\activiti-diagram-rest-5.21.0.jar;D:\development\repository\org\activiti\activiti-common-rest\5.21.0\activiti-common-rest-5.21.0.jar;D:\development\repository\org\springframework\spring-tx\4.3.11.RELEASE\spring-tx-4.3.11.RELEASE.jar;D:\development\repository\org\activiti\activiti-engine\5.21.0\activiti-engine-5.21.0.jar;D:\development\repository\org\apache\commons\commons-email\1.4\commons-email-1.4.jar;D:\development\repository\org\activiti\activiti-image-generator\5.21.0\activiti-image-generator-5.21.0.jar;D:\development\repository\org\activiti\activiti-json-converter\5.21.0\activiti-json-converter-5.21.0.jar;D:\development\repository\org\activiti\activiti-modeler\5.21.0\activiti-modeler-5.21.0.jar;D:\development\repository\org\activiti\activiti-process-validation\5.21.0\activiti-process-validation-5.21.0.jar;D:\development\repository\org\activiti\activiti-spring\5.21.0\activiti-spring-5.21.0.jar;D:\development\repository\org\springframework\spring-orm\4.3.11.RELEASE\spring-orm-4.3.11.RELEASE.jar;D:\development\repository\org\apache\xmlgraphics\batik-anim\1.7\batik-anim-1.7.jar;D:\development\repository\org\apache\xmlgraphics\batik-awt-util\1.7\batik-awt-util-1.7.jar;D:\development\repository\org\apache\xmlgraphics\batik-bridge\1.7\batik-bridge-1.7.jar;D:\development\repository\xalan\xalan\2.6.0\xalan-2.6.0.jar;D:\development\repository\org\apache\xmlgraphics\batik-codec\1.7\batik-codec-1.7.jar;D:\development\repository\org\apache\xmlgraphics\batik-css\1.7\batik-css-1.7.jar;D:\development\repository\org\apache\xmlgraphics\batik-dom\1.7\batik-dom-1.7.jar;D:\development\repository\org\apache\xmlgraphics\batik-ext\1.7\batik-ext-1.7.jar;D:\development\repository\org\apache\xmlgraphics\batik-gvt\1.7\batik-gvt-1.7.jar;D:\development\repository\org\apache\xmlgraphics\batik-js\1.7\batik-js-1.7.jar;D:\development\repository\org\apache\xmlgraphics\batik-parser\1.7\batik-parser-1.7.jar;D:\development\repository\org\apache\xmlgraphics\batik-script\1.7\batik-script-1.7.jar;D:\development\repository\org\apache\xmlgraphics\batik-svg-dom\1.7\batik-svg-dom-1.7.jar;D:\development\repository\org\apache\xmlgraphics\batik-svggen\1.7\batik-svggen-1.7.jar;D:\development\repository\org\apache\xmlgraphics\batik-transcoder\1.7\batik-transcoder-1.7.jar;D:\development\repository\org\apache\xmlgraphics\fop\0.94\fop-0.94.jar;D:\development\repository\org\apache\avalon\framework\avalon-framework-api\4.3.1\avalon-framework-api-4.3.1.jar;D:\development\repository\org\apache\avalon\framework\avalon-framework-impl\4.3.1\avalon-framework-impl-4.3.1.jar;D:\development\repository\org\apache\xmlgraphics\batik-util\1.7\batik-util-1.7.jar;D:\development\repository\org\apache\xmlgraphics\batik-xml\1.7\batik-xml-1.7.jar;D:\development\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;D:\development\repository\org\apache\james\apache-mime4j\0.6.1\apache-mime4j-0.6.1.jar;D:\development\repository\asm\asm\3.3.1\asm-3.3.1.jar;D:\development\repository\org\apache\axis\axis\1.4\axis-1.4.jar;D:\development\repository\cglib\cglib-nodep\3.1\cglib-nodep-3.1.jar;D:\development\repository\commons-beanutils\commons-beanutils\1.9.3\commons-beanutils-1.9.3.jar;D:\development\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;D:\development\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;D:\development\repository\commons-discovery\commons-discovery\0.5\commons-discovery-0.5.jar;D:\development\repository\commons-fileupload\commons-fileupload\1.3.1\commons-fileupload-1.3.1.jar;D:\development\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar;D:\development\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;D:\development\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;D:\development\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;D:\development\repository\org\apache\commons\commons-lang3\3.3.2\commons-lang3-3.3.2.jar;D:\development\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;D:\development\repository\com\alibaba\druid\1.0.9\druid-1.0.9.jar;D:\development\repository\net\sf\ehcache\ehcache-core\2.6.9\ehcache-core-2.6.9.jar;D:\development\repository\net\sf\ezmorph\ezmorph\1.0.6\ezmorph-1.0.6.jar;D:\development\repository\com\google\code\gson\gson\2.8.1\gson-2.8.1.jar;D:\development\repository\org\apache\httpcomponents\httpcore\4.4.6\httpcore-4.4.6.jar;D:\development\repository\org\apache\httpcomponents\httpmime\4.5.3\httpmime-4.5.3.jar;D:\development\repository\com\fasterxml\jackson\core\jackson-core\2.8.10\jackson-core-2.8.10.jar;D:\development\repository\org\codehaus\jackson\jackson-mapper-asl\1.9.13\jackson-mapper-asl-1.9.13.jar;D:\development\repository\org\codehaus\jackson\jackson-core-asl\1.9.13\jackson-core-asl-1.9.13.jar;D:\development\repository\com\fasterxml\jackson\core\jackson-annotations\2.8.0\jackson-annotations-2.8.0.jar;D:\development\repository\com\fasterxml\jackson\core\jackson-databind\2.8.10\jackson-databind-2.8.10.jar;D:\development\repository\javax\xml\jaxrpc-api\1.1\jaxrpc-api-1.1.jar;D:\development\repository\math\geom2d\javaGeom\0.11.1\javaGeom-0.11.1.jar;D:\development\repository\joda-time\joda-time\2.9.9\joda-time-2.9.9.jar;D:\development\repository\jstl\jstl\1.2\jstl-1.2.jar;D:\development\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;D:\development\repository\org\mybatis\mybatis\3.3.1\mybatis-3.3.1.jar;D:\development\repository\org\mybatis\mybatis-spring\1.2.0\mybatis-spring-1.2.0.jar;D:\development\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;D:\development\repository\org\slf4j\slf4j-log4j12\1.7.25\slf4j-log4j12-1.7.25.jar;D:\development\repository\taglibs\standard\1.1.2\standard-1.1.2.jar;D:\development\repository\wsdl4j\wsdl4j\1.6.3\wsdl4j-1.6.3.jar;D:\development\repository\com\hynnet\sqljdbc4-chs\4.0.2206.100\sqljdbc4-chs-4.0.2206.100.jar;D:\development\repository\org\quartz-scheduler\quartz\2.2.1\quartz-2.2.1.jar;D:\development\repository\c3p0\c3p0\0.9.1.1\c3p0-0.9.1.1.jar;D:\development\repository\org\quartz-scheduler\quartz-jobs\2.2.1\quartz-jobs-2.2.1.jar;D:\development\repository\org\apache\commons\commons-pool2\2.4.2\commons-pool2-2.4.2.jar;D:\development\repository\redis\clients\jedis\2.9.0\jedis-2.9.0.jar;D:\development\repository\org\springframework\data\spring-data-redis\1.8.7.RELEASE\spring-data-redis-1.8.7.RELEASE.jar;D:\development\repository\org\springframework\data\spring-data-keyvalue\1.2.7.RELEASE\spring-data-keyvalue-1.2.7.RELEASE.jar;D:\development\repository\org\springframework\data\spring-data-commons\1.13.7.RELEASE\spring-data-commons-1.13.7.RELEASE.jar;D:\development\repository\org\springframework\spring-oxm\4.3.11.RELEASE\spring-oxm-4.3.11.RELEASE.jar;D:\development\repository\org\springframework\spring-aop\4.3.11.RELEASE\spring-aop-4.3.11.RELEASE.jar;D:\development\repository\com\alibaba\fastjson\1.2.12\fastjson-1.2.12.jar;D:\development\repository\org\apache\httpcomponents\httpclient\4.5.3\httpclient-4.5.3.jar;D:\development\repository\org\webjars\bower\ueditor\1.4.3\ueditor-1.4.3.jar;D:\development\repository\org\apache\axis\axis-ant\1.4\axis-ant-1.4.jar;D:\development\repository\org\mybatis\mybatis-ehcache\1.0.0\mybatis-ehcache-1.0.0.jar;D:\development\repository\com\belerweb\pinyin4j\2.5.1\pinyin4j-2.5.1.jar;D:\development\repository\org\apache\poi\poi\3.16\poi-3.16.jar;D:\development\repository\org\apache\commons\commons-collections4\4.1\commons-collections4-4.1.jar;D:\development\repository\org\apache\poi\poi-examples\3.16\poi-examples-3.16.jar;D:\development\repository\org\apache\poi\poi-excelant\3.16\poi-excelant-3.16.jar;D:\development\repository\org\apache\ant\ant\1.8.2\ant-1.8.2.jar;D:\development\repository\org\apache\ant\ant-launcher\1.8.2\ant-launcher-1.8.2.jar;D:\development\repository\org\apache\poi\poi-ooxml\3.16\poi-ooxml-3.16.jar;D:\development\repository\com\github\virtuald\curvesapi\1.04\curvesapi-1.04.jar;D:\development\repository\org\apache\poi\poi-ooxml-schemas\3.16\poi-ooxml-schemas-3.16.jar;D:\development\repository\org\apache\xmlbeans\xmlbeans\2.6.0\xmlbeans-2.6.0.jar;D:\development\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;D:\development\repository\org\apache\poi\poi-scratchpad\3.16\poi-scratchpad-3.16.jar;D:\development\repository\javax\xml\soap\saaj-api\1.3.5\saaj-api-1.3.5.jar;D:\development\repository\org\aspectj\aspectjweaver\1.8.10\aspectjweaver-1.8.10.jar;D:\development\repository\org\json\json\20140107\json-20140107.jar;D:\development\repository\com\sun\mail\javax.mail\1.5.6\javax.mail-1.5.6.jar;D:\development\repository\com\jslsolucoes\ojdbc6\11.2.0.1.0\ojdbc6-11.2.0.1.0.jar;D:\development\repository\com\fasterxml\jackson\jr\jackson-jr-all\2.8.10\jackson-jr-all-2.8.10.jar;D:\development\repository\cn\jpush\api\jpush-client\2.2.0\jpush-client-2.2.0.jar;D:\development\repository\org\mybatis\mybatis-oscache\1.0.0\mybatis-oscache-1.0.0.jar;D:\development\repository\opensymphony\oscache\2.4\oscache-2.4.jar;D:\development\repository\org\java-websocket\Java-WebSocket\1.3.0\Java-WebSocket-1.3.0.jar;D:\development\repository\xml-apis\xml-apis\1.4.01\xml-apis-1.4.01.jar;D:\development\repository\xml-apis\xml-apis-ext\1.3.04\xml-apis-ext-1.3.04.jar;D:\development\repository\org\apache\xmlgraphics\xmlgraphics-commons\1.2\xmlgraphics-commons-1.2.jar;D:\development\repository\org\springframework\amqp\spring-rabbit\1.7.4.RELEASE\spring-rabbit-1.7.4.RELEASE.jar;D:\development\repository\org\springframework\spring-messaging\4.3.11.RELEASE\spring-messaging-4.3.11.RELEASE.jar;D:\development\repository\com\rabbitmq\http-client\1.1.1.RELEASE\http-client-1.1.1.RELEASE.jar;D:\development\repository\com\rabbitmq\amqp-client\4.0.3\amqp-client-4.0.3.jar;D:\development\repository\org\springframework\retry\spring-retry\1.2.1.RELEASE\spring-retry-1.2.1.RELEASE.jar;D:\development\repository\org\springframework\amqp\spring-amqp\1.7.4.RELEASE\spring-amqp-1.7.4.RELEASE.jar;D:\development\repository\org\apache\rocketmq\rocketmq-client\4.3.0\rocketmq-client-4.3.0.jar;D:\development\repository\org\apache\rocketmq\rocketmq-common\4.3.0\rocketmq-common-4.3.0.jar;D:\development\repository\org\apache\rocketmq\rocketmq-remoting\4.3.0\rocketmq-remoting-4.3.0.jar;D:\development\repository\org\apache\rocketmq\rocketmq-logging\4.3.0\rocketmq-logging-4.3.0.jar;D:\development\repository\io\netty\netty-tcnative-boringssl-static\1.1.33.Fork26\netty-tcnative-boringssl-static-1.1.33.Fork26.jar;D:\development\repository\org\projectlombok\lombok\1.16.18\lombok-1.16.18.jar;D:\development\repository\org\springframework\boot\spring-boot-starter-mail\1.5.7.RELEASE\spring-boot-starter-mail-1.5.7.RELEASE.jar;D:\development\repository\com\zatech\cat-monitor\2.1-SNAPSHOT\cat-monitor-2.1-20190704.034925-5.jar;D:\development\repository\org\springframework\boot\spring-boot-starter-aop\1.5.7.RELEASE\spring-boot-starter-aop-1.5.7.RELEASE.jar;D:\development\repository\com\dianping\cat\cat-client\3.0.0\cat-client-3.0.0.jar;D:\development\repository\io\netty\netty-all\4.0.24.Final\netty-all-4.0.24.Final.jar;D:\development\repository\net\sf\json-lib\json-lib\2.4\json-lib-2.4-jdk15.jar;D:\development\repository\mysql\mysql-connector-java\5.1.44\mysql-connector-java-5.1.44.jar;D:\development\repository\org\springframework\boot\spring-boot-autoconfigure\1.5.7.RELEASE\spring-boot-autoconfigure-1.5.7.RELEASE.jar;D:\development\repository\org\springframework\boot\spring-boot\1.5.7.RELEASE\spring-boot-1.5.7.RELEASE.jar;D:\development\repository\org\apache\shiro\shiro-spring\1.3.2\shiro-spring-1.3.2.jar;D:\development\repository\org\apache\shiro\shiro-core\1.3.2\shiro-core-1.3.2.jar;D:\development\repository\org\apache\shiro\shiro-web\1.3.2\shiro-web-1.3.2.jar;D:\development\repository\javax\servlet\jstl\1.2\jstl-1.2.jar;D:\development\repository\com\alibaba\dubbo\2.8.4\dubbo-2.8.4.jar;D:\development\repository\org\javassist\javassist\3.21.0-GA\javassist-3.21.0-GA.jar;D:\development\repository\org\apache\zookeeper\zookeeper\3.4.6\zookeeper-3.4.6.jar;D:\development\repository\jline\jline\0.9.94\jline-0.9.94.jar;D:\development\repository\io\netty\netty\3.7.0.Final\netty-3.7.0.Final.jar;D:\development\repository\com\github\sgroschupf\zkclient\0.1\zkclient-0.1.jar;D:\development\repository\org\springframework\cloud\spring-cloud-starter-eureka\1.3.5.RELEASE\spring-cloud-starter-eureka-1.3.5.RELEASE.jar;D:\development\repository\org\springframework\cloud\spring-cloud-starter\1.2.4.RELEASE\spring-cloud-starter-1.2.4.RELEASE.jar;D:\development\repository\org\springframework\cloud\spring-cloud-context\1.2.4.RELEASE\spring-cloud-context-1.2.4.RELEASE.jar;D:\development\repository\org\springframework\security\spring-security-rsa\1.0.3.RELEASE\spring-security-rsa-1.0.3.RELEASE.jar;D:\development\repository\org\bouncycastle\bcpkix-jdk15on\1.55\bcpkix-jdk15on-1.55.jar;D:\development\repository\org\bouncycastle\bcprov-jdk15on\1.55\bcprov-jdk15on-1.55.jar;D:\development\repository\org\springframework\cloud\spring-cloud-netflix-core\1.3.5.RELEASE\spring-cloud-netflix-core-1.3.5.RELEASE.jar;D:\development\repository\org\springframework\cloud\spring-cloud-netflix-eureka-client\1.3.5.RELEASE\spring-cloud-netflix-eureka-client-1.3.5.RELEASE.jar;D:\development\repository\com\netflix\eureka\eureka-client\1.6.2\eureka-client-1.6.2.jar;D:\development\repository\org\codehaus\jettison\jettison\1.3.7\jettison-1.3.7.jar;D:\development\repository\com\netflix\netflix-commons\netflix-eventbus\0.3.0\netflix-eventbus-0.3.0.jar;D:\development\repository\com\netflix\netflix-commons\netflix-infix\0.3.0\netflix-infix-0.3.0.jar;D:\development\repository\commons-jxpath\commons-jxpath\1.3\commons-jxpath-1.3.jar;D:\development\repository\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;D:\development\repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;D:\development\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;D:\development\repository\org\apache\commons\commons-math\2.2\commons-math-2.2.jar;D:\development\repository\com\netflix\archaius\archaius-core\0.7.4\archaius-core-0.7.4.jar;D:\development\repository\javax\ws\rs\jsr311-api\1.1.1\jsr311-api-1.1.1.jar;D:\development\repository\com\netflix\servo\servo-core\0.10.1\servo-core-0.10.1.jar;D:\development\repository\com\netflix\servo\servo-internal\0.10.1\servo-internal-0.10.1.jar;D:\development\repository\com\sun\jersey\jersey-core\1.19.1\jersey-core-1.19.1.jar;D:\development\repository\com\sun\jersey\jersey-client\1.19.1\jersey-client-1.19.1.jar;D:\development\repository\com\sun\jersey\contribs\jersey-apache-client4\1.19.1\jersey-apache-client4-1.19.1.jar;D:\development\repository\com\netflix\eureka\eureka-core\1.6.2\eureka-core-1.6.2.jar;D:\development\repository\org\codehaus\woodstox\woodstox-core-asl\4.4.1\woodstox-core-asl-4.4.1.jar;D:\development\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;D:\development\repository\org\codehaus\woodstox\stax2-api\3.1.4\stax2-api-3.1.4.jar;D:\development\repository\org\springframework\cloud\spring-cloud-starter-archaius\1.3.5.RELEASE\spring-cloud-starter-archaius-1.3.5.RELEASE.jar;D:\development\repository\commons-configuration\commons-configuration\1.8\commons-configuration-1.8.jar;D:\development\repository\org\springframework\cloud\spring-cloud-starter-ribbon\1.3.5.RELEASE\spring-cloud-starter-ribbon-1.3.5.RELEASE.jar;D:\development\repository\com\netflix\ribbon\ribbon\2.2.2\ribbon-2.2.2.jar;D:\development\repository\com\netflix\ribbon\ribbon-transport\2.2.2\ribbon-transport-2.2.2.jar;D:\development\repository\io\reactivex\rxnetty-contexts\0.4.9\rxnetty-contexts-0.4.9.jar;D:\development\repository\io\reactivex\rxnetty-servo\0.4.9\rxnetty-servo-0.4.9.jar;D:\development\repository\io\reactivex\rxnetty\0.4.9\rxnetty-0.4.9.jar;D:\development\repository\io\netty\netty-codec-http\4.0.27.Final\netty-codec-http-4.0.27.Final.jar;D:\development\repository\io\netty\netty-codec\4.0.27.Final\netty-codec-4.0.27.Final.jar;D:\development\repository\io\netty\netty-handler\4.0.27.Final\netty-handler-4.0.27.Final.jar;D:\development\repository\io\netty\netty-transport-native-epoll\4.0.27.Final\netty-transport-native-epoll-4.0.27.Final.jar;D:\development\repository\io\netty\netty-buffer\4.0.27.Final\netty-buffer-4.0.27.Final.jar;D:\development\repository\com\netflix\ribbon\ribbon-core\2.2.2\ribbon-core-2.2.2.jar;D:\development\repository\com\netflix\ribbon\ribbon-httpclient\2.2.2\ribbon-httpclient-2.2.2.jar;D:\development\repository\com\netflix\netflix-commons\netflix-commons-util\0.1.1\netflix-commons-util-0.1.1.jar;D:\development\repository\com\netflix\ribbon\ribbon-loadbalancer\2.2.2\ribbon-loadbalancer-2.2.2.jar;D:\development\repository\com\netflix\netflix-commons\netflix-statistics\0.1.1\netflix-statistics-0.1.1.jar;D:\development\repository\io\reactivex\rxjava\1.1.10\rxjava-1.1.10.jar;D:\development\repository\com\netflix\ribbon\ribbon-eureka\2.2.2\ribbon-eureka-2.2.2.jar;D:\development\repository\com\thoughtworks\xstream\xstream\1.4.9\xstream-1.4.9.jar;D:\development\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;D:\development\repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;D:\development\repository\org\springframework\cloud\spring-cloud-starter-feign\1.3.5.RELEASE\spring-cloud-starter-feign-1.3.5.RELEASE.jar;D:\development\repository\org\springframework\cloud\spring-cloud-commons\1.2.4.RELEASE\spring-cloud-commons-1.2.4.RELEASE.jar;D:\development\repository\org\springframework\security\spring-security-crypto\4.2.3.RELEASE\spring-security-crypto-4.2.3.RELEASE.jar;D:\development\repository\io\github\openfeign\feign-core\9.5.0\feign-core-9.5.0.jar;D:\development\repository\org\jvnet\animal-sniffer-annotation\1.0\animal-sniffer-annotation-1.0.jar;D:\development\repository\io\github\openfeign\feign-slf4j\9.5.0\feign-slf4j-9.5.0.jar;D:\development\repository\io\github\openfeign\feign-hystrix\9.5.0\feign-hystrix-9.5.0.jar;D:\development\repository\com\netflix\hystrix\hystrix-core\1.5.12\hystrix-core-1.5.12.jar;D:\development\repository\org\hdrhistogram\HdrHistogram\2.1.9\HdrHistogram-2.1.9.jar;D:\workspace\workflow_life\zabank-tks-workflow-service\workflow-api\target\classes;D:\development\repository\com\ctrip\framework\apollo\apollo-client\1.0.0\apollo-client-1.0.0.jar;D:\development\repository\com\ctrip\framework\apollo\apollo-core\1.0.0\apollo-core-1.0.0.jar;D:\development\repository\com\google\inject\guice\4.1.0\guice-4.1.0.jar;D:\development\repository\javax\inject\javax.inject\1\javax.inject-1.jar;D:\development\repository\org\aspectj\aspectjrt\1.8.10\aspectjrt-1.8.10.jar;D:\development\repository\com\fasterxml\uuid\java-uuid-generator\3.1.3\java-uuid-generator-3.1.3.jar" com.fh.WFApplication
java.lang.NoClassDefFoundError: javax/servlet/ServletContext
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
	at java.lang.Class.getMethod0(Class.java:3018)
	at java.lang.Class.getMethod(Class.java:1784)
	at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContext
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 7 more
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" 
Process finished with exit code 1

检查后 pom.xml 文件中也存在该引用 ,jar 也引入了,找了各种资料后终于找到了问题所在
是因为Intellij集成maven引入jar包时scope设置的问题。

仔细检查pom文件,发现问题可能出现在一下两个地方:

   <dependency>
        <groupId>org.springframework.bootgroupId>
        <artifactId>spring-boot-starter-tomcatartifactId>
        <version>1.2.3.RELEASEversion>
        <scope>providedscope>
    dependency>
    <dependency>
        <groupId>org.apache.tomcat.embedgroupId>
        <artifactId>tomcat-embed-jasperartifactId>
        <version>7.0.68version>
        <scope>providedscope>
    dependency>

注释掉配置中 所有的

<scope>providedscope>

java.lang.NoClassDefFoundError: javax/servlet/ServletContext_第1张图片

问题就这么解决了。

总结

这可能是Intellij的一个bug,在使用spring-boot的时候,如果把某个引入的依赖设置为provided,那么在Intellij启动时就会找不到相应的类。因此,此时需要把此项配置给注释掉,但是打包上线的时候并不需要这些依赖,那么在打包的时候就把注释打开。

参考博文:https://www.cnblogs.com/softidea/p/6071630.html

你可能感兴趣的:(java.lang.NoClassDefFoundError: javax/servlet/ServletContext)