Hibernate : Strange TypeCast Exception Thrown While retrieving records in Java from postgres database table 2 QuerySyntaxException : Hibernate not recognizing the postgres query syntax in java I am getting the following exception while fetching data from DB using hibernate in spring mvc. SEVERE: Servlet.service() for servlet [spring] in context with path [/DemoApp] threw exception [Request I’ve a spring app with hibernate which is connected to MariaDb. When I try to perform some delete operation using NativeQuery on a table I’m getting java.sql.SQLException: Deadlock found when trying to get lock; try restarting transaction this exception. I don’t get this exception everytime, looks like it is happening only when we have lot of requests that performs the delete operation I have a class in hibernate called App.java in which i am using another Object Alien.java(A pojo object) to insert object into DB. And i have a configuration file, in which i have done DB related 1. Add a comment. -1. The problem is in your database field's name. You can fix it by using @Column (name = "Field's name") Ps: "Field's name" should match the column name in your database. Share. Improve this answer. The problem I have only occurs when i set the "hibernate.hbm2ddl.auto" to validate or update. When i try to create the Database it succeeds. I'm trying to make a custom user FOO_Admin that can be Spring JDBC Template provides a fluent API that improves code simplicity and readability and the JDBC Template is used to connect to the database and execute SQL Queries. JDBC (Java Database Connectivity) is an application programming interface (API) that defines how a client may access a database. It is a data access technology used for Java Until Hibernate 3.x, all exceptions thrown by Hibernate were checked exceptions, so every Hibernate API forced the developer to catch and handle exceptions. This strategy was influenced by JDBC , which also throws only checked exceptions. However, it soon became clear that this doesn’t make sense, because all exceptions thrown by Hibernate Learn how to access a database with JPA and Hibernate using the Micronaut framework. 1. Getting Started. In this guide, we will create a Micronaut application written in Java. In this guide, we will write a Micronaut application that exposes some REST endpoints and stores data in a database using JPA and Hibernate. 2. Hi Hanna, I'm sorry, but I don't remember what has caused the issue and how I fixed it two years back. Though the SQL DB View that was used as the source for the upsert was not in a good shape. wFgMW.