Unable to create requested service [org.hibernate .engine.jdbc.env.spi.JdbcEnvironment]-MySQL

Upgrade MySql driver to mysql-connector-java – 8.0.17 and Those who are using greater than MySQL 5.5 version change their driver property from com.mysql.jdbc.Driver to com.mysql.cj.jdbc.Driver because: Loading class com.mysql.jdbc.Driver. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.INFO – HHH000401: using driver [com.mysql.jdbc.Driver] at … Read more

What is difference between CrudRepository and JpaRepository interfaces in Spring Data JPA?

JpaRepository extends PagingAndSortingRepository which in turn extends CrudRepository. Their main functions are: CrudRepository mainly provides CRUD functions. PagingAndSortingRepository provides methods to do pagination and sorting records. JpaRepository provides some JPA-related methods such as flushing the persistence context and deleting records in a batch. Because of the inheritance mentioned above, JpaRepository will have all the functions of CrudRepository and PagingAndSortingRepository. So if you don’t need the repository to … Read more

No more data to read from socket error

For errors like this you should involve oracle support. Unfortunately you do not mention what oracle release you are using. The error can be related to optimizer bind peeking. Depending on the oracle version different workarounds apply. You have two ways to address this: upgrade to 11.2 set oracle parameter _optim_peek_user_binds = false Of course underscore parameters … Read more

“NoClassDefFoundError: Could not initialize class” error

When I run my project, I get numerous outputs of this error: Sep 9, 2009 8:22:23 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet Jersey threw exception java.lang.NoClassDefFoundError: Could not initialize class SpringFactory at com.point2.prospect.persistence.hibernate.HibernateTransactionInterceptor.doFilter(HibernateTrans actionInterceptor.java:17) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.point2.prospect.restapi.ServerErrorInterceptor.doFilter(ServerErrorInterceptor.java:27) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) … Read more

“NoClassDefFoundError: Could not initialize class” error

When I run my project, I get numerous outputs of this error: Sep 9, 2009 8:22:23 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet Jersey threw exception java.lang.NoClassDefFoundError: Could not initialize class SpringFactory at com.point2.prospect.persistence.hibernate.HibernateTransactionInterceptor.doFilter(HibernateTrans actionInterceptor.java:17) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.point2.prospect.restapi.ServerErrorInterceptor.doFilter(ServerErrorInterceptor.java:27) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) … Read more

Spring boot – Request method ‘POST’ not supported. Tried everything

Following might help. While you deploy the application, spring boot displays all the available services on the console. Check the POST method to create is being displayed or not. Check that there shouldn’t be any contradiction with other services. GET/PUT/POST If there are services not deployed, try adding ‘/’ before other services – GET, PUT, … Read more

BeanFactory vs ApplicationContext

The spring docs are great on this: 3.8.1. BeanFactory or ApplicationContext?. They have a table with a comparison, I’ll post a snippet: Bean Factory Bean instantiation/wiring Application Context Bean instantiation/wiring Automatic BeanPostProcessor registration Automatic BeanFactoryPostProcessor registration Convenient MessageSource access (for i18n) ApplicationEvent publication So if you need any of the points presented on the Application Context … Read more