Powered by Blogger.

new features in java 23

>> Wednesday, December 4, 2024

As of the latest Java version (Java 23), key new features include previews for module import declarations, stream gatherers, scoped values, and a revised class-file API. Additionally, certain memory access methods within "sun.misc.Unsafe" have been deprecated. 
Highlights of Java 23 features:
Module import declarations (preview):
Allows importing all public APIs of a module with a single line, simplifying module usage. 
Stream gatherers (preview):
Provides a new "gather" intermediate operation for more flexible stream transformations. 
Scoped values (preview):
Enables sharing of immutable data across threads for better concurrency management. 
Class-file API updates:
Changes to the class file format, including potential modifications to how bytecode is represented. 
Deprecation of "sun.misc.Unsafe" methods:
Certain memory access methods within the "Unsafe" class are marked as deprecated, encouraging developers to use safer alternatives. 
https://www.infoworld.com/article/2338097/jdk-21-the-new-features-in-java-21.html 

Read more..

Demystifying the Top 10 Spring Annotations for 2024

>> Monday, December 4, 2023

Introduction:

Spring annotations are a powerful tool for autoconfiguring Spring and streamlining the wiring up of components. They serve as metadata that instructs Spring on how to process classes and methods. In this blog post, we'll delve into the top 10 annotations in the Spring framework that every developer should know.




Read more..

java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

>> Friday, October 22, 2021

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



follow the below steps when you face the above error while running the spring web or spring MVC application on your machine.

Read more..

SEVERE: Servlet [Controller] in web application [/myfirst-mvc-project] threw load() exception

>> Thursday, September 30, 2021

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

>> Wednesday, August 25, 2021


 

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



Solution:
There are two solutions

1. Take the beans.xml out of package and put in default package.
2. Specify package name of the file..
    ClassPathXmlApplicationContext("com/se/io/beans.xml");

 






Read more..

Related Posts Plugin for WordPress, Blogger...
© javabynataraj.blogspot.com from 2009 - 2022. All rights reserved.