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

  • Home
  • SEARCH
  • 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 6898015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:14:34+00:00 2026-05-27T07:14:34+00:00

I am building a web app built on Spring MVC and Hibernate. I have

  • 0

I am building a web app built on Spring MVC and Hibernate. I have an existing domain model and the application is largely working.

I have a domain object called Status and a corresponding Spring Service class that contains standard CRUD methods you would expect (createStatus(Status s); etc..). The method to persist a new Status is currently working ok and is as follows:

@Transactional
    public void createStatus(Status s) {
        statusDao.persist(s);
    }

Everything is happy and working fine. I then added a new Domain object called Notification and was having problems persisting the object to the DB (nothing was getting saved and no errors were logged) – so to test this, I temporarily tried creating a dummy Notification object and persisting it inside the createStatus() method (I know this is ugly – but the point was to attempt to persist it somewhere I know transactions are working and other objects are persisted – this is to rule out transactional issues).

The updated create method is as follows:

@Transactional
public void createStatus(Status s) {
    statusDao.persist(s);
    Notification n = new Notification();
    getEntityManager().persist(n);

}

Now when I run it, the Status is still persisted but still the Notification object is not persisted and there are no errors in the log.

Has anyone experienced similar problems where specific Entities are not being persisted?


UPDATE:

Below are the Entities (Status and Notification) – it is annotation driven so no hbm files:

Status:

@Entity
@Table(name = "BF_STATUS")
@DiscriminatorValue("Status")
public class Status extends PersistableObject {

    private static final long serialVersionUID = 4925606208793500282L;


    @Column(name = "TITLE")
    protected String title;

    @Column(name = "DEADLINE")
    private Date deadline;

    @Column(name = "DETAILS")
    @Lob
    protected String details;

...
Accesors/Mutators
}

Notification:

@Entity
@Table(name = "BF_NOTIFICATION")
@DiscriminatorValue("notification")
public class Notification extends PersistableObject {

    private static final long serialVersionUID = -8935712447903901463L;

    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "LINKED_ACTIVITY", nullable = true)
    private Activity activity;

    @Column(name = "notificationRead")
    private boolean read = false;

    ...
    Accessors/Mutators

}
  • 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-27T07:14:35+00:00Added an answer on May 27, 2026 at 7:14 am

    I have faced this issue sometime back reasons for this issue:

    • Database MySQL – Id was not marked as AutoIncrement, and in my Service impl there was no catch block hence the exception was not logged.

    • Change in database semantics and again either no catch block or empty catch block with exception not being logged.

    • Incorrect log4j.xml which didn’t log the exception at all!, and the exp.printStackTrace() presented itself with the exception.

    Now with this can you surround your code with valid try catch and see if there is something ?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web app that I am building using asp mvc with nhiberante
I am building a web app using Spring MVC and I am having a
I'm building a web app using jquery mobile that will have lots of images
I am building a web app with jquery mobile. On one page I have
I'm currently building a web app, which is built with Xcode 3.2.5 and iOS
I have a web app that I'm building. It uses 3 different web services
I've got my little asp.net mvc app working as expected, however I'm building the
I'm building a web app that needs to work offline. The system is built
I am building an app to go alongside a web app I've built, which
I have a multi module web app building with maven. We build the war

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.