Questions tagged as 'jpa'

1
answer

Do not re-enter a user with an existing login

I have a problem with JPA with Java. I made a login system, using a self-generated ID, but every time I run the program it creates another user in the database, with a different id but same credentials. How do I, if this user login already...
asked by 23.11.2018 / 03:00
0
answers

Spring MVC I Error in JPA EntityManager

Hello, the code below is giving error: import javax.persistence.EntityManagerFactory; import org.springframework.context.annotation.Bean; import org.springframework.jdbc.datasource.DriverManagerDataSource; import org.springframework.orm.jpa.Jp...
asked by 18.11.2018 / 03:02
1
answer

JPA, Hibernate, Spring MVC, Maven - Definition

I have many doubts in definitions! My goal is to build an architecture of a system, but the definitions of JPA, HIBERNATE, SPRING MVC, MAVEN, are obscure. JPA: Nothing is more than a specification (ok) Hibernate: Persistence Provider,...
asked by 24.06.2016 / 01:57
0
answers

Error inserting second datasource with GenericDAO

I'm trying to insert a second base in persistence.xml. I have already configured the datasource in jboss and tested it. When inserting a second persistence-unit in xml and attempting to raise jboss the error below occurs. I tried to set the @Pe...
asked by 12.11.2018 / 21:03
1
answer

Doubt about foreign key hibernate

insert the image description here The diary_place table is being created with 2 user_id field, I want it to be only a user_id referenced as foreign key for the diary and place tables. I want the result to be the same as the second ima...
asked by 07.11.2018 / 19:35
1
answer

How to solve: Column "id" not found [42122-197]?

Folks, I'm creating an API that will display random phrases, from a table in the database. The problem is that whenever I access the route, in the console, I get this exception:    org.h2.jdbc.JdbcSQLException: Column "id" not found [42122...
asked by 01.11.2018 / 02:08
0
answers

Can not create instance for class: [...] EclipseLink, JPA, JavaDB

I'm trying to create a project with JPA + EclipseLink + mysql. After instantiating my CandidatoService, I get the following error: com.sun.faces.mgbean.ManagedBeanCreationException: Não é possível criar instância para·a classe: bean.Candidatos...
asked by 16.11.2018 / 17:35
0
answers

APPLICATION FAILED TO START: Persistent error when starting the application

Full Project: link I'm developing an application with Spring Boot, and when I started the application I ended up finding an error that I could not resolve after hours of searching. Error starting ApplicationContext. To display the condi...
asked by 05.11.2018 / 16:25
1
answer

Insert record into a table and use newly generated ID to insert record into related table

I have insert where I save a record, and I need to use the result of the value saved in another insert . Empresa emp = new Empresa(); emp.setId(1); emp.setNome("Nome da empresa"); repository1.saveAndFlush(emp); RelacaoEmp relEmp...
asked by 17.10.2018 / 16:32
0
answers

Hibernate: Error after Entity change and warning when cleaning and building

Good evening After changing an entity that inherits a @MappedSuperclass my code started giving error. When trying to clean and build it the following warning appears: Note: Hibernate JPA 2 Static-Metamodel Generator 5.1.12.Final warning: Th...
asked by 10.10.2018 / 03:25