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 8569243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:17:19+00:00 2026-06-11T18:17:19+00:00

all. I had the following code. @ManyToMany(targetEntity = com.acs.gs.juror.model.security.SecurityGroup.class, cascade = CascadeType.ALL, fetch =

  • 0

all. I had the following code.

  @ManyToMany(targetEntity = com.acs.gs.juror.model.security.SecurityGroup.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER)
  @JoinTable(name = "REP_DSGN_SEC_GRP_LNK", 
      joinColumns = {@JoinColumn(name = "REPORT_DESIGN_UUID", referencedColumnName = "UUID")}, 
      inverseJoinColumns = {@JoinColumn(name = "SECURITY_GROUP_UUID", referencedColumnName = "UUID")})
  @IndexColumn(name="HIBERNATE_IDX")
  private List<SecurityGroup> groups;  

Which one day started having a multiple bag issue. So I fixed it by changing it to a set, thus:

  @ManyToMany(targetEntity = com.acs.gs.juror.model.security.SecurityGroup.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER)
  @JoinTable(name = "REP_DSGN_SEC_GRP_LNK", 
      joinColumns = {@JoinColumn(name = "REPORT_DESIGN_UUID", referencedColumnName = "UUID")}, 
      inverseJoinColumns = {@JoinColumn(name = "SECURITY_GROUP_UUID", referencedColumnName = "UUID")})
  @IndexColumn(name="HIBERNATE_IDX")
  private Set<SecurityGroup> groups;  

This works fine until I run my data loader and get the following error:

[java] Exception in thread "main" com.acs.gs.juror.dao.FailedInsertException: Unable to save object:ALTF Funds By Case|ALTF Funds By Case Report|java.util.GregorianCalendar[time=18000000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="America/New_York",offset=-18000000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=America/New_York,offset=-18000000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1970,MONTH=0,WEEK_OF_YEAR=1,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=1,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=-18000000,DST_OFFSET=0]|null|ALTFFundsByCase||PDF|[]|Lexptrain|Lexptrain|314||REPORTING|OUTPUT_TYPE|Browser|Browser|Jan 1, 1970 12:00:00 AM||null|null|null|null|null|null|null|null|null|null|null|
[java]  at com.acs.gs.juror.dao.hibernate.HibernateDAO.create(HibernateDAO.java:65)
[java]  at com.acs.gs.juror.dataload.cs.maricopa.LoadReportDesigns.loadData(LoadReportDesigns.java:116)
[java]  at com.acs.gs.juror.dataload.cs.maricopa.SeedDataLoader.loadData(SeedDataLoader.java:48)
[java]  at com.acs.gs.juror.dataload.cs.maricopa.SeedDataLoader.main(SeedDataLoader.java:18)
[java] Caused by: org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
[java]  at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:636)
[java]  at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
[java]  at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
[java]  at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
[java]  at org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTemplate.java:694)
[java]  at com.acs.gs.juror.dao.hibernate.HibernateDAO.create(HibernateDAO.java:62)
[java]  ... 3 more
[java] Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
[java]  at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
[java]  at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
[java]  at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
[java]  at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
[java]  at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:171)
[java]  at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
[java]  at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
[java]  at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
[java]  at org.springframework.orm.hibernate3.HibernateAccessor.flushIfNecessary(HibernateAccessor.java:390)
[java]  at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:420)
[java]  ... 6 more
[java] Caused by: java.sql.BatchUpdateException: Cannot insert the value NULL into column 'HIBERNATE_IDX', table 'agilejury-thehl_MC.dbo.REP_DSGN_SEC_GRP_LNK'; column does not allow nulls. INSERT fails.
[java]  at net.sourceforge.jtds.jdbc.JtdsStatement.executeBatch(JtdsStatement.java:947)
[java]  at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
[java]  at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
[java]  at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
[java]  ... 13 more

I have tried deleting the @IndexColumn entry to no avail. Hibernate creates the column regardless. If hibernate creates it without me mapping it, I don’t have a way to store a value in it, so how can it be having a problem with it being null?

I’m kinda stuck at this point and have no idea how to proceed.

Thanks.

  • 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-06-11T18:17:20+00:00Added an answer on June 11, 2026 at 6:17 pm

    It looks like this is another Hibernate black box issue that no one really understands. I ended up just creating my own entity instead of a join stable and that fixed the issue.

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

Sidebar

Related Questions

I had no problem at all running the following code on a local server,
I had a method with the following line @noticias = Noticia.where(:tags.all => array).paginate(:page =>
I have the following code with a simple class and a method for writing
All, I have the following code: $fetch = mysql_query(SELECT * FROM calendar_events where event_status='booked'
I want to open new tab in all browser. I had written the following
I am using the following code: myObj jsonStream = ser.Deserialize<myObj>(jsonStream); And all was working
Would someone please take a look at the following code fragments (all from one
I had the following code to generate a hash of an object: public int
I had the following code which has many test Functions package A; { BEGIN
Had tried following code in Linux, but always return 'C' under different LANG settings.

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.