Questions tagged as 'hibernate'

2
answers

Hibernate does not close connections / sessions in DB

I'm having a problem using Hibernate. Each time I call a method that performs a query or update in the database, hibernate opens a session in the database and then does not close. I have tried everything, but really every time it is called the e...
asked by 15.09.2017 / 04:52
0
answers

Auto search (Auto complete search)

Good afternoon! I'm trying to implement an auto complete search on my system. But so far I have not achieved a satisfactory result. What I want is when the user search goes showing the result, as google does. I already tried it, I already tried...
asked by 06.09.2017 / 22:59
0
answers

JPA with "detached entity passed to persist:"

Hello, I have a problem because I use an intermediate table to save the IDs of 2 other tables. I'm not sure what to do with JPA, but I'm not sure what to do, but I'm not sure how to do this. instance.setDtCriacao(new Date(System.currentTimeMill...
asked by 30.08.2017 / 16:16
1
answer

Tomcat v8.5 does not boot, displays error: Child container failed during start

I'm doing a college work, a simple crud with JSF2, Hibernate, Primefaces and CDI. But at the moment I'm going to start the project in Tomcat I get the following error: GRAVE: A child container failed during start java.util.concurrent.Execution...
asked by 27.08.2017 / 19:01
1
answer

Query hibernate logic

public boolean minimoUmSuperUsuario(Usuario usuario, Session sessionExterna) throws HibernateException { Criteria crit = sessionExterna.createCriteria(Usuario.class); return (Long) crit.uniqueResult() > 0; } I need to do the follow...
asked by 23.08.2017 / 15:11
1
answer

Error using Hibernate to generate tables and doubts about

I'm creating a webservice using Maven to manage the dependencies of my project. I'm currently trying to create a database based on my templates. I have four questions and one problem in my attempt: 1) How do I get Java to create Foreign Key?...
asked by 04.09.2017 / 14:34
0
answers

hibernate.properties not found

GeraTabela class with main method package br.com.drogaria.main; import br.com.drogaria.util.HibernateUtil; public class GeraTabela { public static void main(String[] args) { HibernateUtil.getSessionFactory(); System.out....
asked by 22.08.2017 / 18:00
0
answers

Hibernate does not save oneToMany

I have a relation 1 - > n between Connection and Reporting. The classes are as follows: @Entity @Table(name = "conexao") public class Conexao { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "CONEXAO_ID", unique = tr...
asked by 14.08.2017 / 13:26
1
answer

Problem with connection bank firebird hibernate

I have an application in java that provides rest services with servlets and hibernate, which at first works perfectly. I can make thousands of requests to various services that retrieve information in firebird base that it responds very well ......
asked by 08.08.2017 / 21:53
0
answers

Update Hibernate

The situation is as follows, when you put the <property name="hibernate.hbm2ddl.auto" value="update"/> property, nothing else works, no query works anymore. the log always ends with : jul 27, 2017 8:28:18 PM org.hibernate.resource...
asked by 28.07.2017 / 01:33