Questions tagged as 'hibernate'

1
answer

org.hibernate.console.HibernateConsoleRuntimeException: NoClassDefFoundError

I'm trying to test an application with hibernate, but I'm having a lot of problems when it comes to configuring it. At the moment I have managed to generate the file hibernate.cfg.xml, hibernate.reveng.xml and the object of Hibernate Console Con...
asked by 15.08.2016 / 09:19
1
answer

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 JSF

I have this xhtml code: <div class="row"> <div class="col-lg-5 col-md-5 col-sm-12 col-xs-12"> <div class="input-group"> <h:inputText p:placeholder="Nro Documento" class="form-control" value="#{BeanP...
asked by 15.06.2016 / 16:01
0
answers

Hibernate: @ValueGenerationType within an EmbeddedId does not work when doing INSERT

I am trying to add to my project (use Spring 5.0.2, Spring-data-jpa 2.0.5 and Hibernate 5.2.14) a new annotation that allows me to obtain the date directly from the database (Postgresql) instead of the VM. For this, I have taken as my base th...
asked by 11.11.2018 / 20:31
1
answer

How to store a list in Hibernate

Here is the Container class with the PlazasBlock List that I want to store in hibernate @Entity @Table(name = "CONTENEDOR", uniqueConstraints = { @UniqueConstraint(columnNames = "IdContenedor")}) public class Contenedor implements Serializable...
asked by 09.10.2018 / 07:43
0
answers

Hibernate performs unwanted queries (@ManyToOne)

I have an entity A linked to B with a ManyToOne relation, of type Lazy public class A extends BaseEntity { @Enumerated(EnumType.STRING) private TipoTurnoEnum tipo; private String number; private String state; private Date date; @JoinColumn(...
asked by 09.10.2018 / 20:13
0
answers

Problem when uploading image to server with Spring java

It's been 2 days without being able to solve this and I see no other recourse here, the problem is that I try to upload the image to server with the java spring framework and place the path of its location in the database, but when sending it I...
asked by 27.09.2018 / 18:01
1
answer

Problem with OneToOne relationships in Hibernate

I'm learning how to use the Hibernate framework, I'm in OneToOne relationships, the problem I have is that when doing the bidirectional relationship, I miss a NullPointerException and I do not know what the failure might be. Employee: packa...
asked by 05.09.2018 / 16:36
0
answers

org.springframework.beans.factory.UnsatisfiedDependencyException when I do @Autowired

I have a problem when publishing my project on my server, I have tried several solutions and none of them worked, I have all the annotations correctly as well as the XML configuration so I must be ignoring something. UserController.java @...
asked by 05.08.2018 / 09:56
1
answer

API REST WITH Spring Boot JPA AND HIBERNATE

I have a project where we are doing a restfull service with: Spring boot JPA JDBC WEB SPRING (MVC) Hibernate Well currently I do not have much experience with hibernate in the onetomany relationship. The detail is that for exam...
asked by 01.06.2018 / 08:20
1
answer

Close session in hibernate when returning an ArrayList

I have a problem wanting to close a session in hibernate. I enclose the code that works for me public ArrayList<Empresa> getEmpresas() { Session session = null; SessionFactory sesion = HibernateUtil.getSessionFactory(); se...
asked by 21.06.2018 / 07:15