Questions tagged as 'jpa'

1
answer

I can not save to the database, nor does it show error logs in the hibernate project

In the project I use hibernate , and when I try to save a new client, it only shows the validation message of the CadastroClienteService class. The strange thing is that all fields are filled in form, it seems null pointer , b...
asked by 20.03.2016 / 19:27
1
answer

How do I make a basic configuration in the persistence.xml file to access a database in SQL Server 2008?

I looked into how to configure the persistence.xml file in a basic way, but I was even more confused about this configuration. So, I'd like to know how I can do a basic configuration in the persistence.xml file according to JPA...
asked by 01.04.2016 / 21:04
1
answer

Error with hibernate when running server

When running wildfly I have the following error excerpt in the log: 15:46:18,297 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."evolutionary.war".WeldStartService: org.jbos...
asked by 30.05.2016 / 20:50
1
answer

Persist array of JPA objects

I'm trying to persist a ArrayList of Entity in JPA with the following for : EntityManagerFactory emf = Persistence.createEntityManagerFactory("PU"); EntityManager em = emf.createEntityManager(); em.getTransaction().begin();...
asked by 30.10.2015 / 13:15
1
answer

AND and OR Operators

I recently started using the Criteria API because I need to make queries that would be very complex with HQL. How do I use the AND and OR operators in queries with the Criteria API?     
asked by 29.10.2015 / 03:50
1
answer

Null object fields when trying to persist with JSF and JPA

I'm trying to persist an entity and when I try to persist it throws a constraint violation error, performing the debug, I noticed that the object is instantiated because the fields are null. Entities: @MappedSuperclass public abstract class...
asked by 06.11.2015 / 01:23
2
answers

JPA Error with Wildfly - No Persistence provider for EntityManager named Project

Hello I am creating a very simple test application, using JPA, Wildfly as an application server and Oracle Database 11g Express Edition as a database. The intent of the Test class is to run a People query. Whenever I run the Test class, th...
asked by 20.09.2015 / 14:53
1
answer

How do I populate an arraylistType with a result fetched from the mysql database using Hibernate?

On many topics I see a piece of code I can not reproduce: Query query = session.createQuery() I can not create this session object with the createQuery () method as an option. Can someone show me an example of how to populate an ArrayList...
asked by 05.09.2015 / 16:16
1
answer

The find () method of my DAO Generic entityManager is giving NullPointer, how to fix it?

The change from my DAO looks like this: private EntityManager entityManager; public void alterar() throws Exception { System.out.println("T encontrada"); System.out.println("iniciando Alterar id: " + this.getId()); System.out.prin...
asked by 20.08.2015 / 22:20
2
answers

java.lang.String can not be cast to com.sisEnade.tcc.modelo.Questao

Good afternoon. I'm having the following error: java.lang.String can not be cast to com.sisEnade.tcc.modelo.Questao However, I could not resolve the error. The purpose of the implementation is to create a filter, to bring to the user que...
asked by 12.10.2015 / 19:08