Hi!
I sometimes get a
java.util.NoSuchElementException when calling this code:
Code:
List produkttxtarts = getCurrentSession().createQuery(
"from Produkttxtart p where p.id.kursid = ? ").setString(0, produktstm.getKursid())
.list();
This is not reproducable and happens randomly during a nightly import job. Sometimes it works, sometimes not.
Some one had a similar problem, but that didn't help me either:
http://forum.hibernate.org/viewtopic.php?t=951276What could be the cause of this problem?
Details:
Hibernate version: Hibernate 3.2.1
Mapping documents:Code:
<class name="Produkttxtart" table="imp_produkttxtart">
<id name="id">
<generator class="native"></generator>
</id>
<property name="kursid" length="12" column="kursid" type="string" />
<property name="txtaid" length="2" column="txtaid" type="string" />
<property name="spras" length="2" column="spras" type="string" />
<property name="gltvon" length="10" column="gltvon" type="string" />
<property name="gltbis" length="10" column="gltbis" type="string" />
<property name="bezeich" length="15" column="bezeich" type="string" />
<property name="beschr" length="40" column="beschr" type="string" />
<property name="textid" length="12" column="textid" type="string" />
<property name="anddat" length="10" type="string" />
</class>
Code between sessionFactory.openSession() and session.close():
a lot
Full stack trace of any exception that occurs:
2007-09-17 02:19:01,218 ERROR ImportManager:39 - java.util.NoSuchElementException
java.util.NoSuchElementException
at org.apache.commons.collections.SequencedHashMap$OrderedIterator.next(Unknown Source)
at org.hibernate.util.IdentityMap.entryArray(IdentityMap.java:198)
at org.hibernate.util.IdentityMap.concurrentEntries(IdentityMap.java:59)
at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:113)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:65)
at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at de.portal.service.content.ImportProduktData.buildTopicText(ImportProduktData.java:332)
at de.portal.service.content.ImportProduktData.doTranslate(ImportProduktData.java:291)
at de.portal.service.content.ImportManager.startTranslate(ImportManager.java:59)
at de.portal.service.content.ImportManager.fullImport(ImportManager.java:37)
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.util.MethodInvoker.invoke(MethodInvoker.java:248)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:165)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:66)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Name and version of the database you are using:
Oracle8i Enterprise Edition Release 8.1.7.0.0
The generated SQL (show_sql=true):
n.a.
Debug level Hibernate log excerpt:
n.a.
Thanks for any help, I'm out of ideas. :-(
Regards,
Michael