Questions tagged as 'jpa'

1
answer

Inheritance with jpa

Hello, I have a class called Usuario which is abstract and I have the class UsuarioComum and Administrador that inherit from Usuario , I am using JPA annotations to generate the automatic database, I want it to generate...
asked by 07.12.2014 / 02:19
1
answer

Rendered of primefaces giving error when retrieving entity boolean

Does anyone know why rendered graphic image is giving error? <p:dataGrid columns="3" value="#{projetistaBean.listaDeProjetistas}" var="projetista" styleClass="ui-datagrid" > <h:commandLink>...
asked by 05.08.2014 / 17:11
1
answer

Handling Database Exceptions

How to handle database exceptions with JPA? And, how to use annotations in place of the IMessage interface, as below? Example: My database returns the error: "Violation constraint uk_email"; Get the constraint of the error message (uk_e...
asked by 04.07.2014 / 03:52
2
answers

___ ___ erkimt Unable to build entity manager factory (JPA Hibernate) ______ qstntxt ___

I am trying to make a connection with Hibernate and JPA, but when trying to create the connection or persist some data it executes the following error:

  

Dec 04, 2018 2:02:45 PM org.hibernate.ejb.HibernatePersistence   WARN: logDeprecation HHH015016: Encountered to deprecated   javax.persistence.spi.PersistenceProvider   [org.hibernate.ejb.HibernatePersistence]; use   [org.hibernate.jpa.HibernatePersistenceProvider] instead. Dec 04, 2018   2:02:45 PM org.hibernate.ejb.HibernatePersistence logDeprecation WARN:   HHH015016: Encountered to deprecated   javax.persistence.spi.PersistenceProvider   [org.hibernate.ejb.HibernatePersistence]; use   [org.hibernate.jpa.HibernatePersistenceProvider] instead. Dec 04, 2018   2:02:45 PM org.hibernate.ejb.HibernatePersistence logDeprecation WARN:   HHH015016: Encountered to deprecated   javax.persistence.spi.PersistenceProvider   [org.hibernate.ejb.HibernatePersistence]; use   [org.hibernate.jpa.HibernatePersistenceProvider] instead. Dec 04, 2018   2:02:45 PM org.hibernate.jpa.internal.util.LogHelper   INFO: HHH000204: LogPersistenceUnitInformation   PersistenceUnitInfo [name: context ...] Dec 04, 2018 2:02:45 PM   INFO: HHH000412: hibernate Core   {4.3.0.Final} Dec 04, 2018 2:02:45 PM org.hibernate.cfg.Environment    INFO: HHH000206: hibernate.properties not found Dec 04, 2018   INFO: 2:02:45 PM org.hibernate.cfg.Environment buildBytecodeProvider   HHH000021: Bytecode provider name: javassist Dec 04, 2018 2:02:45 PM   org.hibernate.annotations.common.reflection.java.JavaReflectionManager    INFO: HCANN000001: Hibernate Commons Annotations   {4.0.4.Final} Dec 04, 2018 2:02:45 PM   org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl   configure INFO: HHH000402: Using Hibernate built-in connection pool   (not for production use!) Unable to build entity manager factory

My pom.xml

%pre%

My persistence.xml

%pre%

My Main class

%pre%     
______ azszpr348573 ___

I am trying to make a connection with Hibernate and JPA, but when trying to create the connection or persist some data it executes the following error:    Dec 04, 2018 2:02:45 PM org.hibernate.ejb.HibernatePersistence   WARN: logDeprecation H...
asked by 04.12.2018 / 18:06
1
answer

How to create a business rule by JPA?

I need to implement a business rule that ensures that the same employee represented by the Employee table can not be added more than once to the same project represented by the Project table. Let me give you an example; Let's assume we ha...
asked by 17.09.2018 / 21:11
1
answer

Hibernate Does Not Delete

Good night guys ... I'm learning Hibernate and had a problem: I was able to insert, retrieve the DB data ... I had a setback that I corrected by adding the following command line in the RUN settings: --add-modules java.xml.bind But at th...
asked by 27.07.2018 / 03:07
1
answer

Remove objects that are linked to the list of others

I have a problem removing an object. What is causing: I have two tables - > PROCEDURE and SECTOR: I can create normal sectors, save, edit, delete and add procedures to the list of each sector created, until then OK. But my problem is that...
asked by 01.06.2018 / 18:39
1
answer

Error when making Many to Many relation with Spring Boot

I am trying to make a Many-to-Many link between the usuario and permissao classes, using the hibernate as a reference. But when I try to generate a JSON file of class usuario the program loops and generates an unexpected f...
asked by 19.05.2018 / 00:21
2
answers

Extract JDBC Connection from EntityManager using JTA

In a JavaEE environment, is it possible to extract the JDBC connection ( java.sql.Connection ) using JTA ? I have a datasource in WildFly, where I inject as follows: @PersistenceContext private EntityManager entityManager;...
asked by 08.01.2018 / 19:47
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