Hibernate ORM (Hibernate in short) is an open source object-relational mapping library for the Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database.
Questions tagged [hibernate3]
135 questions
1
vote
1 answer
How to resolve Too Many Connection Error in Hibernate
I am using struts2+hibernate3 in my web application.It is working fine. Some times shows Cannot open connection. Follwoing connection statement for connect with hibernate in Action class.
protected SessionFactory getSessionFactory() {
try {
…

shiva
- 177
- 2
- 9
- 24
1
vote
1 answer
Hibernate add sequence based on date
I have this table on Sql Server
id int
journal_date datetime
sequence int
What im trying to do is generate a sequence based on the datetime value.
example of the database
| id | journal_date | sequence |
--------------------------------
| 1 |…

ahmy
- 4,095
- 4
- 27
- 36
1
vote
1 answer
How to identify which version spring framework to use when upgrading java 1.7 webapp to openjdk 19?
Few years back, I develop a web application using Java 1.7, SpringFramework 4.1.1.RELEASE and Hibernate 3.6.10.Final. This webapp is running on Tomcat 7.0.4 at the time.
Now, I planning to upgrade and compile everything using OpenJDK 19, and Tomcat…

Tomatopedas
- 25
- 4
1
vote
1 answer
Migrating Hibernate3 to Hibernate5, Formatter class
How can I edit this piece of code used with hibernate 3 in order to corresponds to hibernate 5.6.1 version.
I see that Formatter is now an interface with one single method.

andy
- 61
- 6
1
vote
2 answers
How to Override Session.save() in Hibernate?
I would like to inject on all session.save() like below.
public class MyHbnSession implements Session {
@Override
public Serializable save(Object obj) throws HibernateException {
if(obj instanceof MyClass) {
…

Vivek
- 3,523
- 2
- 25
- 41
1
vote
2 answers
Hibernate 3 - safe to reuse IntegerType/StringType etc. objects?
I have some code/application which uses Hibernate 3.
It does calls like:
query.setParameter("MRC", getPageName(), new StringType());
query.setParameter("MBID", getMBID(), new IntegerType());
I want to replace these calls with some code…

peter.petrov
- 38,363
- 16
- 94
- 159
1
vote
0 answers
Need Help to resolve : could not deserialize; nested exception is org.hibernate.type.SerializationException: could not deserialize
Below is the stacktrace of the error:
org.springframework.orm.hibernate3.HibernateSystemException: could not deserialize; nested exception is org.hibernate.type.SerializationException: could not deserialize
Caused by:…

Piyush Upadhyay
- 427
- 4
- 12
1
vote
1 answer
HQL SELECT multiple tables directly into class
So I'm trying to get all columns of 2 tables into my custom created class without looping into the array. But I cant make it work.
Here is my classes:
SampleForm:
public class SampleForm {
List audittrail;
List…

Dekso
- 11
- 2
1
vote
0 answers
Hibernate 3, fetch lazy : get field return null
I have a issue with loading data about object mapped.
I have 2 entities classes.
The first :
@Entity
@Table(name = "DOCUMENT")
public class Document implements java.io.Serializable {
private static final long serialVersionUID =…

ajnfde
- 21
- 2
1
vote
1 answer
Hibernate 3.x to 5.x migration issues
I am migrating hibernate 3.x to latest version 5.x and I see many issues that I need some help with.
SessionFactory.evict() - My code uses SessionFactory.evict() which I don't see in 5.x. What should I replace this code with?…

Maz
- 653
- 12
- 22
1
vote
0 answers
Injecting EntityManager returns null after Jboss/Wildfly migration
My application is running perfectly fine in JBoss AS 5.1.0. My goal is to migrate it to Wildfly 10.
Below is my persistence.xml
…

likeachamp
- 765
- 4
- 11
- 21
1
vote
1 answer
Hibernate has returns the zero results but native sql returns different
I wanted to know why I have different results hibernait query and sql? Have I wrong mapping? Java an hibernate hasn't an exceptions. I use in this case the Oracle 11 database and hibernate 3.5.
I have the next hibernate entity:
@Table(name =…

HailToTheVictor
- 388
- 2
- 8
- 28
1
vote
1 answer
org.hibernate.HibernateException: getNamedQuery is not valid without active transaction
I got an exception:
org.hibernate.HibernateException: getNamedQuery is not valid without active transaction org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:340)
…

Ann W.
- 27
- 1
- 7
1
vote
2 answers
Hibernate 3.3.0 compatibility with Oracle 12c
This post is similar to link
But I do not find answer. I am migrating from Oracle 11g to Oracle 12c. Can I use the same dialect available with hibernate 3.3.0 org.hibernate.dialect.OracleDialect.
Also I am using ojdbc14.jar which is JDBC driver…

Mohit
- 126
- 1
- 9
1
vote
1 answer
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean is failing after upgrading spring–orm jar to 4.1.6
Initially in our project we were using spring 3 + hibernate 3
Recently it has been decided to upgrade 3rd party jars, as part of that spring upgraded to 4 but not hibernate (still hibernate 3 is maintained).
Now we have not changed any code for…

JB.
- 41
- 8