Questions tagged as 'hibernate'

1
answer

Error trying to query via HQL

I have the following entities: import java.io.Serializable; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persis...
asked by 15.03.2018 / 17:50
0
answers

Execute PLSQL anonymous block with Hibernate

I need to run multiple function in Oracle with Hibernate FUNCTION ISNUMBER(value IN VARCHAR) RETURN NUMBER DETERMINISTIC AS RC NUMBER; BEGIN IF (value IS NULL) THEN RETURN 0; END IF; RC := TO_NUMBER(value); RETURN 1...
asked by 12.03.2018 / 19:12
0
answers

Error when searching the database using Java, Hibernate and Spring. Use of Beans and Autowired

I'm trying to search my program, but errors appear:    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'courseSpringDataApplication': Unsatisfied dependency expressed through field 'personReposi...
asked by 11.03.2018 / 22:26
0
answers

Error: "No Persistence provider for EntityManager"

I have a project in Eclipse with an application that persists in the Postgresql 9.6 database through Hibernate, but Java is not recognizing the persistence-unit name that is set in persistence.xml , even this name by checking with the name pa...
asked by 17.03.2018 / 09:59
0
answers

Error uploading Maven application using Hibernate: org.apache.openejb.OpenEJBException

I'm having problems uploading my application to tomcat7 with maven managing dependencies. I know the error is due to not finding the class specified, but since I do not have much experience with hibernate, I would like to know: Is it necessary t...
asked by 09.03.2018 / 14:31
1
answer

Wrong time recording

I have these 3 classes as a template. Object: import java.io.Serializable; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; i...
asked by 08.03.2018 / 12:53
0
answers

Hibernate does not create table in database

The event model is an entity that must be created in the database, but hibernate is not creating. persistence.xml <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schem...
asked by 08.03.2018 / 22:32
0
answers

How to implement DataSource in Tomcat

I am finalizing a project that uses a REST server in Java, and is implemented in Tomcat, and I encounter a problem, the time it takes the service to implement a new connection (3000ms to 5000ms) of the bank, leading to a slow application. I s...
asked by 06.03.2018 / 13:06
0
answers

Hibernate should mount query only with the required joins

I have list with createCriteria on it I have several ifs to query only the parameters queried on the form, however, the hibernete by default at the time of the query assembly joins all tables that have constraints: select *from volume this_...
asked by 07.03.2018 / 21:13
0
answers

How to optimize Java connection with Postgres

My connection class to the database is taking a long time to open the connection, it takes almost 20 seconds. I use Hibernate and the Bank is Postgres running localhost. Am I doing something wrong? or to optimize and open faster? My class:...
asked by 28.02.2018 / 15:39