net.sf.hibernate.PropertyValueException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • org.springframework.orm.hibernate.HibernateSystemException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey; nested exception is net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1277) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:928) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:857) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:779) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:738) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1388) at org.springframework.orm.hibernate.HibernateTemplate$13.doInHibernate(HibernateTemplate.java:344) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:200) at org.springframework.orm.hibernate.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:341) at bucket.core.persistence.hibernate.HibernateObjectDao.saveRaw(HibernateObjectDao.java:151) at bucket.core.persistence.hibernate.HibernateObjectDao.save(HibernateObjectDao.java:121) at com.atlassian.confluence.links.DefaultLinkManager.saveLink(DefaultLinkManager.java:60) at com.atlassian.confluence.links.DefaultLinkManager.updateOutgoingLinks(DefaultLinkManager.java:171) 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:324)
    via by Nick Faiz [OLD],
  • org.springframework.orm.hibernate.HibernateSystemException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey; nested exception is net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1277) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:928) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:857) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:779) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:738) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1388) at org.springframework.orm.hibernate.HibernateTemplate$13.doInHibernate(HibernateTemplate.java:344) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:200) at org.springframework.orm.hibernate.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:341) at bucket.core.persistence.hibernate.HibernateObjectDao.saveRaw(HibernateObjectDao.java:151) at bucket.core.persistence.hibernate.HibernateObjectDao.save(HibernateObjectDao.java:121) at com.atlassian.confluence.links.DefaultLinkManager.saveLink(DefaultLinkManager.java:60) at com.atlassian.confluence.links.DefaultLinkManager.updateOutgoingLinks(DefaultLinkManager.java:171) 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:324)
    via by Nick Faiz [OLD],
  • I get an error when I import my snipsnap database. The error is as follows: CONFLUENCE System Error A system error has occurred. If this problem persists - please notify your Confluence administrator of this problem. If you experience problems getting to this support page, please send an email to confluence-support@atlassian.com with the following information: a description of your problem cut & paste the error and system information found below attach the application server log file Cause: org.springframework.orm.hibernate.HibernateSystemException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey; nested exception is: net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey Stack Trace: [hide] org.springframework.orm.hibernate.HibernateSystemException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey; nested exception is: net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1220) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:882) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:819) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:742) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:719) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1331) at org.springframework.orm.hibernate.HibernateTemplate$8.doInHibernate(HibernateTemplate.java:312) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:147) at org.springframework.orm.hibernate.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:310) at com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao.save(HibernateObjectDao.java:148) at com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao.save(HibernateObjectDao.java:94) at com.atlassian.confluence.links.DefaultLinkManager.saveLink(DefaultLinkManager.java:46) at com.atlassian.confluence.links.DefaultLinkManager.updateOutgoingLinks(DefaultLinkManager.java:190) at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:201) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at com.atlassian.confluence.util.profiling.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:17) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:196) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:135) at $Proxy0.updateOutgoingLinks(Unknown Source) at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:59) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:125) at $Proxy1.updateOutgoingLinks(Unknown Source) at com.atlassian.confluence.core.DefaultContentEntityManager.saveContentEntity(DefaultContentEntityManager.java:41) 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:324) at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:201) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:153) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:196) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:135) at $Proxy2.saveContentEntity(Unknown Source) at com.atlassian.confluence.user.DefaultUserAccessor.savePersonalInformation(DefaultUserAccessor.java:246) 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:324) at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:201) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at com.atlassian.confluence.util.profiling.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:17) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:196) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:135) at $Proxy5.savePersonalInformation(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:324) at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:201) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:153) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:196) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:135) at $Proxy6.savePersonalInformation(Unknown Source) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importUserDescription(SnipSnapImporter.java:266) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importSnips(SnipSnapImporter.java:225) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importAll(SnipSnapImporter.java:136) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.doImport(SnipSnapImporter.java:99) at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:40) 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:324) at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:201) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:153) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:196) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:135) at $Proxy21.importAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportSnipSnapAction.doRestore(ImportSnipSnapAction.java:25) at com.atlassian.confluence.importexport.actions.AbstractImportAction.execute(AbstractImportAction.java:44) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:173) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.intercept(DefaultWorkflowInterceptor.java:58) at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:32) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37) at com.atlassian.confluence.core.ConfluenceValidationInterceptor.intercept(ConfluenceValidationInterceptor.java:18) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:40) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:116) at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(ServletDispatcher.java:182) at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:162) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:129) at com.atlassian.confluence.util.profiling.ProfilingPageFilter.parsePage(ProfilingPageFilter.java:36) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:61) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:161) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:181) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:83) at com.atlassian.confluence.setup.SpringSessionInViewFilter.doFilterInternal(SpringSessionInViewFilter.java:32) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:39) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:38) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:536) Referer URL: http://localhost:8181/admin/snipsnapimport-start.action System Information: System Date: Monday, 09 Feb 2004 System Time: 09:57:00 Java Version: 1.4.1_03 Java Vendor: Sun Microsystems Inc. JVM Version: 1.0 JVM Vendor: Sun Microsystems Inc. JVM Implementation Version: 1.4.1_03-b02 Java Runtime: Java(TM) 2 Runtime Environment, Standard Edition Java VM: Java HotSpot(TM) Client VM User Name: ncampbel User Timezone: GMT-05:00 Operating System: Windows XP 5.1 OS Architecture: x86 Total Memory: 127 MB Free Memory: 84 MB Used Memory: 43 MB Uptime: 4 minutes, 35 seconds Version: 1.0rc1 Build Number: 36
    via by Noah Campbell,
  • Consider this object model ob 3 classes: A Flow has a collection of Vertexes, and the Vertexes are connected by Edges, i.e. each Edge has a source and a sink Vertex, while a Vertex has a collection of source and sink Edges. When I create a simple graph consisting of one Flow, two Vertexes and one Edge between them and call Session.saveOrUpdate(), I get the following exception. With the debugger I found out that the source vertex and the edge had been assigned primary keys while the sink vertex still had the unsaved value of -1. The source code is below the exception. net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: detached.Edge.sourceVertex at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1211) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:873) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:817) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:740) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:717) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1322) at detached.Test.testDetachedObjects(Test.java:35) at detached.Test.main(Test.java:17) package detached; import junit.framework.TestCase; import net.sf.hibernate.HibernateException; import net.sf.hibernate.Session; import net.sf.hibernate.SessionFactory; import net.sf.hibernate.cfg.Configuration; public class Test extends TestCase { public static void main( String[] args ) throws HibernateException { (new Test()).testDetachedObjects(); }//main() public void testDetachedObjects() throws HibernateException { Configuration configuration = new Configuration(); configuration.addClass( Flow.class ); configuration.addClass( Vertex.class ); configuration.addClass( Edge.class ); SessionFactory sessionFactory = configuration.buildSessionFactory(); Session session = sessionFactory.openSession(); Flow flow = new Flow(); Vertex source = new Vertex(); flow.addVertex( source ); Vertex sink = new Vertex(); flow.addVertex( sink ); Edge edge = new Edge(); source.addSourceEdge( edge ); sink.addSinkEdge( edge ); session.saveOrUpdate( edge ); session.flush(); }//testDetachedObjects() }//Test package detached; import java.io.Serializable; public abstract class DomainObject implements Serializable { public static String id( DomainObject domainObject ) { return domainObject == null ? "null" : String.valueOf( domainObject.getId() ); }//id() public static final long UNSAVED_VALUE = -1; public DomainObject() { _id = UNSAVED_VALUE; }//DomainObject() public String toString() { int index = getClass().getName().lastIndexOf('.') + 1; return getClass().getName().substring( index ) + ": id=" + _id; }//toString() public boolean equals( Object object ) { if( object == null ) return false; if( object == this ) return true; if( ! object.getClass().equals( getClass() ) ) return false; // Cannot compare new objects when their primary key hasn't been assigned yet. if( ((DomainObject) object).getId() == UNSAVED_VALUE || getId() == UNSAVED_VALUE ) return false; if( ((DomainObject) object).getId() == getId() ) return true; return false; }//equals() public int hashCode() { return hashKey().hashCode(); }//hashCode() public String hashKey() { return getClass().getName() + getId(); }//hashCode() protected long _id; public long getId() { return _id; }//getId() protected void setId( long id ) { _id = id; }//setId() }//DomainObject package detached; import java.util.HashSet; import java.util.Set; /** * @hibernate.class table="FLOW" */ public class Flow extends DomainObject { public Flow() { _vertices = new HashSet(); }//Flow() public String toString() { return super.toString() + " vertices=" + _vertices.size(); }//toString() /** * This method is only needed for the Hibernate mapping. * @hibernate.id column="FLOW_ID" type="long" generator-class="native" unsaved-value="-1" */ public long getId() { return super.getId(); }//getId() private Set _vertices; /** * @hibernate.set role="vertices" cascade="all-delete-orphan" lazy="false" inverse="true" * @hibernate.collection-key column="FLOW_ID" * @hibernate.collection-one-to-many class="detached.Vertex" */ public Set getVertices() { return _vertices; }//getVertices() public void setVertices( Set vertices ) { assert vertices != null : "vertices != null"; _vertices = vertices; }//setVertices() public void addVertex( Vertex vertex ) { assert vertex != null : "vertex != null"; assert ! _vertices.contains( vertex ) : "! _vertices.contains( vertex )"; _vertices.add( vertex ); vertex.setFlow( this ); }//addVertex() public void removeVertex( Vertex vertex ) { assert vertex != null : "vertex != null"; assert _vertices.contains( vertex ) : "_vertices.contains( vertex )"; boolean removed = _vertices.remove( vertex ); assert removed : "_vertices.remove( vertex )"; }//addVertex() }//Flow package detached; import java.util.HashSet; import java.util.Set; /** * @hibernate.class table="FLOW_VERTEX" */ public class Vertex extends DomainObject { public Vertex() { _sourceEdges = new HashSet(); _sinkEdges = new HashSet(); }//Vertex public String toString() { return super.toString() + " flow=" + id( _flow ); }//toString() /** * This method is only needed for the Hibernate mapping. * @hibernate.id column="VERTEX_ID" type="long" generator-class="native" unsaved-value="-1" */ public long getId() { return super.getId(); }//getId() private Flow _flow; /** * @hibernate.many-to-one column="FLOW_ID" not-null="true" class="detached.Flow" */ public Flow getFlow() { return _flow; }//getFlow() public void setFlow( Flow flow ) { assert flow != null : "flow != null"; _flow = flow; }//setFlow() private Set _sourceEdges; /** * @hibernate.set role="sourceEdges" cascade="all-delete-orphan" lazy="false" inverse="true" * @hibernate.collection-key column="SOURCE_VERTEX_ID" * @hibernate.collection-one-to-many class="detached.Edge" */ public Set getSourceEdges() { return _sourceEdges; }//getSourceEdges() public void setSourceEdges( Set edges ) { assert edges != null : "edges != null"; _sourceEdges = edges; }//setSourceEdges() public void addSourceEdge( Edge edge ) { assert edge != null : "edge != null"; assert ! _sourceEdges.contains( edge ) : "! _sourceEdges.contains( edge )"; _sourceEdges.add( edge ); edge.setSourceVertex( this ); }//addSourceEdge() public void removeSourceEdge( Edge edge ) { assert edge != null : "edge != null"; assert _sourceEdges.contains( edge ) : "_sourceEdges.contains( edge )"; _sourceEdges.remove( edge ); }//addSourceEdge() public boolean isSourceEdge( Edge edge ) { return _sourceEdges.contains( edge ); }//isSourceEdge() private Set _sinkEdges; /** * @hibernate.set role="sinkEdge" cascade="all-delete-orphan" lazy="false" inverse="true" * @hibernate.collection-key column="SINK_VERTEX_ID" * @hibernate.collection-one-to-many class="detached.Edge" */ public Set getSinkEdges() { return _sinkEdges; }//getSinkEdges() public void setSinkEdges( Set edges ) { assert edges != null : "edges != null"; _sinkEdges = edges; }//setSinkEdges() public void addSinkEdge( Edge edge ) { assert edge != null : "edge != null"; assert ! _sinkEdges.contains( edge ) : "! _sinkEdge.contains( edge )"; _sinkEdges.add( edge ); edge.setSinkVertex( this ); }//addSinkEdge() public void removeSinkEdge( Edge edge ) { assert edge != null : "edge != null"; assert _sinkEdges.contains( edge ) : "_sinkEdge.contains( edge )"; _sinkEdges.remove( edge ); }//addSinkEdge() public boolean isSinkEdge( Edge edge ) { return _sinkEdges.contains( edge ); }//isSourceEdge() }//Vertex package detached; /** * @hibernate.class table="FLOW_EDGE" */ public class Edge extends DomainObject { public Edge() { }//Edge() public String toString() { return super.toString() + " sourceVertex=" + id( _sourceVertex ) + " sinkVertex=" + id( _sinkVertex ); }//toString() /** * This method is only needed for the Hibernate mapping. * @hibernate.id column="FLOW_EDGE_ID" type="long" generator-class="native" unsaved-value="-1" */ public long getId() { return super.getId(); }//getId() private Vertex _sourceVertex; /** * @hibernate.many-to-one column="SOURCE_VERTEX_ID" not-null="true" class="detached.Vertex" */ public Vertex getSourceVertex() { return _sourceVertex; }//getSourceVertex() public void setSourceVertex( Vertex vertex ) { assert vertex != null : "vertex != null"; _sourceVertex = vertex; }//setSourceVertex() private Vertex _sinkVertex; /** * @hibernate.many-to-one column="SINK_VERTEX_ID" not-null="true" class="detached.Vertex" */ public Vertex getSinkVertex() { return _sinkVertex; }//getSinkVertex() public void setSinkVertex( Vertex vertex ) { assert vertex != null : "vertex != null"; _sinkVertex = vertex; }//setSinkVertex() }//Edge
    via by Felix L J Mayer,
  • Consider this object model ob 3 classes: A Flow has a collection of Vertexes, and the Vertexes are connected by Edges, i.e. each Edge has a source and a sink Vertex, while a Vertex has a collection of source and sink Edges. When I create a simple graph consisting of one Flow, two Vertexes and one Edge between them and call Session.saveOrUpdate(), I get the following exception. With the debugger I found out that the source vertex and the edge had been assigned primary keys while the sink vertex still had the unsaved value of -1. The source code is below the exception. net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: detached.Edge.sourceVertex at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1211) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:873) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:817) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:740) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:717) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1322) at detached.Test.testDetachedObjects(Test.java:35) at detached.Test.main(Test.java:17) package detached; import junit.framework.TestCase; import net.sf.hibernate.HibernateException; import net.sf.hibernate.Session; import net.sf.hibernate.SessionFactory; import net.sf.hibernate.cfg.Configuration; public class Test extends TestCase { public static void main( String[] args ) throws HibernateException { (new Test()).testDetachedObjects(); }//main() public void testDetachedObjects() throws HibernateException { Configuration configuration = new Configuration(); configuration.addClass( Flow.class ); configuration.addClass( Vertex.class ); configuration.addClass( Edge.class ); SessionFactory sessionFactory = configuration.buildSessionFactory(); Session session = sessionFactory.openSession(); Flow flow = new Flow(); Vertex source = new Vertex(); flow.addVertex( source ); Vertex sink = new Vertex(); flow.addVertex( sink ); Edge edge = new Edge(); source.addSourceEdge( edge ); sink.addSinkEdge( edge ); session.saveOrUpdate( edge ); session.flush(); }//testDetachedObjects() }//Test package detached; import java.io.Serializable; public abstract class DomainObject implements Serializable { public static String id( DomainObject domainObject ) { return domainObject == null ? "null" : String.valueOf( domainObject.getId() ); }//id() public static final long UNSAVED_VALUE = -1; public DomainObject() { _id = UNSAVED_VALUE; }//DomainObject() public String toString() { int index = getClass().getName().lastIndexOf('.') + 1; return getClass().getName().substring( index ) + ": id=" + _id; }//toString() public boolean equals( Object object ) { if( object == null ) return false; if( object == this ) return true; if( ! object.getClass().equals( getClass() ) ) return false; // Cannot compare new objects when their primary key hasn't been assigned yet. if( ((DomainObject) object).getId() == UNSAVED_VALUE || getId() == UNSAVED_VALUE ) return false; if( ((DomainObject) object).getId() == getId() ) return true; return false; }//equals() public int hashCode() { return hashKey().hashCode(); }//hashCode() public String hashKey() { return getClass().getName() + getId(); }//hashCode() protected long _id; public long getId() { return _id; }//getId() protected void setId( long id ) { _id = id; }//setId() }//DomainObject package detached; import java.util.HashSet; import java.util.Set; /** * @hibernate.class table="FLOW" */ public class Flow extends DomainObject { public Flow() { _vertices = new HashSet(); }//Flow() public String toString() { return super.toString() + " vertices=" + _vertices.size(); }//toString() /** * This method is only needed for the Hibernate mapping. * @hibernate.id column="FLOW_ID" type="long" generator-class="native" unsaved-value="-1" */ public long getId() { return super.getId(); }//getId() private Set _vertices; /** * @hibernate.set role="vertices" cascade="all-delete-orphan" lazy="false" inverse="true" * @hibernate.collection-key column="FLOW_ID" * @hibernate.collection-one-to-many class="detached.Vertex" */ public Set getVertices() { return _vertices; }//getVertices() public void setVertices( Set vertices ) { assert vertices != null : "vertices != null"; _vertices = vertices; }//setVertices() public void addVertex( Vertex vertex ) { assert vertex != null : "vertex != null"; assert ! _vertices.contains( vertex ) : "! _vertices.contains( vertex )"; _vertices.add( vertex ); vertex.setFlow( this ); }//addVertex() public void removeVertex( Vertex vertex ) { assert vertex != null : "vertex != null"; assert _vertices.contains( vertex ) : "_vertices.contains( vertex )"; boolean removed = _vertices.remove( vertex ); assert removed : "_vertices.remove( vertex )"; }//addVertex() }//Flow package detached; import java.util.HashSet; import java.util.Set; /** * @hibernate.class table="FLOW_VERTEX" */ public class Vertex extends DomainObject { public Vertex() { _sourceEdges = new HashSet(); _sinkEdges = new HashSet(); }//Vertex public String toString() { return super.toString() + " flow=" + id( _flow ); }//toString() /** * This method is only needed for the Hibernate mapping. * @hibernate.id column="VERTEX_ID" type="long" generator-class="native" unsaved-value="-1" */ public long getId() { return super.getId(); }//getId() private Flow _flow; /** * @hibernate.many-to-one column="FLOW_ID" not-null="true" class="detached.Flow" */ public Flow getFlow() { return _flow; }//getFlow() public void setFlow( Flow flow ) { assert flow != null : "flow != null"; _flow = flow; }//setFlow() private Set _sourceEdges; /** * @hibernate.set role="sourceEdges" cascade="all-delete-orphan" lazy="false" inverse="true" * @hibernate.collection-key column="SOURCE_VERTEX_ID" * @hibernate.collection-one-to-many class="detached.Edge" */ public Set getSourceEdges() { return _sourceEdges; }//getSourceEdges() public void setSourceEdges( Set edges ) { assert edges != null : "edges != null"; _sourceEdges = edges; }//setSourceEdges() public void addSourceEdge( Edge edge ) { assert edge != null : "edge != null"; assert ! _sourceEdges.contains( edge ) : "! _sourceEdges.contains( edge )"; _sourceEdges.add( edge ); edge.setSourceVertex( this ); }//addSourceEdge() public void removeSourceEdge( Edge edge ) { assert edge != null : "edge != null"; assert _sourceEdges.contains( edge ) : "_sourceEdges.contains( edge )"; _sourceEdges.remove( edge ); }//addSourceEdge() public boolean isSourceEdge( Edge edge ) { return _sourceEdges.contains( edge ); }//isSourceEdge() private Set _sinkEdges; /** * @hibernate.set role="sinkEdge" cascade="all-delete-orphan" lazy="false" inverse="true" * @hibernate.collection-key column="SINK_VERTEX_ID" * @hibernate.collection-one-to-many class="detached.Edge" */ public Set getSinkEdges() { return _sinkEdges; }//getSinkEdges() public void setSinkEdges( Set edges ) { assert edges != null : "edges != null"; _sinkEdges = edges; }//setSinkEdges() public void addSinkEdge( Edge edge ) { assert edge != null : "edge != null"; assert ! _sinkEdges.contains( edge ) : "! _sinkEdge.contains( edge )"; _sinkEdges.add( edge ); edge.setSinkVertex( this ); }//addSinkEdge() public void removeSinkEdge( Edge edge ) { assert edge != null : "edge != null"; assert _sinkEdges.contains( edge ) : "_sinkEdge.contains( edge )"; _sinkEdges.remove( edge ); }//addSinkEdge() public boolean isSinkEdge( Edge edge ) { return _sinkEdges.contains( edge ); }//isSourceEdge() }//Vertex package detached; /** * @hibernate.class table="FLOW_EDGE" */ public class Edge extends DomainObject { public Edge() { }//Edge() public String toString() { return super.toString() + " sourceVertex=" + id( _sourceVertex ) + " sinkVertex=" + id( _sinkVertex ); }//toString() /** * This method is only needed for the Hibernate mapping. * @hibernate.id column="FLOW_EDGE_ID" type="long" generator-class="native" unsaved-value="-1" */ public long getId() { return super.getId(); }//getId() private Vertex _sourceVertex; /** * @hibernate.many-to-one column="SOURCE_VERTEX_ID" not-null="true" class="detached.Vertex" */ public Vertex getSourceVertex() { return _sourceVertex; }//getSourceVertex() public void setSourceVertex( Vertex vertex ) { assert vertex != null : "vertex != null"; _sourceVertex = vertex; }//setSourceVertex() private Vertex _sinkVertex; /** * @hibernate.many-to-one column="SINK_VERTEX_ID" not-null="true" class="detached.Vertex" */ public Vertex getSinkVertex() { return _sinkVertex; }//getSinkVertex() public void setSinkVertex( Vertex vertex ) { assert vertex != null : "vertex != null"; _sinkVertex = vertex; }//setSinkVertex() }//Edge
    via by Felix L J Mayer,
  • Creates a new instance of class B which inherits from class A with an existing instance of A. For an exmaple, there are two classes Person and Customer inheriting from Person. The business logic is that a customer is created when a person buys products in the system. In the implementation, the instance of Person has alreay existed and a new instance customer is going to be created with the existing instance of Person. I used the dynamic-insert for class B, but still got such an error: net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: test.hiber.ClassB.apro1 at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1269) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:921) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:850) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:772) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:731) at test.hiber.Hiber.createBwithA(Hiber.java:66) ------------------------------------------------------------- the bean sources with XDoclet tags are: public class ClassA { private String objID; private String apro1; private String apro2; public ClassA() { } /** * @hibernate.property * @hibernate.column * name="PRO_1" * not-null="true" * length="128" * @return Returns the apro1. */ public String getApro1() { return apro1; } public void setApro1(String apro1) { this.apro1 = apro1; } /** * @hibernate.property * @hibernate.column * name="PRO_2" * not-null="true" * length="16" * @param apro1 The apro1 to set. */ public String getApro2() { return apro2; } /** * @param apro2 The apro2 to set. */ public void setApro2(String apro2) { this.apro2 = apro2; } /** * @hibernate.id * generator-class="assigned" * * @return Returns the objID. */ public String getObjID() { return objID; } /** * @param objID The objID to set. */ public void setObjID(String objID) { this.objID = objID; } } /** * *@hibernate.joined-subclass * table="QBS_CLASS_B" * dynamic-insert="true" * *@hibernate.joined-subclass-key * column="ClassA_KEY" * */ public class ClassB extends ClassA { private String bpro; /** * @hibernate.property * @hibernate.column * name="BPRO" * not-null="true" * @return Returns the bpro. */ public String getBpro() { return bpro; } /** * @param bpro The bpro to set. */ public void setBpro(String bpro) { this.bpro = bpro; } } ----------------------------------------------- the test code is: public void test() { createClassA(); createClassBwithA(); } public void createClassA() throws Exception { Session s = sessionFactory.openSession(); ClassA a = new ClassA(); a.setObjID("001a"); a.setApro1("property 1 of a"); a.setApro2("property 2 of a"); s.save(a); s.flush(); s.close(); } public void createBwithA() throws Exception { Session s = sessionFactory.openSession(); Transaction tx = s.beginTransaction(); ClassB b = new ClassB(); b.setObjID("001a"); b.setBpro("b property"); s.save(b); tx.commit(); s.flush(); s.close(); }
    via by James,
  • When i want to view the older-pages on a current page i get the error: Attributes -------------------------- javax.servlet.forward.request_uri: /pages/viewpage.action javax.servlet.forward.context_path: javax.servlet.forward.servlet_path: /pages/viewpage.action javax.servlet.forward.path_info: /500page.jsp javax.servlet.forward.query_string: pageId=34277023 os_securityfilter_already_filtered: true javax.servlet.jsp.jspException: java.lang.RuntimeException: Error rendering template for decorator root com.atlassian.seraph.auth.LoginReason: OK com.atlassian.confluence.security.websudo.MessagesDecoratorFilter__already_filtered__: true atlassian.core.seraph.original.url: /500page.jsp?pageId=34277023 confluence.themecontext: com.atlassian.confluence.themes.ThemeContext@7524d016 javax.servlet.error.status_code: 500 javax.servlet.error.servlet_name: action com.opensymphony.sitemesh.USINGSTREAM: false com.atlassian.labs.botkiller.BotKillerFilter: true com.atlassian.gzipfilter.GzipFilter_already_filtered: true loginfilter.already.filtered: true theme.resource.path: /download/resources/com.refinedwiki.confluence.plugins.theme.original%3Apage41/ com.atlassian.confluence.web.ConfluenceJohnsonFilter_already_filtered: true Confluence-Request-Time: 1393319267155 javax.servlet.error.message: com.opensymphony.sitemesh.APPLIED_ONCE: true com.atlassian.core.filters.HeaderSanitisingFilter_already_filtered: true __cleanup_recursion_counter: 0 webwork.valueStack: com.opensymphony.xwork.util.OgnlValueStack@43d9906f com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter_already_filtered: true javax.servlet.error.exception: java.lang.RuntimeException: Error rendering template for decorator root javax.servlet.error.request_uri: /pages/viewpage.action -------------------------- Parameters -------------------------- pageId : 34277023 caused by: java.lang.RuntimeException: Error rendering template for decorator root at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:186) caused by: java.lang.RuntimeException: Error rendering template for decorator page at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:186) caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getUserFullName' in class com.atlassian.confluence.pages.actions.ViewPageAction threw exception org.springframework.orm.hibernate.HibernateSystemException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey; nested exception is net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey at template/includes/macros-deprecated.vm[line 143, column 22] at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) caused by: org.springframework.orm.hibernate.HibernateSystemException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey; nested exception is net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:597) caused by: net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1302) The whole log i can't upload. I hope this is enough and hope to hear soon from you. Thanks
    via by Danny van den Berg,
  • h5. Steps to reproduce: # Like a comment on any page in a space. # Make a space or full site backup that doesn't include comments. # Try to import that backup. The full stack trace: {code:none} 2012-12-20 09:35:02,382 ERROR [Long running task: Importing data] [confluence.importexport.xmlimport.BackupImporter] importEntities Cannot import the entities: -- url: /wiki/admin/importspace/doimportconfluencespace.action | userName: nmason | referer: https://nmason.jira-dev.com/wiki/admin/importspace/importconfluencespace.action | action: doimportconfluencespace com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: not-null property references a null or transient value: com.atlassian.confluence.like.LikeEntity.content at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:71) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:337) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:305) at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:110) at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(BackupImporter.java:154) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(RestorePluginStateStoreTransactionCallbackDecorator.java:47) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:147) at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:75) at com.atlassian.confluence.importexport.DefaultImportExportManager.doImport(DefaultImportExportManager.java:67) 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:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy89.doImport(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:81) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26) at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.like.LikeEntity.content at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:53) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at com.atlassian.security.xml.RestrictedXMLReader.parse(RestrictedXMLReader.java:103) at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.parseBackup(DefaultXmlImporter.java:103) at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:55) ... 30 more Caused by: net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.like.LikeEntity.content at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1302) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:954) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:883) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:837) at com.atlassian.confluence.importexport.xmlimport.ImportProcessorContext.saveObject(ImportProcessorContext.java:269) at com.atlassian.confluence.importexport.xmlimport.persister.ReflectiveObjectPersister.persist(ReflectiveObjectPersister.java:142) at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.persist(DefaultImportProcessor.java:46) at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.processObject(DefaultImportProcessor.java:36) at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:49) ... 42 more {code} h5. Workaround Delete all LikeEntity entries from the XML file - this will remove all Likes and will allow the import to continue. # Open the zip file and edit entities.xml # Search for LikeEntity. You will see <object> entries like this: {code} <object class="LikeEntity" package="com.atlassian.confluence.like"> <id name="id">1900546</id> <property name="content" class="Comment" package="com.atlassian.confluence.pages"> <id name="id">1572927</id> </property> <property name="username"> <![CDATA[ admin ]]> </property> <property name="creationDate">2013-01-04 17:28:25.971</property> </object> {code} # Remove the entire <object> entry, from the opening '<object class = ' up to and including hte '</object>' closing tag # Repeat for all LikeEntity objects found # Reimport the backup. # NB: You may need to clean the half-imported data out first. #- If it is a space, you can do this by removing the space and then re-importing. #- If it is a full site backup and you are restoring it as part of the installation, you would be better off cleaning the home directory and running the setup wizard again. Just stop Confluence, empty the contents of the home directory and restart Confluence. This will start the setup wizard again.
    via by Nick Mason,
  • {noformat} 2014-09-15 01:10:59,095 WARN [scheduler_Worker-9] [BuildExpiryBeanImpl] Unable to expire MASTERONE-CIFUNCHAL865-2 org.springframework.orm.hibernate.HibernateSystemException: not-null property references a null or transient value: com.atlassian.bamboo.build.artifact.DefaultArtifactLink.artifact; nested exception is net.sf.hibernate.PropertyValueExcepti on: not-null property references a null or transient value: com.atlassian.bamboo.build.artifact.DefaultArtifactLink.artifact at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:597) at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:353) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375) at org.springframework.orm.hibernate.HibernateTemplate.deleteAll(HibernateTemplate.java:661) at com.atlassian.bamboo.build.artifact.ArtifactLinkHibernateDao.removeAll(ArtifactLinkHibernateDao.java:42) at sun.reflect.GeneratedMethodAccessor6623.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy96.removeAll(Unknown Source) at com.atlassian.bamboo.build.artifact.DefaultArtifactLinkManager.removeArtifactLinks(DefaultArtifactLinkManager.java:216) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryManagerImpl.removeArtifacts(BuildResultsSummaryManagerImpl.java:1089) at sun.reflect.GeneratedMethodAccessor6624.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:30) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy64.removeArtifacts(Unknown Source) at com.atlassian.bamboo.build.expiry.BuildExpiryBeanImpl.expirePlan(BuildExpiryBeanImpl.java:260) at com.atlassian.bamboo.build.expiry.BuildExpiryBeanImpl.expireAllBuilds(BuildExpiryBeanImpl.java:129) at com.atlassian.bamboo.build.expiry.BuildExpiryScheduler$BuildExpiryJob.execute(BuildExpiryScheduler.java:113) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) Caused by: net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.bamboo.build.artifact.DefaultArtifactLink.artifact at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1289) at net.sf.hibernate.impl.SessionImpl.doDelete(SessionImpl.java:1257) at net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:1185) at org.springframework.orm.hibernate.HibernateTemplate$17.doInHibernate(HibernateTemplate.java:665) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) ... 35 more {noformat} We're currently running 5.7-m2 with a patched {{atlassian-bamboo-api-5.7-m2.jar}}, see BUILDENG-6416.
    via by Martin Meinhold,
  • When I start to migrate in the log ERROR. {code} 2015-01-22 11:06:50,037 ERROR [Long running task: Importing data] [confluence.importexport.xmlimport.BackupImporter] importEntities Cannot import the entities: -- url: /admin/restore-local-file.action | userName: gonchik | referer: http://192.168.139.201:8090/admin/backup.action | action: restore-local-file com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:76) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:387) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:355) at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:119) at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(BackupImporter.java:193) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(RestorePluginStateStoreTransactionCallbackDecorator.java:47) at com.atlassian.confluence.importexport.xmlimport.RestoreBandanaValuesTransactionCallbackDecorator.doInTransaction(RestoreBandanaValuesTransactionCallbackDecorator.java:48) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:206) at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:75) at com.atlassian.confluence.importexport.DefaultImportExportManager.performImportInternal(DefaultImportExportManager.java:82) at com.atlassian.confluence.importexport.DefaultImportExportManager.performImport(DefaultImportExportManager.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy93.performImport(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:88) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26) at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.xml.sax.SAXException: Error while importing backup: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:53) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at com.atlassian.security.xml.RestrictedXMLReader.parse(RestrictedXMLReader.java:103) at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.parseBackup(DefaultXmlImporter.java:108) at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:60) ... 32 more Caused by: net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1302) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:954) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:883) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:837) at com.atlassian.confluence.importexport.xmlimport.ImportProcessorContext.saveObject(ImportProcessorContext.java:286) at com.atlassian.confluence.importexport.xmlimport.persister.ReflectiveObjectPersister.persist(ReflectiveObjectPersister.java:207) at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.persist(DefaultImportProcessor.java:46) at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.processObject(DefaultImportProcessor.java:36) at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:49) ... 44 more 2015-01-22 11:06:50,055 ERROR [Long running task: Importing data] [confluence.importexport.actions.ImportLongRunningTask] runInternal Failure during import -- url: /admin/restore-local-file.action | userName: gonchik | referer: http://192.168.139.201:8090/admin/backup.action | action: restore-local-file com.atlassian.confluence.importexport.ImportExportException: com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:397) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:355) at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:119) at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(BackupImporter.java:193) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(RestorePluginStateStoreTransactionCallbackDecorator.java:47) at com.atlassian.confluence.importexport.xmlimport.RestoreBandanaValuesTransactionCallbackDecorator.doInTransaction(RestoreBandanaValuesTransactionCallbackDecorator.java:48) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:206) at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:75) at com.atlassian.confluence.importexport.DefaultImportExportManager.performImportInternal(DefaultImportExportManager.java:82) at com.atlassian.confluence.importexport.DefaultImportExportManager.performImport(DefaultImportExportManager.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy93.performImport(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:88) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26) at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) {code}
    via by Gonchik Tsymzhitov,
    • net.sf.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.confluence.links.OutgoingLink.destinationSpaceKey at net.sf.hibernate.impl.SessionImpl.checkNullability(SessionImpl.java:1277) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:928) at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:857) at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:779) at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:738) at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1388) at org.springframework.orm.hibernate.HibernateTemplate$13.doInHibernate(HibernateTemplate.java:344) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:200) at org.springframework.orm.hibernate.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:341) at bucket.core.persistence.hibernate.HibernateObjectDao.saveRaw(HibernateObjectDao.java:151) at bucket.core.persistence.hibernate.HibernateObjectDao.save(HibernateObjectDao.java:121) at com.atlassian.confluence.links.DefaultLinkManager.saveLink(DefaultLinkManager.java:60) at com.atlassian.confluence.links.DefaultLinkManager.updateOutgoingLinks(DefaultLinkManager.java:171) 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:324)

    Users with the same issue

    Unknown visitor1 times, last one,