Reference blog: IDEA development in Java. Lang. ClassNotFoundException: org. Springframework. Web. Context. The ContextLoaderListener error solution
Have a problem
In the process of writing a simple SpringMVC
project, I tried to start the project with Tomcat
, but found the following errors:
java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener
Simply put, the ContextLoaderListener
class cannot be found. The strange thing about
is that the SpringMVC
project that I wrote before doesn’t have similar problems. ┍ ┑ ( ̄ Д  ̄)
The solution
After asking baidu, I was told to add Available Elements
to the Artifact
.
click File - & gt; Project Structure-> Artifacts
, right-click the project name in Available Elements
, and select Put into Output Root
.
Then restart Tomcat
, you will be able to access the page correctly! O (≧ ヾ del ≦ *)
Read More:
- Idea couldn’t be found org.springframework.context .support
- Used by: Java. Lang. classnotfoundexception: org. PostgreSQL. Driver
- Error in idea compilation: java.lang.OutOfMemoryError Java heap space and java.lang.StackOverflowError
- Spring nested exception is java.lang.NoClassDefFoundError: org/springframework/core/MethodClassKey
- Error processing condition on org.springframework.boot . autoconfigure.context.Property Error report solution
- Pyspark36830;- 25509;- Postgresql38169; java.lang.ClassNotFoundException: org.postgresql.Driver
- Unable to read scheme document‘ http://www.springframework.org/schema/spring-context.xsd The solution to the problem
- Idea error: (4, 46) Java: package org.springframework.boot . autoconfigure does not exist problem solving
- Error creating bean with name ‘org.springframework.security.oauth2.config.annotation.web.configurati
- When SSM + Maven project is running, it is prompted that org.springframework.web.servlet.dispatcherserservlet cannot be found
- java.lang.NoSuchMethodError: org.json.JSONObject.put(Java/lang/String; Java/util/Collection;) “209151;”
- Mybatis exception error setting driver on unpoleddatasource. Cause: java.lang.ClassNotFoundException :
- Spring Cloud:org.springframework.web.client.HttpClientErrorException: 404 null
- Caused by: java.lang.ClassNotFoundException: com.alibaba.nacos.api.naming.NamingMaintainService
- [unity] Android package error java.lang.ClassNotFoundException Did not find class com.unity3d . player.MainActivity
- Creating Java Web projects with idea
- Error report in idea compilation Error:Android Dex : [Project] java.lang.OutOfMemoryError : GC overhead limit exceeded
- java.lang.ClassNotFoundException : com.mysql.jdbc . driver project cannot connect to database, exception, lack of MySQL driver
- Tomcat memory overflow in Eclipse: Java. Lang. outofmemoryerror: permgen space solution:
- java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @Context