Servlet. Service () for servlet default threw exception
Org. hibernate. propertyvalueexception: Not-null property references a null or transient value: entity. favoritebook. User
At org. hibernate. Engine. nullability. checknullability (nullability. Java: 72)
At org. hibernate. event. Def. abstractsaveeventlistener. descrimsaveorreplicate (abstractsaveeventlistener. Java: 290)
At org. hibernate. event. Def. abstractsaveeventlistener. abstrmsave (abstractsaveeventlistener. Java: 181)
At org. hibernate. event. Def. abstractsaveeventlistener. savewithgeneratedid (abstractsaveeventlistener. Java: 107)
At org. hibernate. event. Def. defaultsaveorupdateeventlistener. savewithgeneratedorrequestedid (defaultsaveorupdateeventlistener. Java: 187)
At org. hibernate. event. Def. defaultsaveeventlistener. savewithgeneratedorrequestedid (defaultsaveeventlistener. Java: 33)
At org. hibernate. event. Def. defaultsaveorupdateeventlistener. entityistransient (defaultsaveorupdateeventlistener. Java: 172)
At org. hibernate. event. Def. defaultsaveeventlistener. performsaveorupdate (defaultsaveeventlistener. Java: 27)
At org. hibernate. event. Def. defaultsaveorupdateeventlistener. onsaveorupdate (defaultsaveorupdateeventlistener. Java: 70)
At org. hibernate. impl. sessionimpl. firesave (sessionimpl. Java: 535)
At org. hibernate. impl. sessionimpl. Save (sessionimpl. Java: 523)
At org. hibernate. impl. sessionimpl. Save (sessionimpl. Java: 519)
At org. springframework. Orm. hibernate3.hibernatetemplate $12. doinhibernate (hibernatetemplate. Java: 693)
At org. springframework. Orm. hibernate3.hibernatetemplate. doexecute (hibernatetemplate. Java: 419)
At org.springframework.orm.hibernate3.hibernatetemplate.exe cutewithnativesession (hibernatetemplate. Java: 374)
At org. springframework. Orm. hibernate3.hibernatetemplate. Save (hibernatetemplate. Java: 690)
At Dao. favoritemanage. addfavorites (favoritemanage. Java: 19)
At com.huizhi.action.myfavoritesaction.exe cute (myfavoritesaction. Java: 61)
At sun. Reflect. nativemethodaccessorimpl. invoke0 (native method)
At sun. Reflect. nativemethodaccessorimpl. Invoke (nativemethodaccessorimpl. Java: 57)
At sun. Reflect. delegatingmethodaccessorimpl. Invoke (delegatingmethodaccessorimpl. Java: 43)
At java. Lang. Reflect. method. Invoke (method. Java: 601)
At com. opensymphony. xwork2.defaactionactioninvocation. invokeaction (defaultactioninvocation. Java: 404)
At com. opensymphony. xwork2.defaultactioninvocation. invokeactiononly (defaultactioninvocation. Java: 267)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 229)
At com. opensymphony. xwork2.interceptor. defaultworkflowinterceptor. dointercept (defaworkworkflowinterceptor. Java: 221)
At com. opensymphony. xwork2.interceptor. methodfilterinterceptor. Intercept (methodfilterinterceptor. Java: 86)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At com. opensymphony. xwork2.validator. validationinterceptor. dointercept (validationinterceptor. Java: 150)
At org. Apache. struts2.interceptor. validation. annotationvalidationinterceptor. dointercept (annotationvalidationinterceptor. Java: 48)
At com. opensymphony. xwork2.interceptor. methodfilterinterceptor. Intercept (methodfilterinterceptor. Java: 86)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At com. opensymphony. xwork2.interceptor. conversionerrorinterceptor. Intercept (conversionerrorinterceptor. Java: 123)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At com. opensymphony. xwork2.interceptor. parametersinterceptor. dointercept (parametersinterceptor. Java: 184)
At com. opensymphony. xwork2.interceptor. methodfilterinterceptor. Intercept (methodfilterinterceptor. Java: 86)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At com. opensymphony. xwork2.interceptor. staticparametersinterceptor. Intercept (staticparametersinterceptor. Java: 105)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At org. Apache. struts2.interceptor. checkboxinterceptor. Intercept (checkboxinterceptor. Java: 83)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At org. Apache. struts2.interceptor. fileuploadinterceptor. Intercept (fileuploadinterceptor. Java: 207)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At com. opensymphony. xwork2.interceptor. modeldriveninterceptor. Intercept (modeldriveninterceptor. Java: 74)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At com. opensymphony. xwork2.interceptor. scopedmodeldriveninterceptor. Intercept (scopedmodeldriveninterceptor. Java: 127)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At org. Apache. struts2.interceptor. profilingactivationinterceptor. Intercept (profilingactivationinterceptor. Java: 107)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At org. Apache. struts2.interceptor. debugging. debugginginterceptor. Intercept (debugginginterceptor. Java: 206)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At com. opensymphony. xwork2.interceptor. chaininginterceptor. Intercept (chaininginterceptor. Java: 115)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At com. opensymphony. xwork2.interceptor. i18ninterceptor. Intercept (i18ninterceptor. Java: 143)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At com. opensymphony. xwork2.interceptor. prepareinterceptor. dointercept (prepareinterceptor. Java: 121)
At com. opensymphony. xwork2.interceptor. methodfilterinterceptor. Intercept (methodfilterinterceptor. Java: 86)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At org. Apache. struts2.interceptor. servletconfiginterceptor. Intercept (servletconfiginterceptor. Java: 170)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At com. opensymphony. xwork2.interceptor. aliasinterceptor. Intercept (aliasinterceptor. Java: 123)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At com. opensymphony. xwork2.interceptor. exceptionmappinginterceptor. Intercept (exceptionmappinginterceptor. Java: 176)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 224)
At com. opensymphony. xwork2.defaultactioninvocation $2. doprofiling (defaultactioninvocation. Java: 223)
At com. opensymphony. xwork2.util. Profiling. utiltimerstack. Profile (utiltimerstack. Java: 455)
At com. opensymphony. xwork2.defaactionactioninvocation. Invoke (defaactionactioninvocation. Java: 221)
At org.apache.struts2.impl.strutsactionproxy.exe cute (strutsactionproxy. Java: 50)
At org. Apache. struts2.dispatcher. Dispatcher. serviceaction (dispatcher. Java: 504)
At org. Apache. struts2.dispatcher. filterdispatcher. dofilter (filterdispatcher. Java: 422)
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: 175)
At org. Apache. Catalina. Core. standardhostvalve. Invoke (standardhostvalve. Java: 128)
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: 286)
At org. Apache. Coyote. http11.http11processor. Process (http11processor. Java: 844)
At org. Apache. Coyote. http11.http11protocol $ http11connectionhandler. Process (http11protocol. Java: 583)
At org.apache.tomcat.util.net. jioendpoint $ worker. Run (jioendpoint. Java: 447)
At java. lang. thread. run (thread. java: 722) recently, I was debugging code with my classmates. This error occurred only a few days ago. The reason for this error was: Not-null = true, so that both entities cannot be saved. Set not-null to false on the end of B.