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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:21:57+00:00 2026-06-16T03:21:57+00:00

I am getting the error at the point I try to save an entity.

  • 0

I am getting the error at the point I try to save an entity. I only get this error when I have booted up my server, not when I run my unit tests using dbunit.

I am trying to save an association. My unit test should be the exact same condition as that which I am encountering when manually testing. I am adding a new entity on one end of the relationship where no relationships existed before.

I am using HSQLDB with the unit tests and the web app is using SQL Server.

The searches I have performed have not proved fruitful. An explanation of the message would prove very useful.

Here is the test case (that works just fine!):

    @Test
      @DatabaseSetup(value="MobileWebsiteTest.saveMobilewebsiteMobilecolorswatchmapuserdefined_NewUserSwatch.xml", type=DatabaseOperation.REFRESH)
    public void saveMobilewebsiteMobilecolorswatchmapuserdefined_NewUserSwatch() {
        // given
        Integer mobileWebsiteId = 569;
        Mobilecolorswatchmapuserdefined expected = MobilecolorswatchmapuserdefinedBuilder.init().build();

        // when
        Mobilewebsite result = service.saveMobilewebsiteMobilecolorswatchmapuserdefined(mobileWebsiteId, expected);

        // then
        assertNotNull("The Mobilewebsite user defined swatch should not be null", result.getMobilecolorswatchmapuserdefined());
        assertNotNull("The Mobilewebsite user defined swatch id should not be null.", result.getMobilecolorswatchmapuserdefined().getMobileColorSwatchMapUserDefinedId());
        assertEquals("The result aside property should be equivalent to the expected aside property.", expected.getAside(), result.getMobilecolorswatchmapuserdefined().getAside());
        assertEquals("The result SiteName property should be equivalent to the expected SiteName property.", expected.getSiteName(), result.getMobilecolorswatchmapuserdefined().getSiteName());
    }

Here is the service (note: I am currently doing a delete/save under the condition that there is already an association – this should be one-to-one, but is legacy):

@Override
@Transactional
public Mobilewebsite saveMobilewebsiteMobilecolorswatchmapuserdefined(Integer mobileWebsiteId, Mobilecolorswatchmapuserdefined related_swatchmap) {
    log.debug("saveMobilewebsiteMobilecolorswatchmapuserdefined(Integer mobileWebsiteId=[" + mobileWebsiteId + "],  Mobilecolorswatchmapuserdefined related_swatchmap=[" + related_swatchmap + "])");

    Mobilewebsite mobilewebsite = mobilewebsiteDAO.findMobilewebsiteByPrimaryKey(mobileWebsiteId, -1, -1);
    Calendar now = Calendar.getInstance();

    if (mobilewebsite.getMobilecolorswatchmapuserdefined() != null) {
        this.deleteMobilewebsiteMobilecolorswatchmapuserdefined(mobilewebsite.getMobileWebsiteId(), mobilewebsite.getMobilecolorswatchmapuserdefined().getMobileColorSwatchMapUserDefinedId());
    }

    related_swatchmap.setCreatedDtstamp(now);
    related_swatchmap.setLastUpdatedDtstamp(now);

    related_swatchmap.addToMobilewebsites(mobilewebsite);
    **related_swatchmap = mobilecolorswatchmapuserdefinedDAO.store(related_swatchmap);**

    mobilewebsite.setMobilecolorswatchmapuserdefined(related_swatchmap);
    mobilewebsite = mobilewebsiteDAO.store(mobilewebsite);
    mobilewebsiteDAO.flush();

    return mobilewebsite;
}

The stack trace points to the highlighted line above: mobilecolorswatchmapuserdefinedDAO.store(related_swatchmap);.

The stacktrace is:

2012-12-11 15:14:11.192 59464 [http-8080-2] ERROR  - Unexpected error occurred
org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at [ [Component id = form1]] on component [ [Component id = form1]] threw an exception
    at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:270)
    at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)
    at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248)
    at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
    at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:781)
    at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
    at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
    at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
    at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
    at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:185)
    at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:260)
    ... 22 more
**Caused by: java.lang.NullPointerException: null entities are not supported by org.hibernate.event.def.EventCache**
    at org.hibernate.event.def.EventCache.containsKey(EventCache.java:80)
    at org.hibernate.event.def.DefaultMergeEventListener.mergeTransientEntity(DefaultMergeEventListener.java:361)
    at org.hibernate.event.def.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:303)
    at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:258)
    at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:84)
    at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:859)
    at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:843)
    at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:847)
    at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:682)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)
    at $Proxy44.merge(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:240)
    at $Proxy44.merge(Unknown Source)
    at org.skyway.spring.util.dao.AbstractJpaDao.merge(AbstractJpaDao.java:61)
    at org.skyway.spring.util.dao.AbstractJpaDao.store(AbstractJpaDao.java:48)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at $Proxy76.store(Unknown Source)
    **at com.telventdtn.aghostmobile.service.MobilewebsiteServiceImpl.saveMobilewebsiteMobilecolorswatchmapuserdefined(MobilewebsiteServiceImpl.java:342)**
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at $Proxy77.saveMobilewebsiteMobilecolorswatchmapuserdefined(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416)
    at org.apache.wicket.proxy.$Proxy4.saveMobilewebsiteMobilecolorswatchmapuserdefined(Unknown Source)
    at com.telventdtn.aghostmobile.ArrangeColorsThemePage$SubmitButtonHandler.onSubmit(ArrangeColorsThemePage.java:126)
    at com.telventdtn.aghostmobile.markup.html.form.ObservableButton.notifyObservers(ObservableButton.java:20)
    at com.telventdtn.aghostmobile.markup.html.form.ButtonFactory$1.onSubmit(ButtonFactory.java:34)
    at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1151)
    at org.apache.wicket.markup.html.form.Form.process(Form.java:834)
    at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:762)
    at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:692)
    ... 27 more
  • 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-16T03:21:58+00:00Added an answer on June 16, 2026 at 3:21 am

    I have had similar experience wherein the table defined a nullable column, but the domain class marked it as not nullable. An attempt was made to save the object with nulls, and indeed it was persisted, but then failed with that error. Hope this helps.

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

Sidebar

Related Questions

I'm getting this error: error C3767: 'phys1::point::get_prev': candidate function(s) not accessible Here's my code
I'm getting folowwing error, when i try to save my Order Entity: Integrity constraint
I'm getting this error when I try to run tomcat: "java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\apache-tomcat-7.0.34\bin\tcnative-1.dll:
We are getting the above error when we try and run our tests in
Basically, I'm getting this error when I try to call a function inside the
I'm getting the error [nullable object must have a value] And it's point at
Hey so I'm getting that error whenever I try to do something like this:
this is my first post here. I'll try to get to the point quickly,
I'm getting illegal use of floating point error on compiling the following program. Please
i'm getting this error: Parse error: syntax error, unexpected T_PRINT, expecting T_STRING in /homepages/26/d94605010/htdocs/lz/writecodeonline.com/php/index.php(190)

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.