-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: PropertyValueException with BackRef
PostPosted: Mon Dec 15, 2008 5:30 pm 
Beginner
Beginner

Joined: Fri Jun 10, 2005 2:22 pm
Posts: 27
I'm having a problem with a one-to-many association and the exception noted in the subject:

PropertyValueException: not-null property references a null or transient value: com.allureglobal.harvey.model.RotatorAnimationContentAssignment._contentAssignmentsBackref

Having done some searching, I've got a general grasp on where this kind of problem comes from, but I don't see my situation fitting into any of the scenarios that I've seen yet.

I have class RotatorSlotAssignment (RSA) that contains a List collection of RotatorContentAssignment (RCA). RCA is an abstract class with RotatorImageContentAssignment and RotatorAnimationContentAssignment extending it. RCA is the class that holds the parent RSA.

When I try to add a single RotatorAnimationContentAssignment object to the List and save the RSA, I get that exception. I've provided the relevant parts of my annotated code below. If anyone can help me figure this out, I'd appreciate it.

Dave


Hibernate version:3.2.6GA

RotatorSlotAssignment:
Code:
    @OneToMany(cascade=CascadeType.ALL)
    @IndexColumn(name="content_order",base=1)
    @JoinColumn(name="rotator_slot_assignment_id", nullable=false)
    private List<RotatorContentAssignment> contentAssignments = new ArrayList<RotatorContentAssignment>();


RotatorContentAssignment:
Code:
    @ManyToOne
    @JoinColumn(name="rotator_slot_assignment_id", nullable=true, insertable=false, updatable=false)
    private RotatorSlotAssignment rotatorSlotAssignment;


Part of the stacktrace - which only really tells us where the Exception was throw out of Spring.
Code:
org.springframework.orm.jpa.JpaSystemException: org.hibernate.PropertyValueException: not-null property references a null or transient value: com.allureglobal.harvey.model.RotatorAnimationContentAssignment._contentAssignmentsBackref; nested exception is javax.persistence.PersistenceException: org.hibernate.PropertyValueException: not-null property references a null or transient value: com.allureglobal.harvey.model.RotatorAnimationContentAssignment._contentAssignmentsBackref

    org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:215)
    org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:113)
    org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:212)
    org.springframework.orm.jpa.JpaAccessor.translateIfNecessary(JpaAccessor.java:152)
    org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:196)
    org.springframework.orm.jpa.JpaTemplate.persist(JpaTemplate.java:261)
    org.crank.crud.GenericDaoJpa.store(GenericDaoJpa.java:83)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:299)
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
    org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    $Proxy29.store(Unknown Source)
    com.allureglobal.harvey.controller.mediaBoard.assign.RotatorAssignmentController.addAnimationContent(RotatorAssignmentController.java:144)
    com.allureglobal.harvey.controller.mediaBoard.assign.RotatorAssignmentController.createRotatorContent(RotatorAssignmentController.java:82)


Top
 Profile  
 
 Post subject: Re: PropertyValueException with BackRef
PostPosted: Sun Nov 01, 2009 5:47 pm 
Newbie

Joined: Sun Nov 01, 2009 5:43 pm
Posts: 1
hi,

did you found any solution for this problem? i'm having exact same issue in my project and i have no idea how to solve it..

thanks for help,
Peter


Top
 Profile  
 
 Post subject: Re: PropertyValueException with BackRef
PostPosted: Fri Jan 29, 2010 9:57 am 
Newbie

Joined: Fri Jan 29, 2010 9:55 am
Posts: 1
Please refer the below link
http://jsweetland.livejournal.com/2475.html

Hope it helps.

Cheers
Priyesh


Top
 Profile  
 
 Post subject: Re: PropertyValueException with BackRef
PostPosted: Wed Jun 20, 2012 8:30 pm 
Newbie

Joined: Thu Jun 14, 2012 8:42 pm
Posts: 2
This link now gives a 404 and I'm having this exact same problem. Can anyone offer any help?

Thanks,
Alex


priyesh_hibernate wrote:
Please refer the below link
http://jsweetland.livejournal.com/2475.html

Hope it helps.

Cheers
Priyesh


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.