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
votes0
answers56
viewsError making associations in XML with Hibernate
I’m having trouble making associations Many-to-one. Any help I appreciate Exception in thread "AWT-Eventqueue-0" org.hibernate.Mappingexception: An Association from the table material refers to an…
-
0
votes0
answers206
viewsError while trying to connect sql server 2014 with Hibernate-core 5.2.7 Final
I am learning java with Ibernate. I am using Maven to manage the project. I can think of the following INFO error: HHH000206: Hibernate.properties not found as below in the image (click on the image…
-
0
votes1
answer889
viewsHow to Save Image in Database with JSF2
I’m with a project JSF with the model DAO using Hibernate, and I’m having a hard time understanding how to save the image in the database. I would just need to know what the method would look like…
-
0
votes1
answer118
viewsHibernate - Set foreign key object without seeking object. Direct by Id
Someone knows if it is possible for me to set an object that is a foreign key if I have to look for it. That is, just by setting the direct id? Example: low.setIdEmpress(daoEmpresa.buscaPorId(new…
-
0
votes1
answer32
viewsTo use Hibernatestatistics is required to create a Hibernate.cfg.xml?
I found nonsense, since usually the settings of Hibernate are allocated in the xml persistence. Can you recover the sessionfactory only using the settings of Hibernate allocated in persistence.xml ?…
-
0
votes0
answers43
viewsHow to implement Fileupload in a Hibernate project with JSF?
I’m with a JSF project with the DAO model using Hibernate, and I’m having a hard time understanding how to save the image in the database. I would just need to know what the method would look like…
-
0
votes2
answers725
viewsSolution of exceptions Serviceexception and Failed to execute Goal org.codehaus.mojo:exec-Maven-plugin:1.2.1:exec?
The following error is occurring: Serviceexception and Failed to execute Goal org.codehaus.mojo:exec-Maven-plugin:1.2.1:exec? I have already changed the name of the Provider from…
-
0
votes1
answer444
viewsSearch using two parameters in JPA
Good night to you all, I am stuck here in a logic, I did the DAO for all the CRUD of my project only that in it will not only have the search for the ID and I am also trying to do some method that…
-
0
votes1
answer85
viewsHelp on a JPA query
I’m trying to make a query using JPA criteria, it would be as follows: I will pass 2 Start date and a Final Date and a vehicle plate how can I make this query? NOTE: The table that I will consult…
-
0
votes1
answer172
viewsReturn person and phone list
I have an entity called Pessoa. This entity has a phone list of the entity Telefone. How do I bring the person information and popular the phone list of this person in a select with only hql? When…
-
0
votes2
answers432
viewsMerge using Hibernate without erasing other Java data
I use Hibernate in my Java application for database interaction using a controller class created even by Netbeans, but the problem I have is this: when making an edit in some field and only pass…
-
0
votes0
answers184
viewsINFO: Error Parsing HTTP request header
When submitting a form, I was testing how much information I can send via HTTP. I am using Mysql DBMS. I have an application that runs several textarea fields. Example: a form with 10 textarea (I…
-
0
votes2
answers1212
viewsFigure out which column would be truncated (date would be truncated)
good evening! When trying to enter a record in Sqlserver through my application I am getting a truncated data message. The problem is that there are many columns that this screen fills and I have no…
-
0
votes1
answer1770
viewsWhat settings are required to make spring boot generate tables automatically?
I am currently trying to configure my application with spring-boot to generate tables automatically but still do not know how, someone can help?
-
0
votes1
answer463
viewsusing Entitymanager to return a List
Guys, I’m having a problem at the bank looking for a list of phones, these phones have to belong to a number. in my query I do this public List<Telefone> buscar(Proprietario proprietario) {…
-
0
votes2
answers343
viewsjava.lang.Noclassdeffounderror
I am locked in a project that should be a "bank", with an account and transaction CRUD. I have to use Oracle bank because of the facul. This error happens when giving an input to the bank.…
-
0
votes1
answer659
views -
0
votes1
answer272
viewsUnable to build Entity manager Factory
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence…
-
0
votes1
answer370
viewsConfigure Hibernate.cfg.xml with Datasource configured in Wildfly 10
I’m trying to configure my Iberian to recognize the connection configured in Wildfly, already tested the connection in the wildfly panel, ta 100% functional. The problem now is to make the…
-
0
votes0
answers152
viewsError saving request | java web application + jsp + Hibernate + vraptor
I am making a web application (E-commerce), which is the final work of the web discipline, only need to save the request in the bank but is giving an error that I can not solve. I searched, but I…
-
0
votes1
answer75
viewsField Unique Update with Hibernate
How I treat a Unique field when it’s time to update with Hibernate. It features duplicate field msg. Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate…
-
0
votes1
answer129
viewsDoubt JPA 2.1 and Hibernate 5.2
I have some questions with JPA 2.1 and Hibernate 5.2. The last version of the JPA booth is 2.1. Right? Is it correct to say that I can implement a JPA-only AP without Ibernate? What are the features…
-
0
votes1
answer310
viewsHibernate does not generate the database and tables in mysql
I’m having problems with my project, tables. jul 06, 2017 7:19:21 PM org.hibernate.Version logVersion INFO: HHH000412: Hibernate Core {5.2.10.Final} jul 06, 2017 7:19:21 PM…
-
0
votes1
answer75
viewsEquivalent to LEFT() sql function in JPA
What is the LEFT() equivalent function in JPA? I need to take only the first 6 characters of a field. The equivalent select in sql would be: select left(campo,6), count(*) qtd from tabela group by…
-
0
votes1
answer654
viewsMethod being called twice when loading page
I have a system JSF+PrimeFaces and a page where I have a datatable, this datatable is filled in as follows: <p:dataTable value="#{tarefaBean.listar()}" id="tarefaTable" var="tarefa"…
-
0
votes1
answer40
viewsQuery Logical Hibernate
public boolean minimoUmSuperUsuario(Usuario usuario, Session sessionExterna) throws HibernateException { Criteria crit = sessionExterna.createCriteria(Usuario.class); return (Long)…
-
0
votes1
answer255
viewsError using Hibernate to generate tables and doubts about
I am creating a webservice using Maven to manage the dependencies of my project. At the moment, I’m looking to create a database based on my models. I have four doubts and a problem in my attempt:…
-
0
votes0
answers537
viewsAuto search (Auto complete search)
Good afternoon! I am trying to implement an auto complete search on my system. But so far I have not achieved a satisfactory result. What I want is when the user searches shows the result, as google…
-
0
votes2
answers537
viewsHibernate does not close connections/sessions in BD
I’m in big trouble using hibernate. Each time I call a method that performs a query or update in the database, Hibernate opens a session in the database and then does not close. I’ve tried…
-
0
votes0
answers316
viewsJAVA - error starting Hibernate application
I am having problems starting my application with Hibernate. I am programming in Java using Eclipse. Error message: Sep 20, 2017 2:40:36 pm org.hibernate.Version logVersion INFO: HHH000412:…
-
0
votes1
answer537
viewsError trying to validate @CPF and @CNPJ with Hibernate jSf2
Good evening I have a system project in Javaee with JSF2 Primefaces. I’m using the @CPF and @CNPJ mappings from Hibernate, in the same attribute. But this giving error "WARN: HV000129: EL Expression…
-
0
votes1
answer83
viewsJPA entity generating column with double name id_municipio_id_municipio
I have an entity called districts that contains a relationship with the municipality table. When I run the database the districts table creates the id_municipio_id_municipio field and it was to be…
-
0
votes1
answer82
viewsHibernate/SQL Average of a table with multiple relationships
I have the following tables TABLE 1 id value table 2 TABELA2 id Tabela3 TABELA3 id And with this, I would like to average TABLE 1, with WHERE in the parameters TABLE 3 with Hibernate/persistence,…
-
0
votes1
answer453
viewsUpdate a selectOneMenu (bean method)
Well I’m trying to get a selectOneMenu to fill another selectOneMenu and update a field, but I still don’t quite understand how to do. classes: package model; import java.io.Serializable; import…
-
0
votes1
answer40
viewsHow to point through Login, which database the system should connect via Hibernate
I am developing a JAVA system with JSF, Primefaces and Hibernate with Mysql database. In this system the user must inform in the login the bank that wants to connect (User, password and bank). The…
-
0
votes1
answer98
viewsJava Web - Remove Method Caused by: org.hibernate.Mappingexception: Unknown Entity: java.lang.Integer
Gent,and I’m trying to create a method in which I delete the database record. However, the following error is occurring: Caused by: org.hibernate.MappingException: Unknown entity: java.lang.Integer…
-
0
votes1
answer206
viewsError saving to bank (Unable to build Entity manager Factory)
I am trying to implement a register but when clicking on the button to save the following error appears in the console: dez 18, 2017 3:49:14 PM org.hibernate.ejb.HibernatePersistence logDeprecation…
-
0
votes1
answer58
viewsProblem when performing a select with JPA
I’m facing a bug I can’t figure out a solution. When I do a persist and then select the received and normal result, but when doing an update and after that select instead of displaying the updated…
-
0
votes1
answer4675
views"Detached Entity passed to persist" when inserting for the second time
I have a bug when I try to insert a new user for the second time. Error: 12:51:54 PM com.sun.faces.lifecycle.InvokeApplicationPhase execute WARNING: #{testeHibernate.save}:…
-
0
votes0
answers120
viewsOutdated data in Hibernate + JPA queries
I noticed a problem in my Spring application, I am implementing an internal messaging service and when creating the display of the amount of unread messages I realized that the value varied with…
-
0
votes1
answer94
viewsWhat’s wrong with running Hibernate Query?
I am running this query in Hibernate: manager.createQuery("from Usuario where senha = '" + senha + "' and login = '" + login + "'", Usuario.class).getResultList(); But is giving an Exception that…
-
0
votes1
answer294
viewsLongtext MYSQL Persistence Variable Type
Good morning, In my database Mysql, I have a column of the type longText. My doubt is how to declare the type and annotation of this variable in the java class. Soon search found the following…
-
0
votes0
answers960
viewsError trying to update: failed to lazily initialize a Collection, could not initialize proxy component <p:selectManyMenu>
I’m mapping a list with @ManyToMany (fetch = FetchType.EAGER), and I’m getting the following excpetion when I try to UPDATE a record in BD : ADVERTÊNCIA: failed to lazily initialize a collection,…
-
0
votes0
answers903
viewsPersist field blob with file extension - JPA, Hibernate
I need to persist an attachment as a pdf, xls, etc. (type field blob). I need to recover this file after persisting it and I don’t want it to be necessary for the user to inform the file extension.…
-
0
votes2
answers74
views -
0
votes1
answer483
viewsThis web container has not yet been Started
My Java Web application, using Hibernate, published on a Glassfish server and using Mysql database published on Hostgator this causing, constantly the following error: [2018-01-31T11:51:15.852-0200]…
-
0
votes1
answer81
viewsHibernate is not generating id to write to the bank
I am handling a xls file, so far so good. I can perform setters and getters normally. however in save to go to the bank, id is coming null and with that not recording in the bank. I will post my…
-
0
votes1
answer87
views -
0
votes2
answers47
viewsMapmaneto Person x Document Onetoone, Cascade
I created a Person class and a Document, the Document data I can make the persistence but when doing Onetoone in the Person class and insert a new table in the Person class appears an error that the…
-
0
votes0
answers281
viewsError while searching the database using Java, Hibernate and Spring. Use of Beans and Autowired
I’m trying to make a search in my program, but the mistakes appear: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cursoSpringDataApplication':…