Questions tagged as 'hibernate'

1
answer

WELD-001408: Unsatisfied dependencies for type ServiceLocator with qualifiers @Default

I'm trying to implement a JAX-RS (Jersey) server with DataSource, I've already migrated from Tomcat to GlassFish, and now from GlassFish to WildFly 11, but I'm having the error below that I can not find a solution. >    Caused by: org.jboss.we...
asked by 10.03.2018 / 15:39
1
answer

Reason for process delay and hibernate configuration (persistence)

I'm building a WS server with Java, and I'm seeing some problems, such as login via POSTMAN, it's taking between 6000 and 7500 ms to respond, which it actually does, is around 50 ms. After you can configure log4, most of the delay is in: or...
asked by 31.01.2018 / 17:34
1
answer

Error integrating Spring 4 + Hibernate 5 + JPA 2 and Glassfish

I am not able to start the Spring transaction, it is some configuration that made me wrong who can help me. follow the codes: java.lang.IllegalStateException: A JTA EntityManager cannot use getTransaction() at org.hibernate.internal.Abst...
asked by 25.02.2018 / 22:24
1
answer

Annotation @Version

Using the @Version Annotation, shows this error when trying to update.    18: 25: 16.650 [http-nio-8080-exec-84] ERROR   br.com.netsoft.controller.todos.AutomationMonetariaItemController -   Row was updated or deleted by another transaction (...
asked by 07.01.2018 / 13:49
1
answer

Selectonemenu Field (Primefaces) does not save on the bank

I come to ask for your help again, because I need to finish my CBT. I have dialog that has multiple fields, one of them is <p:selectOneMenu> . When I pre-select all the fields and save, the fields are all saved, except the...
asked by 28.11.2017 / 05:44
1
answer

How to cascate relationship?

I have a class mapped with hibernate, however, when saving an object the whole object is cascaded to the child table (which is expected). The problem is that equal objects are saved instead of just relating the child object to the parent object....
asked by 18.12.2017 / 17:43
1
answer

Distinc Criteria Hibernate java

I have the following context: class Entidade1 private Long id; private int commentId; private int userId; class Entidade2 private Long id; private String descricao; - I have the following criteria Criteria criteria = persistence.create...
asked by 29.11.2017 / 14:02
1
answer

Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements

Good Night. I have the following error in Hibernate:    org.hibernate.AnnotationException: Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements: bestroute.modelo.Peca.grupoPeca I can not display on...
asked by 01.10.2017 / 03:17
1
answer

Equivalent to sql function LEFT () in JPA

What is the equivalent function of LEFT () in JPA? I need to get only the first 6 characters of a field. The equivalent select in sql would be: select left(campo,6), count(*) qtd from tabela group by left(campo,6)     
asked by 11.08.2017 / 22:25
1
answer

Tables not being generated - Hibernate

I have 2 tables in my software that are not being generated correctly. SQL is generated, but when verifying in MySQL, not the meetings. If I change the tag to: <property name="hibernate.hbm2ddl.auto" value="validate"/> or <...
asked by 05.09.2017 / 14:16