[jboss-user] javax.persistence.EntityNotFoundException: deleted entity passed to persist

Laura Barroso Perez laura.barroso at hab.desoft.cu
Fri Nov 20 10:04:42 EST 2009


Hi, I have a OneToMay relationship in my project, and when I try to remove
the side that holds the collection this exception arise:

javax.persistence.EntityNotFoundException: deleted entity passed to persist:
[org.desoft.dcp.ag.entity.Block#<null>]

at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(Abstra
ctEntityManagerImpl.java:598)

at
org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntit
yManagerImpl.java:513)

at
com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.before
Completion(SynchronizationImple.java:101)

at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPh
aseCoordinator.java:269)

 

This is my code:

The first class has this code for the relation:

 

@OneToMany(mappedBy="block",fetch=FetchType.EAGER,cascade=CascadeType.ALL)

public Set<Field> getFields() {

return fields;

}

 

And the second:

@ManyToOne(optional = false)

@JoinColumns({

@JoinColumn(name = "enterprise_id", referencedColumnName = "enterprise_id",
insertable = false, updatable = false),

@JoinColumn(name = "block_id", referencedColumnName = "block_id", insertable
= false, updatable = false)

})

public Block getBlock() {

return block;

}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20091120/649948d5/attachment.html 


More information about the jboss-user mailing list