Questions tagged [hibernateexception]
38 questions
0
votes
1 answer
JPQL: InnerSelect causes PersistenceException (HibernateException: Errors in named queries)
I try to use an inner select, but get only the exception "HibernateException: Errors in named queries"
The both JPA entities:
public class A implements Serializable {
@Id
@Column(nullable = false)
@GeneratedValue(strategy =…

marabol
- 1,247
- 2
- 15
- 22
0
votes
1 answer
Hibernate session fails to query after ConstraintViolationException leading to AssertionFailure
I'm doing a batch processing of records from file in to MySQL through Hibernate. I'm trying to iterate over the records and save them, up on ConstraintViolationException i'm trying to update the record in catch clause. Some how this fails with…

Aryan
- 61
- 2
- 7
0
votes
1 answer
Postgres aborts transactions and ignores queries until the transaction is ended, is it possible to process the transaction before its rolled back?
I'm trying to improve upon error handling in a Java/Postgres application and an error that occurs frequently is input being too long for a column with a fixed length. I roll the transaction back when this occurs, but before the rollback is done I'm…

Gus
- 241
- 1
- 6
- 17
0
votes
1 answer
HIbernate StaleObject exception continuously on a thread
In one of our production environments we get hibernatestaleobject exception on a thread continuously after it appears first. This continues till we restart the server.
Environment: oracle 10g, WAS 6.1, Hibernate 2.1
Stack trace is below.
We are…

siddhesh jog
- 160
- 2
- 9
0
votes
2 answers
How to know which entity caused SQL Exception
I'm using hibernate with spring to create a restful service app. I want to return an error message when an operation fails. For example while creating an account if a duplicate primary key is detected, I want to set the message that the username is…

PC.
- 6,870
- 5
- 36
- 71
0
votes
0 answers
why native sql query can't run in hibernate and got exception
When I run the following SQL query in Hibernate I got org.hibernate.exception.GenericJDBCException: could not execute query:
select cast(DECRYPTBYKEY(cc.EncryptCardno) as varchar(30)) as cardNo
from stmtOfAccounts s, creditCards cc
where…

sudo
- 1,525
- 7
- 34
- 59
0
votes
1 answer
Spawning a Thread in Spring which is aware of other beans
I need to create a Thread in Spring that loops forever and blocks on a LinkedBlockingQueue.take() to process an object in it (a Controller puts objects in that queue). My piece of code works fine if being processed inside the @Controller. However,…
user689842
-1
votes
2 answers
How to query from a date list in JPA?
I am trying to query all the transactions happened from a list of dates.So I tried the below function:
public Collection getTransactionsByDates(short status,List dates){
Query query = em.createQuery(" SELECT a FROM Transaction…

Ricky
- 2,662
- 5
- 25
- 57