[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3232?page=c...
]
FOIRET commented on HHH-3232:
-----------------------------
Hi Gail,
I tested with the last version of Hibernate 3.2.6 and the error is always present.
You have all the elements sent by mail yesterday to reproduce this issue.
Best regards
Null Pointer Exception on Sort in a set
---------------------------------------
Key: HHH-3232
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3232
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.0 final
Environment: Windows Apache mySQL Tomcat
Reporter: FOIRET
Priority: Critical
Attachments: test.sql, TEST.zip
Hi,
Find below a null pointer exception error when i try to find the ElemactionDAO by his ID
(vdo.epi.hibernate.ElemactionDAO.findById)
This error appears when i add a sort="natural" in the set of the entity
(Action). An Action contains a set of Elemaction
(Find after a part of the mapping file Action)
This parameter resolves my sort issue in the set but it creates this one ...
I use a TreeSet in the POJO Action for the Elemaction
Could you tell me what is the issue ?
java.lang.NullPointerException
at java.lang.String.compareTo(Unknown Source)
at vdo.epi.hibernate.Elemaction.compareTo(Elemaction.java:491)
at java.util.TreeMap.compare(Unknown Source)
at java.util.TreeMap.put(Unknown Source)
at java.util.TreeSet.add(Unknown Source)
at org.hibernate.collection.PersistentSet.initializeFromCache(PersistentSet.java:104)
at
org.hibernate.cache.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:35)
at
org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:130)
at
org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:48)
at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
at
org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:454)
at
org.hibernate.engine.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:755)
at
org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:567)
at
org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:494)
at
org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:356)
at
org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:137)
at
org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:193)
at
org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:101)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:846)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:196)
at org.hibernate.type.TypeFactory.assemble(TypeFactory.java:404)
at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:96)
at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:82)
at
org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:540)
at
org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:494)
at
org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:356)
at
org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:137)
at
org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:193)
at
org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:101)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
at $Proxy3.get(Unknown Source)
at vdo.epi.hibernate.ElemactionDAO.findById(ElemactionDAO.java:159)
at vdo.epi.page.ActioncreaPage.onEditElem(ActioncreaPage.java:424)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.sf.click.util.ClickUtils.invokeListener(ClickUtils.java:1393)
at net.sf.click.control.ActionLink.onProcess(ActionLink.java:498)
at net.sf.click.ClickServlet.processPage(ClickServlet.java:555)
at net.sf.click.ClickServlet.handleRequest(ClickServlet.java:356)
at net.sf.click.ClickServlet.doGet(ClickServlet.java:284)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)
Lines in the Mapping file of Action which defines the set of Elemaction
<set name="elemaction" inverse="true" cascade="all"
lazy="false" sort="natural">
<cache usage="read-write" />
<key column="actionId" />
<one-to-many class="Elemaction" />
</set>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira