Questions tagged as 'hibernate'

0
answers

Persist blob field with file extension - JPA, Hibernate

I need to persist an attachment like a pdf, xls, etc. (type blob field). I need to recover this file after persisting it and I do not want the user to enter the file extension. I was guided in another question to create a table only...
asked by 02.10.2015 / 19:17
0
answers

Error while trying to update: failed to initialize initialization 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, could not initialize proxy - no Session o...
asked by 29.09.2015 / 21:31
1
answer

How to disable spring security

Good evening, I'm learning jsf, so I accompanied some videos of Leandro Costa on youtube, I found it well didactic and so on. At the end of the course it provides the source code, however as the project uses spring security in the login and it d...
asked by 09.11.2015 / 02:15
0
answers

Outdated data in Hibernate + JPA queries

I noticed a problem in my Spring application, I'm implementing an internal messaging service and when I create the display of the amount of unread messages I realized that the value varied with each update, whenever a new message arrived. In sho...
asked by 23.09.2015 / 19:44
0
answers

getNamedQuery returns null

I have a namedQuery that for some reason is returning null results from the database. The namedQuery itself: @NamedQuery(name="Usuario.userLogin", query = "SELECT u.email, u.senha FROM Usuario u WHERE u.email = :mail AND u.senha = :senha")...
asked by 23.10.2015 / 14:14
0
answers

Authentication and authorization of the email and password in the login screen

I have a login screen in which the email and password are already registered in the database, but I am not able to log in with this data that is already stored in the database. In the loginBean class I need to not leave static, but rather accord...
asked by 23.10.2015 / 19:53
1
answer

Method being called twice while loading page

I have a JSF+PrimeFaces system and a page where I have a dataTable, this dataTable is populated as follows: <p:dataTable value="#{tarefaBean.listar()}" id="tarefaTable" var="tarefa" style="margin-top: 20px"...
asked by 27.07.2015 / 20:47
0
answers

Problem to save with hibernate, type checked is different than expected

I'm having a problem saving two tables ( @OneToOne ) to the database using Hibernate. Using weak relationship entities (person, address). Errors displayed on the console:    Initial SessionFactory creation failed.org.hibernate.Hibern...
asked by 08.06.2015 / 19:34
1
answer

How to write image to database with JSF2

I'm having a JSF project with the DAO template using Hibernate , and I'm having a hard time understanding how to save the image in the database. I just need to know what the method would look like to save an image to a DAO cla...
asked by 07.05.2015 / 23:58
0
answers

Error creating SpringMVC Bean

I'm new to Java and I'm doing several online courses and trying to develop on my own, to go coaching, but I came across an error that I have no idea how to solve. Error creating bean: org.springframework.beans.factory.BeanCreationException: Er...
asked by 13.03.2015 / 11:55