Demystifying the Top 10 Spring Annotations for 2024
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
INFO: Marking servlet [dad-frontController] as unavailable Oct 22, 2021 6:31:27 PM org.apache.catalina.core.StandardContext loadOnStartup SEVERE: Servlet [dad-frontController] in web application [/home.com] threw load() exception java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
Servlet /webapp threw load() exception or
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
SEVERE: Servlet [Controller] in web application [/myfirst-mvc-project] threw load() exception
I have got the below error while running my First Spring Web MVC application using Tomcat Server.
The error log in the Console is:
INFO: Marking servlet [dad-frontController] as unavailable
Sep 30, 2021 10:34:12 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet [dad-frontController] in web application [/myfirst-mvc-project] threw load() exception
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
Read more..
cvc-id.3: A field of identity constraint 'web-app-servlet-name-uniqueness' matched element 'web-app', but this element does not have a simple type.
The above error will occur in your web.xml while writing Servlet Code or Spring WebMVC code.
The Error should be
cvc-id.3: A field of identity constraint 'web-app-servlet-name-uniqueness' matched element 'web-app', but this element does not have a simple type.Read more..
class path resource [beans.xml] cannot be opened because it does not exist
ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
Caused by: java.io.FileNotFoundException: class path resource [beans.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:187)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:333)
... 13 more
Solved: Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
when i run my Simple Spring Boot Application i have faced the below exception in the console.
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[na:na] ... 32 common frames omitted
The JAXB APIs are considered to be Java EE APIs and therefore are no longer contained on the default classpath in Java SE 9. In Java 11, they are completely removed from the JDK. Java 9 introduces the concepts of modules, and by default, the java.se aggregate module is available on the classpath (or rather, module-path).
strip only the numbers from any formatted string of phone number
123-456-7890
so we can read these type of characters and returns only the numbers using java method isDigit from Character class.
Display first fetter of a word with Capital letter in a given Sentence or String
convert .pem file to .ppk using puttygen - AWS
while creating an instance in Amazon EC2 you will be required to create Key Pairs and .pem file will be generated. I have shown in the below images how to convert .pem file to .ppk file format using puttygen in the below images.
Java Program to Print Square Pattern with Stars
How to run two Tomcat Instances on same machine
"Port 8080 required by Tomcat v8.0 Server at localhost is already in Use."
![]() |
Java - Unable to Split a String on Caret (^) symbol as a delimiter
Java Program to find Perimeter of a Circle
Java Program to Calculate Area of a Circle
area = pi * radius * radius
Can I write a Java program without main method ?
Default value of primitive data types in Java
![]() |
Program to find max repeated or duplicate words from a text file
In the earlier post we have gone through How to read a file using BufferedReader and Scanner.This would give you a basic idea to read a file through the Streams. And the related post to this current program best way to find repeated characters from a String also helpful to understand the maximum repeated words from the given text file. Here i am using BufferedReader and FileInputStream to read a file, if the file does not exists this throws an exception FileNotFoundException.













