Ok, its a rather big class with alot of embedded classes and it extends a base class with the Id. "Base" is a abstract class.
Code:
@Entity
@Table(name="ON_ARRANGEMENT")
@Indexed
@Analyzer(impl=LocalizedAnalyzer.class)
public class Arrangement extends Base {
public Arrangement() {}
@OneToMany(mappedBy="arrangement", cascade=CascadeType.ALL, fetch=FetchType.LAZY)
@IndexedEmbedded
public Set<TagRelation> getTags() {
return tags;
}
public void setTags(Set<TagRelation> arrangementtags) {
this.tags = arrangementtags;
}
@ManyToMany(targetEntity=Category.class,fetch=FetchType.LAZY)
@JoinTable(name="ON_ARRANGEMENT_CATEGORY", joinColumns={@JoinColumn(name="arrangement_id")}, inverseJoinColumns={@JoinColumn(name="category_id")})
@IndexedEmbedded
public Set<Category> getCategories() {
return categories;
}
public void setCategories(Set<Category> categories) {
this.categories = categories;
}
@ManyToOne(fetch=FetchType.LAZY, cascade = {CascadeType.PERSIST, CascadeType.MERGE}, optional=true)
@IndexedEmbedded
public Address getAddress() {
return address;
}
public void setAddress(Address address) {
this.address = address;
}
@OneToMany(mappedBy="arrangement", cascade=CascadeType.ALL, fetch=FetchType.LAZY)
@OrderBy("start ASC")
@IndexedEmbedded
public Set<Schedulepart> getSchedule() {
return schedule;
}
public void setSchedule(Set<Schedulepart> schedule) {
this.schedule = schedule;
}
@ManyToOne(fetch=FetchType.LAZY, optional=true)
@IndexedEmbedded
public Organizer getOrganizer() {
return organizer;
}
public void setOrganizer(Organizer organizer) {
this.organizer = organizer;
}
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
@OrderBy("language ASC")
@JoinTable(name="ON_ARRANGEMENT_NAME", joinColumns={@JoinColumn(name="arrangement_id")}, inverseJoinColumns={@JoinColumn(name="text_id")})
@IndexedEmbedded
public Set<Text> getNametexts() {
return nametexts;
}
public void setNametexts(Set<Text> nametexts) {
this.nametexts = nametexts;
}
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
@OrderBy("language ASC")
@JoinTable(name="ON_ARRANGEMENT_SUMMARY", joinColumns={@JoinColumn(name="arrangement_id")}, inverseJoinColumns={@JoinColumn(name="text_id")})
@IndexedEmbedded
public Set<Text> getSummarytexts() {
return summarytexts;
}
public void setSummarytexts(Set<Text> summarytexts) {
this.summarytexts = summarytexts;
}
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
@OrderBy("language ASC")
@JoinTable(name="ON_ARRANGEMENT_NOTE", joinColumns={@JoinColumn(name="arrangement_id")}, inverseJoinColumns={@JoinColumn(name="text_id")})
@IndexedEmbedded
public Set<Text> getNotetexts() {
return notetexts;
}
public void setNotetexts(Set<Text> notetexts) {
this.notetexts = notetexts;
}
@Override
public boolean equals(Object other) {
if ( !(other instanceof Arrangement) ) return false;
Arrangement castOther = (Arrangement) other;
return new EqualsBuilder()
.append(this.getId(), castOther.getId())
.isEquals();
}
}
Code:
BBO 10:48:46,955 pt.AbstractSecurityInterceptor INFO Validated configuration attributes
BBO 10:48:47,069 .FilterChainProxyPostProcessor INFO Checking sorted filter chain: [org.springframework.security.context.HttpSessionContextIntegrationFilter[ order=200; ], OrderedFilterDecorator[ delegate=org.springframework.security.ui.logout.LogoutFilter[ order=300; ]; order=300], OrderedFilterDecorator[ delegate=com.work.web.security.MyAuthenticationProcessingFilter[ order=700; ]; order=700], org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter[ order=1100; ], OrderedFilterDecorator[ delegate=com.work.web.security.MyRememberMeProcessingFilter[ order=1200; ]; order=1200], org.springframework.security.ui.ExceptionTranslationFilter[ order=1400; ], org.springframework.security.ui.SessionFixationProtectionFilter[ order=1600; ], org.springframework.security.intercept.web.FilterSecurityInterceptor@6c8b7b]
BBO 10:48:47,069 .FilterChainProxyPostProcessor INFO Filter chain...
BBO 10:48:47,069 .FilterChainProxyPostProcessor INFO [0] - org.springframework.security.context.HttpSessionContextIntegrationFilter[ order=200; ]
BBO 10:48:47,069 .FilterChainProxyPostProcessor INFO [1] - org.springframework.security.ui.logout.LogoutFilter[ order=300; ]
BBO 10:48:47,069 .FilterChainProxyPostProcessor INFO [2] - com.work.web.security.MyAuthenticationProcessingFilter[ order=700; ]
BBO 10:48:47,069 .FilterChainProxyPostProcessor INFO [3] - org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter[ order=1100; ]
BBO 10:48:47,069 .FilterChainProxyPostProcessor INFO [4] - com.work.web.security.MyRememberMeProcessingFilter[ order=1200; ]
BBO 10:48:47,069 .FilterChainProxyPostProcessor INFO [5] - org.springframework.security.ui.ExceptionTranslationFilter[ order=1400; ]
BBO 10:48:47,069 .FilterChainProxyPostProcessor INFO [6] - org.springframework.security.ui.SessionFixationProtectionFilter[ order=1600; ]
BBO 10:48:47,069 .FilterChainProxyPostProcessor INFO [7] - org.springframework.security.intercept.web.FilterSecurityInterceptor@6c8b7b
BBO 10:48:47,071 .FilterChainProxyPostProcessor INFO Checking whether login URL '/signin' is accessible with your configuration
BBO 10:48:47,071 .FilterChainProxyPostProcessor INFO FilterChainProxy: FilterChainProxy[ UrlMatcher = org.springframework.security.util.AntUrlPathMatcher[requiresLowerCase='true']; Filter Chains: {/=[], /**=[org.springframework.security.context.HttpSessionContextIntegrationFilter[ order=200; ], org.springframework.security.ui.logout.LogoutFilter[ order=300; ], com.work.web.security.MyAuthenticationProcessingFilter[ order=700; ], org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter[ order=1100; ], com.work.web.security.MyRememberMeProcessingFilter[ order=1200; ], org.springframework.security.ui.ExceptionTranslationFilter[ order=1400; ], org.springframework.security.ui.SessionFixationProtectionFilter[ order=1600; ], org.springframework.security.intercept.web.FilterSecurityInterceptor@6c8b7b]}]
BBO 10:48:47,190 sactionalTestExecutionListener INFO Began transaction (1): transaction manager [org.springframework.orm.hibernate3.HibernateTransactionManager@bd1232]; rollback [false]
BBO 10:48:47,677 .SimpleIndexingProgressMonitor INFO Going to reindex 3087 entities
BBO 10:48:48,366 tityConsumerLuceneworkProducer ERROR error during batch indexing:
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.work.dao.domain.Arrangement#1323]
at org.hibernate.engine.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:637)
at org.hibernate.event.def.AbstractReassociateEventListener.reassociate(AbstractReassociateEventListener.java:76)
at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:82)
at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:766)
at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:758)
at org.hibernate.impl.SessionImpl.access$500(SessionImpl.java:148)
at org.hibernate.impl.SessionImpl$LockRequestImpl.lock(SessionImpl.java:2278)
at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.indexAllQueue(EntityConsumerLuceneworkProducer.java:116)
at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.run(EntityConsumerLuceneworkProducer.java:92)
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:619)
BBO 10:48:48,485 tityConsumerLuceneworkProducer ERROR error during batch indexing:
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.work.dao.domain.Arrangement#1008]
at org.hibernate.engine.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:637)
at org.hibernate.event.def.AbstractReassociateEventListener.reassociate(AbstractReassociateEventListener.java:76)
at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:82)
at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:766)
at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:758)
at org.hibernate.impl.SessionImpl.access$500(SessionImpl.java:148)
at org.hibernate.impl.SessionImpl$LockRequestImpl.lock(SessionImpl.java:2278)
at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.indexAllQueue(EntityConsumerLuceneworkProducer.java:116)
at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.run(EntityConsumerLuceneworkProducer.java:92)
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:619)
BBO 10:48:48,764 tityConsumerLuceneworkProducer ERROR error during batch indexing:
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.work.dao.domain.Arrangement#905]
at org.hibernate.engine.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:637)
at org.hibernate.event.def.AbstractReassociateEventListener.reassociate(AbstractReassociateEventListener.java:76)
at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:82)
at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:766)
at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:758)
at org.hibernate.impl.SessionImpl.access$500(SessionImpl.java:148)
at org.hibernate.impl.SessionImpl$LockRequestImpl.lock(SessionImpl.java:2278)
at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.indexAllQueue(EntityConsumerLuceneworkProducer.java:116)
at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.run(EntityConsumerLuceneworkProducer.java:92)
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:619)
BBO 10:48:48,888 tityConsumerLuceneworkProducer ERROR error during batch indexing:
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.work.dao.domain.Arrangement#1471]
at org.hibernate.engine.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:637)
at org.hibernate.event.def.AbstractReassociateEventListener.reassociate(AbstractReassociateEventListener.java:76)
at org.hibernate.event.def.DefaultLockEventListener.onLock(DefaultLockEventListener.java:82)
at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:766)
at org.hibernate.impl.SessionImpl.fireLock(SessionImpl.java:758)
at org.hibernate.impl.SessionImpl.access$500(SessionImpl.java:148)
at org.hibernate.impl.SessionImpl$LockRequestImpl.lock(SessionImpl.java:2278)
at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.indexAllQueue(EntityConsumerLuceneworkProducer.java:116)
at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.run(EntityConsumerLuceneworkProducer.java:92)
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:619)
Thanks!