-->
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.  [ 2 posts ] 
Author Message
 Post subject: Index column is null
PostPosted: Mon Apr 04, 2005 9:45 am 
Newbie

Joined: Thu Nov 18, 2004 4:03 pm
Posts: 7
Location: Pittsburgh,pa
I am having an issue with a parent/child relationship. It creates the parent record fine but writes a null to the index in the child record. The index column is display id.




Parent

/** The getter method for this User's Roles.
*
* @hibernate.list role="Values" cascade="all-delete-orphan" lazy="true"
*
* @hibernate.collection-key column="MEASUREID"
* @hibernate.collection-index column="DISPLAY_ORDER"
* @hibernate.collection-one-to-many class="com.iwebfolio.model.bo.DropDownValues"
*
*/

public List getValues() {
return this.values;
}

public void setValues(List newValues) {
this.values = newValues;
}



child


/**

* @hibernate.many-to-one class="com.iwebfolio.model.bo.DropDownScale" cascade="all"
* column="MEASUREID"
* inverse="true"
*/
public DropDownScale getDropDownScale() {
System.out.println("return dropDownScale:::"+ dropDownScale.getId());
return this.dropDownScale;
}



public void setDropDownScale(DropDownScale newDropDownScale){
System.out.println("setting new user::");
dropDownScale = newDropDownScale;
}



stacktrace:


2005-04-04 09:19:46,273 ERROR [net.sf.hibernate.collection.PersistentCollection] Failed to lazily initialize a collection
net.sf.hibernate.HibernateException: null index column for collection: com.iwebfolio.model.bo.DropDownScale.values
at net.sf.hibernate.collection.AbstractCollectionPersister.readIndex(AbstractCollectionPersister.java:368)
at net.sf.hibernate.collection.List.readFrom(List.java:310)
at net.sf.hibernate.loader.Loader.readCollectionElement(Loader.java:304)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:218)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132)
at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:909)
at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:884)
at net.sf.hibernate.loader.OneToManyLoader.initialize(OneToManyLoader.java:80)
at net.sf.hibernate.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:284)
at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3133)
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:203)
at net.sf.hibernate.collection.PersistentCollection.read(PersistentCollection.java:69)
at net.sf.hibernate.collection.List.toString(List.java:291)
at java.lang.String.valueOf(String.java:2131)
at java.lang.StringBuffer.append(StringBuffer.java:370)
at com.iwebfolio.model.bo.DropDownScale.getValues(Unknown Source)
at sun.reflect.GeneratedMethodAccessor287.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:96)
at net.sf.hibernate.persister.AbstractEntityPersister.getPropertyValue(AbstractEntityPersister.java:257)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:503)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:482)
at net.sf.hibernate.impl.SessionImpl.preFlushEntities(SessionImpl.java:2557)
at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2197)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2186)
at org.springframework.orm.hibernate.HibernateAccessor.flushIfNecessary(HibernateAccessor.java:214)
at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:313)
at org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:631)
at org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:626)
at com.iwebfolio.model.dao.hibernate.MeasureDaoHibernateImpl.getMeasurebyUser(Unknown Source)
at com.iwebfolio.model.service.impl.MeasureServiceImpl.getMeasuresByUser(Unknown Source)
at com.iwebfolio.view.backing.MeasureListBean.init(Unknown Source)
at com.iwebfolio.view.backing.BaseBean.setServiceLocator(Unknown Source)
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.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789)
at com.sun.faces.config.ManagedBeanFactory.setPropertiesIntoBean(ManagedBeanFactory.java:564)
at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:234)
at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:253)
at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:78)
at oracle.adfinternal.view.faces.el.AdfFacesVariableResolver.resolveVariable(AdfFacesVariableResolver.java:37)
at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:146)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
at oracle.adfinternal.view.faces.taglib.ForEachTag._resolveObject(ForEachTag.java:504)
at oracle.adfinternal.view.faces.taglib.ForEachTag.doStartTag(ForEachTag.java:107)
at org.apache.jsp.measures.myMeasuresBody_jsp._jspx_meth_af_forEach_0(myMeasuresBody_jsp.java:715)
at org.apache.jsp.measures.myMeasuresBody_jsp._jspx_meth_af_selectOneChoice_0(myMeasuresBody_jsp.java:676)
at org.apache.jsp.measures.myMeasuresBody_jsp._jspx_meth_af_panelGroup_0(myMeasuresBody_jsp.java:626)
at org.apache.jsp.measures.myMeasuresBody_jsp._jspx_meth_afh_cellFormat_1(myMeasuresBody_jsp.java:598)
at org.apache.jsp.measures.myMeasuresBody_jsp._jspx_meth_afh_rowLayout_1(myMeasuresBody_jsp.java:572)
at org.apache.jsp.measures.myMeasuresBody_jsp._jspx_meth_afh_tableLayout_1(myMeasuresBody_jsp.java:547)
at org.apache.jsp.measures.myMeasuresBody_jsp._jspx_meth_afh_tableLayout_0(myMeasuresBody_jsp.java:239)
at org.apache.jsp.measures.myMeasuresBody_jsp._jspx_meth_f_subview_0(myMeasuresBody_jsp.java:210)
at org.apache.jsp.measures.myMeasuresBody_jsp._jspService(myMeasuresBody_jsp.java:164)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581)
at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
at org.apache.jsp.tiles.adfLayout_jsp._jspx_meth_tiles_insert_0(adfLayout_jsp.java:7001)
at org.apache.jsp.tiles.adfLayout_jsp._jspx_meth_afh_cellFormat_94(adfLayout_jsp.java:6979)
at org.apache.jsp.tiles.adfLayout_jsp._jspx_meth_afh_rowLayout_59(adfLayout_jsp.java:6956)
at org.apache.jsp.tiles.adfLayout_jsp._jspx_meth_afh_tableLayout_20(adfLayout_jsp.java:6872)
at org.apache.jsp.tiles.adfLayout_jsp._jspx_meth_afh_cellFormat_92(adfLayout_jsp.java:6841)
at org.apache.jsp.tiles.adfLayout_jsp._jspx_meth_afh_rowLayout_8(adfLayout_jsp.java:1646)
at org.apache.jsp.tiles.adfLayout_jsp._jspx_meth_afh_tableLayout_0(adfLayout_jsp.java:488)
at org.apache.jsp.tiles.adfLayout_jsp._jspx_meth_af_form_0(adfLayout_jsp.java:455)
at org.apache.jsp.tiles.adfLayout_jsp._jspx_meth_afh_body_0(adfLayout_jsp.java:431)
at org.apache.jsp.tiles.adfLayout_jsp._jspx_meth_afh_html_0(adfLayout_jsp.java:304)
at org.apache.jsp.tiles.adfLayout_jsp._jspx_meth_f_view_0(adfLayout_jsp.java:272)
at org.apache.jsp.tiles.adfLayout_jsp._jspService(adfLayout_jsp.java:221)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581)
at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
at org.apache.jsp.measures.myMeasures_jsp._jspx_meth_tiles_insert_0(myMeasures_jsp.java:129)
at org.apache.jsp.measures.myMeasures_jsp._jspService(myMeasures_jsp.java:68)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:134)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:264)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:199)
at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:172)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:146)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:122)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)


Top
 Profile  
 
 Post subject: Index column is null
PostPosted: Mon Apr 04, 2005 11:17 am 
Newbie

Joined: Thu Nov 18, 2004 4:03 pm
Posts: 7
Location: Pittsburgh,pa
This has happened before...disable the TRIGGER on the CHILD TABLE.
That fixed it


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

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.