-->
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.  [ 1 post ] 
Author Message
 Post subject: TransientObjectException when initializing a search index
PostPosted: Tue Apr 10, 2012 2:50 pm 
Newbie

Joined: Thu Apr 05, 2012 7:37 pm
Posts: 5
I'm cross-posting from the Search sub-forum since I'm not sure that this is a Search-specific issue versus a likely n00b Hibernate configuration issue. A sample project that replicates this problem can be found at:

https://github.com/jsvazic/hibernate-search-example

Basically I am getting the following stack-trace when I try to initialize my Hibernate Search index:

org.hibernate.TransientObjectException: cannot lock an unsaved transient instance: com.example.hs.model.Inquiry
at org.hibernate.event.internal.DefaultLockEventListener.onLock(DefaultLockEventListener.java:75)
at org.hibernate.internal.SessionImpl.fireLock(SessionImpl.java:724)
at org.hibernate.internal.SessionImpl.fireLock(SessionImpl.java:717)
at org.hibernate.internal.SessionImpl.access$1700(SessionImpl.java:170)
at org.hibernate.internal.SessionImpl$LockRequestImpl.lock(SessionImpl.java:2276)
at org.hibernate.search.batchindexing.impl.EntityConsumerLuceneWorkProducer.indexAllQueue(EntityConsumerLuceneWorkProducer.java:130)
at org.hibernate.search.batchindexing.impl.EntityConsumerLuceneWorkProducer.run(EntityConsumerLuceneWorkProducer.java:102)
at org.hibernate.search.batchindexing.impl.OptionallyWrapInJTATransaction.run(OptionallyWrapInJTATransaction.java:112)
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:680)

I do have a few @Transient fields in one of the associated objects, but I'm not sure how that may be related. Someone suggested that I set the cascade level to PERSIST, which I have tried, but it does not seem to work. I'm sure it is just a configuration issue somewhere, but for the life of me I can't figure out what it may be. Any help would be greatly appreciated.

Edit: Valid URL


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

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.