Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.01
Mapping documents:
<hibernate-mapping default-lazy="false">
<class name="com.coginfo.kf.bean.Report" table="KFT_REPORT" select-before-update="true">
<meta attribute="class-description">Report</meta>
<id name="codint" type="long" unsaved-value="0">
<generator class="sequence">
<param name="sequence">KF_SEQ_REPORT</param>
</generator>
</id>
<property name="cafrep" type="string">
<column name="cafrep" length="20" sql-type="string" not-null="true"/>
</property>
<property name="dscrep" type="string">
<column name="dscrep" length="1000" sql-type="string" not-null="true"/>
</property>
<property name="caflbl" type="string">
<column name="caflbl" length="1000" sql-type="string" not-null="true"/>
</property>
<property name="cafpth" type="string">
<column name="cafpth" length="1000" sql-type="string" not-null="true"/>
</property>
<property name="stsrep" type="integer">
<column name="stsrep" length="1" sql-type="integer" not-null="true"/>
</property>
<property name="stscri" type="string">
<column name="stscri" length="1" sql-type="string" not-null="true"/>
</property>
<many-to-one class="com.coginfo.kf.bean.ReportEngine" column="codintrepeng" name="codintrepeng" not-null="true"/>
<set name="categorie" table="kft_categoria_report" lazy="true">
<key column="codintrep"/>
<many-to-many column="codintctg" class="com.coginfo.kf.bean.Categoria"/>
</set>
<set name="parametri" lazy="true" order-by=" cafprtrep ASC" inverse="true" cascade="delete">
<key column="codintrep"/>
<one-to-many class="com.coginfo.kf.bean.Parametro"/>
</set>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
Report report = loadReport(key);
session.delete(report);
Full stack trace of any exception that occurs:
java.lang.NullPointerException
at java.util.ArrayList.addAll(Unknown Source)
at org.hibernate.engine.ActionQueue.resumeSuspendedDeletions(ActionQueue.java:337)
at org.hibernate.event.def.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:223)
at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:108)
at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:527)
at com.coginfo.framework.persistent.dao.HibernateDAOImpl.delete(HibernateDAOImpl.java:393)
at com.coginfo.kf.dao.ReportAdmDAOImpl.delete(ReportAdmDAOImpl.java:52)
at com.coginfo.framework.service.dataloader.HibernateDataLoaderServiceImp.delete(HibernateDataLoaderServiceImp.java:506)
at com.coginfo.framework.action.DeleteAction.executeDelete(DeleteAction.java:75)
at com.coginfo.framework.action.DeleteAction.executeAction(DeleteAction.java:46)
at com.coginfo.asc.struts.AscBaseActionNoSession.execute(AscBaseActionNoSession.java:60)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Unknown Source)
Name and version of the database you are using:
Oracle 9i
What is this??? what must i change?
Thansk.