Questions tagged as 'hibernate'

0
answers

Can not delete or update a parent row: a foreign key constraint fails

Class Answer public class Respuesta { @Id @GeneratedValue @Column(name = "id") private Long id; private String contenido; private int puntos = 0; private int likes = 0; private int dislikes = 0; @Cascade...
asked by 14.12.2018 / 22:08
1
answer

API REST java persistence onetomany

Hello friends, I'm going back to consult you again, and from now on I thank those who will take the time to respond and help me. Well I'm new in all this java, I tell you that I'm trying to generate a api rest with two related tables, I'm occupy...
asked by 09.12.2018 / 20:31
0
answers

TransactionRequiredException exception when executing an update: javax.persistence.TransactionRequiredException: Executing an update / delete query

I am trying to execute an update query to a database with hibernate but it turns out that it shows me the following transaction exception and does not update me. I'm working with jboss, hibernate. I've tried to follow up with transaction, begin,...
asked by 02.11.2018 / 21:28
1
answer

When a date type field is saved in the database, it is saved with a date from a previous day

I am programming an application with the following technologies: Java, Spring, Hibernate, Maven, Msql. The IDE that I am using is Eclipse. The problem that I am having is that when an entity persists, one of its properties is of Date t...
asked by 04.11.2018 / 03:22
0
answers

constraintviolationexception Duplicate field

The error is that when I create a user with the same alias I get the exception constraintviolationexception. I tried to perform a try catch on the controller method but it does not catch me and it continues to skip the exception User Class...
asked by 20.11.2018 / 10:41
0
answers

How can I make JPA not generate a CLASE_PK?

Having a Question table, and having another table called answers. My problem is that when using JPA to be able to do the mapping of the tables, I create the class question and the class answers, apart from that I create an additional class th...
asked by 25.10.2018 / 04:27
0
answers

org.springframework.beans.factory.BeanCreationException ERROR

I try to run my application in NetBeans and I get the following error. My mistake: Error creating bean with name 'BDEncuesta' defined in file [D:\adenbpo-reportes-encuestas-ms\target\classes\com\adenbpo\BDEncuesta.class]: Post-processing...
asked by 24.10.2018 / 04:19
0
answers

ExceptionInInitializerError

This is my HibernateUtil file: /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package proyecto2.db; impo...
asked by 23.10.2018 / 09:45
0
answers

InvocationTargetException when creating a session in Hibernate

I'm learning to use hibernate, and I do not know if it's bad luck but every tutorial I find and implement ends up giving me exceptions, even if they are official tutorials. My problem is that when creating a session and saving an object of ty...
asked by 17.10.2018 / 16:34
1
answer

Because I lose data when reloading the JAVA WEB page

I am new to this of hibernate and spring mvc, I have managed to show the data of the "users" table, the first time I load the URL If it shows me the data, but when reloading they disappear. code of the model class "UsersModel"...
asked by 14.10.2018 / 05:42