Most voted "hibernate" questions
Hibernate is a framework for object-relational mapping written in the Java language, but is also available in . Net as the name Nhibernate.
Learn more…934 questions
Sort by count of
-
0
votes2
answers2968
viewsError org.hibernate.Lazyinitializationexception
Error when the drive class is filled with data in the database, if there is no record, I can access my xhtml normally. In the class I count with fetch = Fetchtype.EAGER, but in the class drive this…
-
0
votes0
answers47
viewsLong-time running integrity of Java application
I have tested my Desktop application, and noticed that when I leave running for a long time I notice changes in the behavior of the actions that should be performed. My application runs using…
-
0
votes1
answer129
viewsProblems (Vraptor + Hibernate request)
I’m using the Vraptor to develop a web application. More in certain tests, I saw that the Hibernate is adding in the database, but when I send the Result to my page with a new list of that object I…
-
0
votes1
answer44
viewsType problem with Projectionlist in criteria
I’m having a problem in java giving the following error: in class: com.app.myApp.ReportDTO, setter method of property: indicator expected type: java.lang.Double, actual value:…
-
0
votes0
answers174
viewsDoubt when generating REST of return of Procedure in jersey
I have a method where his return is a list, based on an execution of a trial in the bank StoredProcedureQuery spq = em.createStoredProcedureQuery("PROCEDURE"); .... The return of this query are some…
-
0
votes2
answers2013
views -
0
votes1
answer66
viewsProblem with SUM in Namedquery
I have the following NamedQuery: @NamedQuery(name = "Controle.listarTotais", query = "SELECT controle.prestador, controle.tipoPrestador, SUM(controle.valorLote), SUM(controle.valorPago),…
-
0
votes0
answers285
viewsHibernate, JPA and SQL Server ERROR
I can’t get my application up. Below the stack, persistence and pom. Stack 22:25:32.131 [main] ERROR o.h.tool.hbm2ddl.SchemaExport - HHH000231: Schema export unsuccessful…
-
0
votes0
answers200
viewsProblem setting value of a mysql BIT field
Use Java + Hibernate in my systems, I created an attribute boolean to determine whether a user is an administrator: private boolean isAdmin; The Hibernate generates tables and fields, and this isAdm…
-
0
votes0
answers72
viewsNull Field Error - Java Web
In the project I am studying is based on the book "Java Programming for Web" where a strange error occurs, then the error arises after filling the entire form, where it appears in the log that the…
-
0
votes0
answers319
viewsUse same parent table id in daughter - Hibernate
I’m having trouble setting up and treating the use of ID in parent/child classes using Hibernate. I get everything to work properly when the record does not exist in the parent table (records are…
-
0
votes2
answers105
viewsProblem entering data into database
I am trying to insert a mass of data into the Mysql database using Hibernate. However I have the following error: 18:15:30,221 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread…
-
0
votes1
answer52
viewsDoubt (hibernate) - JSF
I’m making an employee register, and this register already has departments registered in the bank. So, at this point I walk through the database to present the data in the view, but when I finish…
-
0
votes2
answers680
viewsHibernate jumping id sequence
I managed a project by JHipster who uses Java, Spring and Hibernate in backend, I created a class as follows: Liquibase: <changeSet id="20160504131602" author="jhipster"> <createTable…
-
0
votes0
answers212
viewsOn call to Entityidentifierreaderimpl#resolve, Entitykey was already known; should only happen on root Returns with an optional Identifier specified
Using Hibernate with class: Java text. package br.com.meusite.model.documento; @Entity public class Texto extends ABeanDao<Texto> { private static final long serialVersionUID = 1L; private…
-
0
votes1
answer76
viewscommandLink does not link to the screen
I’m starting with sf and I’m having a problem with this project. The following command does not create the link on the screen I need to go to the next page, just gives me "New user" written on the…
-
0
votes0
answers248
viewsEntities export error - Hibernate
Good afternoon, everyone! I’m trying to create the database tables from the entities I created in the project. When I ask to create the tables and display the database creation script by Eclipse I…
-
0
votes1
answer700
viewsHow can I get an Entitymanager from an org.hibernate.Session
I work with Hibernate using Session. public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); // A SessionFactory is set up once for an application…
-
0
votes0
answers87
viewsGoogoostatementcache - Multiply Prepared statement!
Hello, when changing an object and saving I am having problems of slowness and in a few moments even totally locks my application. By persisting is returning me only this information, but I could…
-
0
votes1
answer536
viewsUni-directional Onetomany mapping with 3 classes using 1 single class
Good night, I have the following structure: @Entity public class Endereco { private String logradouro; private String numero; private String cep; private String bairro; private String complemento; }…
-
0
votes0
answers78
viewsDatetime Angularjs x Java x Mysql Persistence
I created an application in our company to control the use of certain equipment of our industry. The fact is that there was a need to control the date/time of entry and exit of a product in a…
-
0
votes2
answers199
viewsLoad objects from other classes
I have a selectOneMenu which will be used to list all Generations (data in the database). These data should be listed when registering a Nature object. My selectOneMenu is like this :…
-
0
votes0
answers360
viewsPersistence.xml file does not find class of the Provider tag
I’m creating a JPA + Maven Hibernate project. I put the required statements in pom.xml, and the project downloaded the Hibernate dependencies, but when configuring the Provider tag of the…
-
0
votes1
answer18
viewsSyntax error in SQL when starting OW2 Orchestra
I recently downloaded the OW2 orchestra software. In the user manual, after going through all the configuration steps (I’m using Mysql as my BD. The other settings are the defaults, including the…
-
0
votes1
answer149
viewsInjected object but is null
I have an object that is injected into my converter : package br.com.pokemax.modelo.converter; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import…
-
0
votes1
answer65
viewsInjection of dependencies failure
I am new to the world of Hibernate and when I run this application, I get the following exception (error refers to persist EntityManager): java.lang.NullPointerException Caused by:…
-
0
votes0
answers64
viewsProblem with JSF & JPA Lists
I don’t know if it’s right the way I’m doing it, but I got a problem: java.lang.Illegalargumentexception: id to load is required for loading. When I try to remove a template from the list, and also…
-
0
votes1
answer56
viewsCreate selects with Hibernate criteria Generico
I’m making a web software, administrative, it has several graphs and several tables, the problem with that is that several graphs and tables generate many queries to the database, and with that,…
-
0
votes2
answers1507
viewsJava and Hibernate date formatting
Good morning, everyone! I am trying to return a formatted date, is in the database as date, but for return could be a string msm. Some friends have indicated two modes, either creating a new method…
-
0
votes1
answer367
viewsOptimization Inserts Hibernate when there is relationship @Manytomany
Imagine the relationships: User has Many Permissions Permission has Many Users We can create a relationship of N para N as follows: User class. public class User { /*Many attributes here*/ private…
-
0
votes1
answer539
viewsJPA-HIBERNATE : I understood the conjunctions and disjunctions ? Is that right?
I took some JPA booklets and read some tutorials on the internet, but I’m still a little lost with regards to disjunction and Conjunction in JPA. From what I understood the conjunction serves to…
-
0
votes1
answer2056
viewsorg.hibernate.Queryexception: could not resolve Property: Request of: Classes.Client
I’m having trouble mounting a query in HQL in Hibernate,: Exception in thread "AWT-Eventqueue-0" org.hibernate.Queryexception: could not resolve Property: Request of: Classes.Client [select c from…
-
0
votes2
answers174
viewsHow to load persistence.xml settings in Combopooleddatasource?
I configured C3P0 via persistence.xml, however, when I try to recover the configuration values via Combopooleddatasource the received values are different from what was configured in the…
-
0
votes1
answer93
viewsHibernate Mapping - One to Many/One to One/etc - Explanation
Basic example to understand how Hibernate mapping works. Table Person Sex table The mapping for these tables generates: Sex: public class Sexo implements java.io.Serializable { private Integer…
-
0
votes1
answer50
viewsReferences lost at persistence time
Below follow my entities and their relationships: Order: @Entity @Table(name = "encomenda") @XmlRootElement(name = "objeto") @XmlAccessorType(XmlAccessType.FIELD) public class Encomenda { @Getter…
-
0
votes2
answers150
viewsAfter @Joincolumn JPA does not find Entity attribute
I have two entities that are directly related to @Entity State and @Entity City And my intention was to rename the foreign key present in the customer identity, for example, from 'city.stade_state'…
-
0
votes1
answer1469
viewsProblem while doing an update
Well I’m having difficulty to perform an update on my database it is presenting the following Exception. ERROR [org.springframework.security.web.Authentication.Usernamepasswordauthenticationfilter]…
-
0
votes0
answers79
viewsInvalid value: For input string:
Error while updating, the value of the field must be the FK code referring to a foreign key, in the form INPUT comes out the value br.com.tkcsapcd.model.bean.Projectionicio@7adacc20, no…
-
0
votes0
answers36
viewsHibernate documentation code not clear
My question is about a code that’s in the Hibernate documentation. I simply couldn’t understand the notation they used in the criteria.Where() part. Just notice how it was placed: Person_.name. Can…
-
0
votes1
answer88
viewsOrderby does not work in java
I have the following structure: a contract, has several additives then I have my contract class and my additive class in contract class, I call it: @OneToMany(mappedBy = "contrato", fetch =…
-
0
votes2
answers104
viewsJPA - Java does not insert data into the database
Bean @Named("proprietarioMB") public class ProprietarioBean implements Serializable { private static final long serialVersionUID = 1L; @Inject private ProprietarioService proprietarioService;…
-
0
votes1
answer349
viewsBuild List mapped with @Manytoone only with a few objects
It is possible to mount a list in a class with only a few objects? @NamedQuery(name = "Curso.Aprovados", query = "select cur from Classificacao cl JOIN cl.candidato ca JOIN ca.curso cur") public…
-
0
votes0
answers47
viewsCriteria Hibernate - Error
I’m getting the following Exception, I analyzed my code and I am not able to find the error. The query is performed and returns the objects, but when returning, launches the Exception.…
-
0
votes1
answer1391
viewsHow do I login?
I’m having a problem logging in. I have a simple page: I only need to consult in the database if the value informed by the user is equal. This one here: Model: @Entity public class User { @Id…
-
0
votes1
answer2589
viewsCreating the JPA/Hibernate "persistence.xml" file
I wonder if there is a way to setup the creation(s) of the persistence.xml at the time of project creation. Example of the aqruivo: <!-- propriedades do hibernate --> <property…
-
0
votes0
answers113
viewsHibernate: query performance drop after a few repetitions
I am developing a Farm Management system. One of the basic queries is to list the animals by type that are alive (inFarm = true). Below is the method that executes this query. public List<T>…
-
0
votes1
answer136
viewsHow to save a csv using Hibernate and mysql
I need the following routine to be done: Read some information from the database; Generate a csv based on this data; Write this csv to the database; Start downloading this file to the user. I was…
-
0
votes0
answers134
viewsUpdate Hibernate
The situation is as follows, when placing the property <property name="hibernate.hbm2ddl.auto" value="update"/>, nothing else works, no query works anymore. log always ends with : jul 27, 2017…
-
0
votes1
answer153
viewshelp with nativeQuery
I tried to query uasndo Expression constructors and jpql , but jpql does not subqueryes and I am , so I try to do with nativeQuery . It is possible? I am getting error message. Would anyone know…
-
0
votes0
answers89
viewsProblem with Hibernate and Wildfly server
Hello. I have a project with Hibernate 4.3.x + Postgresql + Wildfly. But I can’t run it. Follow the error: Iniciando WildFly Application Server WildFly Application Server iniciado Implantação…