Questions tagged as 'hibernate'

2
answers

Configuring Hibernate transactions only with Jersey API annotations

I want to use something similar to org.springframework.transaction.annotation.Transactional of Spring that sets up a Transaction only using only the Jersey API. Something similar to the code below: @Resource private SessionFactory facto...
asked by 17.02.2014 / 20:36
1
answer

How to make hibernate read a table in a MySQL database and write to another table in PostgreSQL?

I need to query a database in MySQL and get a table from there to write to a PostgreSQL database through Hibernate / JPA. I configured persistence.xml as follows: <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="ht...
asked by 12.02.2016 / 22:14
3
answers

Data deletion via Hibernate

In the database used by my application I have a table that I defined as temporary that I write some data but at the end of the process I no longer need the information registered in that table, how should I make this table be cleaner would it be...
asked by 29.12.2015 / 12:05
2
answers

How do I persist the String of an Enumerator in the Database?

I have the following Enumerator: public enum ETipoCasa{ Propria, Alugada, Financiada, Cedida; } And I'm trying to persist in the bank the String of this enumerator as the example: Casa casa = new Casa(); casa.setTipo...
asked by 02.07.2015 / 17:23
1
answer

JPA annotation @OneToMany or ManytoOne?

I have the Report Class public class Report{ private String nome; @ManyToOne @JoinColumn( name = "idpai", referencedColumnName = "id" ) private List<Report> subReports getters e setters... } My question is how t...
asked by 16.01.2018 / 13:08
1
answer

Slow JFrame Opening with Hibernate

Good morning everyone. I have a Swing application that has a JFrame using Hibernate 3 for persistence in MySQL BD on the network. When I go through NetBeans, it opens up pretty fast. But when I run jar built on another computer, this JFram...
asked by 26.07.2016 / 14:33
1
answer

User has exceeded the 'max_user_connections' resource (current value: 4)

I have a problem with the open connections in the database, where an error is occurring if the application tries to create more connections than the limit. Assuming that the application creates and closes the connections for each interaction in...
asked by 26.05.2016 / 20:14
2
answers

Error formatting date:

Hello, I am formatting the date with the following code: Date data = null; SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); try { data = format.parse(request.getParameter("txtdata")); } catch (Exce...
asked by 27.05.2016 / 22:44
1
answer

Why does the EntityManager not have the createQuery method with a typed return?

I'm following the Spring-MVC book project of House Do Code, using the latest version of Hibernate, 4.0.3. But at a time, when the book indicated the creation of a quoted query through the following code: // manager é um objeto da classe jav...
asked by 09.11.2015 / 21:58
1
answer

How to fix the "No Persistence provider for EntityManager named" error?

When I try to execute the Persistence.createEntityManagerFactory("Aluno") method of class Persistence I get the following error: run: abr 04, 2016 9:11:30 PM org.hibernate.ejb.HibernatePersistence logDeprecation WARN: HHH015016: E...
asked by 05.04.2016 / 02:29