Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6004005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:12:05+00:00 2026-05-23T01:12:05+00:00

My Spring-3.0.5/Hibernate-3.3.0 webapp does not store collections. When creating a new persitent object with

  • 0

My Spring-3.0.5/Hibernate-3.3.0 webapp does not store collections. When creating a new persitent object with an asscociated collection, the object is persited, but the collection not. In a test-case all works well, so it’s not a faulty Mapping-Annotation.

When I’m running the test-case and the webapp with log-level TRACE, the test-case yields something like (grep for “[fF]lush”:

AbstractFlushingEventListener - flushing session
AbstractFlushingEventListener - processing flush-time cascades
AbstractFlushingEventListener - dirty checking collections
AbstractFlushingEventListener - Flushing entities and processing referenced collections
AbstractFlushingEventListener - Processing unreferenced collections
AbstractFlushingEventListener - Scheduling collection removes/(re)creates/updates
AbstractFlushingEventListener - Flushed: 0 insertions, 0 updates, 0 deletions to 4 objects
AbstractFlushingEventListener - Flushed: 2 (re)creations, 0 updates, 0 removals to 3 collections

but the webapp only says:

org.hibernate.impl.SessionImpl - setting flush mode to: MANUAL

When I grab vor “SessionImpl” I get

DEBUG: org.hibernate.impl.SessionImpl - opened session at timestamp: 13071848978
DEBUG: org.springframework.orm.hibernate3.HibernateTransactionManager - Opened new Session [org.hibernate.impl.SessionImpl@acaf083] for Hibernate transaction
DEBUG: org.springframework.orm.hibernate3.HibernateTransactionManager - Preparing JDBC Connection of Hibernate Session [org.hibernate.impl.SessionImpl@acaf083]
TRACE: org.hibernate.impl.SessionImpl - setting cache mode to: GET
TRACE: org.hibernate.impl.SessionImpl - setting cache mode to: NORMAL
TRACE: org.hibernate.impl.SessionImpl - setting cache mode to: GET
TRACE: org.hibernate.impl.SessionImpl - setting cache mode to: NORMAL
TRACE: org.hibernate.impl.SessionImpl - after transaction completion
TRACE: org.hibernate.impl.SessionImpl - closing session

for the test-case and

DEBUG: org.hibernate.impl.SessionImpl - opened session at timestamp: 13071842364
TRACE: org.hibernate.impl.SessionImpl - setting flush mode to: MANUAL
TRACE: org.hibernate.impl.SessionImpl - closing session

for the webapp.

I have no clue, why the webapp always disables automatic flushing!

Here is my Webapp-Configuration (shortend for clearity):

  <tx:annotation-driven proxy-target-class="true"/>
  <context:spring-configured/>
  <context:component-scan base-package="de.halbekunst.fotos" />
  <mvc:annotation-driven />

and my resources-definitions:

  <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
    <property name="driverClass" value="${jdbc.driverClassName}"/>
    <property name="jdbcUrl">
      <value><![CDATA[${jdbc.url}]]></value>
    </property>
    <property name="user" value="${jdbc.username}"/>
    <property name="password" value="${jdbc.password}"/>
    <property name="minPoolSize" value="3"/>
    <property name="maxPoolSize" value="30"/>
    <property name="acquireIncrement" value="3"/>
    <property name="maxIdleTime" value="25200"/>
    <property name="maxIdleTimeExcessConnections" value="14400"/>
    <property name="idleConnectionTestPeriod" value="7200"/>
    <property name="maxStatements" value="50"/>
    <property name="preferredTestQuery" value="SELECT 1;"/>
  </bean>

  <!-- Hibernate SessionFactory -->
  <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
    <property name="dataSource" ref="dataSource"/>
    <property name="packagesToScan" value="de.halbekunst.fotos"/>
    <property name="hibernateProperties">
      <value>
        hibernate.dialect=${hibernate.dialect}
        hibernate.query.substitutions=true 'Y', false 'N'
        hibernate.cache.use_second_level_cache=false
        hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
      </value>
      <!-- Turn batching off for better error messages under PostgreSQL -->
      <!-- hibernate.jdbc.batch_size=0 -->
    </property>
  </bean>

  <!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
  <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    <property name="sessionFactory" ref="sessionFactory"/>
  </bean>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T01:12:06+00:00Added an answer on May 23, 2026 at 1:12 am

    After one week of debugging (I striped down my original project until I was able to identify the source of the described error) I now know what went wrong:

    The exposed method of the faulty controller was not public and because of that, the annotation had no effect.

    For anyone, who has similar problems: here is the sriped down version of my project, that demonstrates the error:

    https://github.com/kai-moritz/experiment

    You need Maven!
    To run the example, just execute the two commands

    mvn war:inpace
    mvn jetty:run
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We use Spring + Hibernate for a Webapp. This Webapp will be deployed on
I have a spring-hibernate application which is failing to map an object properly: basically
I'm trying to setup Spring using Hibernate and JPA, but when trying to persist
I've got a webapp which uses spring+hibernate for my data layer. I'm using 2nd
I have a Spring/Hibernate webapp that has some integration tests that run on an
I'm building a Route Planner Webapp using Spring/Hibernate/Tomcat and a mysql database, I have
i am new to spring/hibernate and was trying out my first app. I got
I am using Spring+Hibernate for an operation which requires creating and updating literally hundreds
I'm building a webapp using JQuery, Stripes, Spring and JPA (Hibernate). I have a
I'm writing Integration tests for a webapp using Spring AbstractJUnit tests and Hibernate for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.