Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0.5
Mapping documents:
Scorecard.hbm.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="net.hcsc.service.perfmngmt.scorecard.Scorecard" table="SCORECARD">
<composite-id name="id" class="net.hcsc.service.perfmngmt.scorecard.ScorecardId">
<key-property name="id" column="SCORECARD_ID" type="string"/>
<key-property name="version" column="SCORECARD_VERSION" type="integer"/>
</composite-id>
<component name="name" class="net.hcsc.service.perfmngmt.scorecard.ScorecardName">
<property name="name" column="SCORECARD_NAME" type="string"/>
</component>
<property name="description" column="SCORECARD_DESCRIPTION" type="text"/>
<component name="comment" class="net.hcsc.service.perfmngmt.result.Comment">
<property name="title" column="SCORECARD_COMMENT_TITLE" type="string" />
<property name="comment" column="SCORECARD_COMMENT" type="text" />
</component>
<component name="effectiveDates" class="net.hcsc.util.id.EffectiveDates">
<property name="startDate" column="SCORECARD_START_DATE" type="calendar" />
<property name="endDate" column="SCORECARD_END_DATE" type="calendar" />
</component>
<!-- Parent can be null for root categories. -->
<many-to-one name="parent" cascade="none" lazy="false">
<column name="PARENT_SCORECARD_ID" not-null="false" unique-key="UNIQUE_NAME_AT_LEVEL"/>
<column name="PARENT_SCORECARD_VERSION" not-null="false" unique-key="UNIQUE_NAME_AT_LEVEL"/>
</many-to-one>
<map name="indicators" cascade="all" lazy="false" inverse="true">
<key>
<column name="SCORECARD_ID"/>
<column name="SCORECARD_VERSION"/>
</key>
<map-key column="INDICATOR" type="string"/>
<one-to-many class="net.hcsc.service.perfmngmt.indicator.ScorecardIndicator"/>
</map>
<map name="childScorecards" cascade="all" outer-join="true" lazy="false">
<key >
<column name="PARENT_SCORECARD_ID"/>
<column name="PARENT_SCORECARD_VERSION"/>
</key>
<composite-map-key class="net.hcsc.service.perfmngmt.scorecard.ScorecardId">
<key-property name="id" column="SCORECARD_ID" type="string"/>
<key-property name="version" column="SCORECARD_VERSION" type="integer"/>
</composite-map-key>
<one-to-many class="net.hcsc.service.perfmngmt.scorecard.Scorecard" />
</map>
<map name="measures" table="SCORECARD_MEASURE" cascade="all" lazy="false">
<key>
<column name="SCORECARD_ID"/>
<column name="SCORECARD_VERSION"/>
</key>
<composite-map-key class="net.hcsc.util.id.VersionedID">
<key-property name="id" column="ASSOC_MEASURE_ID" type="string"/>
<key-property name="version" column="ASSOC_MEASURE_VERSION" type="integer"/>
</composite-map-key>
<one-to-many class="net.hcsc.service.perfmngmt.scorecard.AssociatedMeasure" />
</map>
<map name="properties" table="PROPERTIES" cascade="all" lazy="false">
<key>
<column name="SCORECARD_ID"/>
<column name="SCORECARD_VERSION"/>
</key>
<map-key column="PROPERTY_NAME" type="string"/>
<one-to-many class="net.hcsc.service.perfmngmt.properties.Property"/>
</map>
</class>
</hibernate-mapping>
Indicator.hbm.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="net.hcsc.service.perfmngmt.indicator.Indicator" table="INDICATORS">
<id name="id" column="ID" type="long" access="field">
<generator class="native"/>
</id>
<discriminator>
<column name="DISCRIMINATOR"/>
</discriminator>
<property name="indicator" column="INDICATOR" type="string" />
<subclass name="net.hcsc.service.perfmngmt.indicator.KpiIndicator" discriminator-value="KPI"/>
<subclass name="net.hcsc.service.perfmngmt.indicator.MeasureIndicator" discriminator-value="MEASURE"/>
<subclass name="net.hcsc.service.perfmngmt.indicator.ResultIndicator" discriminator-value="RESULT"/>
<subclass name="net.hcsc.service.perfmngmt.indicator.ScorecardIndicator" discriminator-value="SCORECARD"/>
<subclass name="net.hcsc.service.perfmngmt.indicator.ScoreIndicator" discriminator-value="SCORE"/>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
I am using spring 1.2.5 using HibernateDaoSupport
/**
* Persists a Scorecard object
* @param aScorecard
* @throws BusinessException
*/
public void makePersistent(Scorecard aScorecard) throws BusinessException {
try {
getSession().saveOrUpdate(aScorecard);
} catch (HibernateException ex) {
throw new BusinessException(new TraceableException(ex));
}
}
Full stack trace of any exception that occurs:
2005-11-02 08:07:42,656 DEBUG [RMI TCP Connection(4)-127.0.0.1] (RemoteInvocationBasedExporter.java:92) - Target method failed for RemoteInvocation: methodName='saveDefinitionHierarchy', parameterTypes=[class net.hcsc.service.perfmngmt.scorecard.Scorecard]
java.lang.NullPointerException
at com.microsoft.jdbc.sqlserver.tds.TDSRPCParameter.initializeUserParam(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.addUserParametersToRPC(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:104)
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1853)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2200)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:46)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
at org.hibernate.engine.ActionQueue.executeInserts(ActionQueue.java:127)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:196)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:160)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:95)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:184)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:173)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:96)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:468)
at org.hibernate.engine.Cascades$5.cascade(Cascades.java:154)
at org.hibernate.engine.Cascades.cascadeAssociation(Cascades.java:771)
at org.hibernate.engine.Cascades.cascade(Cascades.java:720)
at org.hibernate.engine.Cascades.cascadeCollection(Cascades.java:895)
at org.hibernate.engine.Cascades.cascadeAssociation(Cascades.java:792)
at org.hibernate.engine.Cascades.cascade(Cascades.java:720)
at org.hibernate.engine.Cascades.cascade(Cascades.java:847)
at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:363)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:265)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:160)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:108)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:184)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:173)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:96)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:468)
at org.hibernate.engine.Cascades$5.cascade(Cascades.java:154)
at org.hibernate.engine.Cascades.cascadeAssociation(Cascades.java:771)
at org.hibernate.engine.Cascades.cascade(Cascades.java:720)
at org.hibernate.engine.Cascades.cascadeCollection(Cascades.java:895)
at org.hibernate.engine.Cascades.cascadeAssociation(Cascades.java:792)
at org.hibernate.engine.Cascades.cascade(Cascades.java:720)
at org.hibernate.engine.Cascades.cascade(Cascades.java:847)
at org.hibernate.event.def.AbstractSaveEventListener.cascadeAfterSave(AbstractSaveEventListener.java:363)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:265)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:160)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:108)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:184)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:173)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:96)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:468)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:463)
at net.hcsc.service.perfmngmt.persistance.dao.ScorecardDAO.makePersistent(ScorecardDAO.java:130)
at net.hcsc.service.perfmngmt.businessobjects.KpiSpecificationBusinessObject.persistScorecard(KpiSpecificationBusinessObject.java:90)
at net.hcsc.service.perfmngmt.service.admin.KpiAdminImpl.saveDefinitionHierarchy(KpiAdminImpl.java:139)
at net.hcsc.service.perfmngmt.service.admin.KpiAdminImpl$$FastClassByCGLIB$$759d6b78.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:698)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:643)
at net.hcsc.service.perfmngmt.service.admin.KpiAdminImpl$$EnhancerByCGLIB$$384d4cb9.saveDefinitionHierarchy(<generated>)
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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:292)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:68)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
at $Proxy2.saveDefinitionHierarchy(Unknown Source)
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.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:179)
at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:33)
at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:76)
at org.springframework.remoting.rmi.RmiBasedExporter.invoke(RmiBasedExporter.java:72)
at org.springframework.remoting.rmi.RmiInvocationWrapper.invoke(RmiInvocationWrapper.java:62)
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 sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Name and version of the database you are using:
SQL Server 2000
The generated SQL (show_sql=true):
see below
Debug level Hibernate log excerpt:
2005-11-02 08:07:41,703 INFO [main] (TestSaveScorecardHierachy.java:295) - save definition hierarchy
2005-11-02 08:07:41,953 DEBUG [RMI TCP Connection(4)-127.0.0.1] (RemoteInvocationBasedExporter.java:73) - Applying RemoteInvocation: methodName='saveDefinitionHierarchy', parameterTypes=[class net.hcsc.service.perfmngmt.scorecard.Scorecard]
2005-11-02 08:07:41,953 DEBUG [RMI TCP Connection(4)-127.0.0.1] (RemoteInvocationTraceInterceptor.java:64) - Incoming RmiServiceExporter remote call: net.hcsc.service.perfmngmt.service.admin.IKpiAdmin.saveDefinitionHierarchy
2005-11-02 08:07:41,953 DEBUG [RMI TCP Connection(4)-127.0.0.1] (TransactionAspectSupport.java:213) - Getting transaction for net.hcsc.service.perfmngmt.service.admin.KpiAdminImpl.saveDefinitionHierarchy
2005-11-02 08:07:41,953 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractPlatformTransactionManager.java:252) - Using transaction object [org.springframework.orm.hibernate3.HibernateTransactionManager$HibernateTransactionObject@1162212]
2005-11-02 08:07:41,953 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractPlatformTransactionManager.java:279) - Creating new transaction with name [net.hcsc.service.perfmngmt.service.admin.KpiAdminImpl.saveDefinitionHierarchy]
2005-11-02 08:07:42,000 DEBUG [RMI TCP Connection(4)-127.0.0.1] (SessionImpl.java:250) - opened session at timestamp: 11309404620
2005-11-02 08:07:42,000 DEBUG [RMI TCP Connection(4)-127.0.0.1] (HibernateTransactionManager.java:398) - Opened new Session [org.hibernate.impl.SessionImpl@16daa9] for Hibernate transaction
2005-11-02 08:07:42,031 DEBUG [RMI TCP Connection(4)-127.0.0.1] (ConnectionManager.java:296) - opening JDBC connection
2005-11-02 08:07:42,031 DEBUG [RMI TCP Connection(4)-127.0.0.1] (JDBCTransaction.java:46) - begin
2005-11-02 08:07:42,031 DEBUG [RMI TCP Connection(4)-127.0.0.1] (JDBCTransaction.java:50) - current autocommit status: false
2005-11-02 08:07:42,031 DEBUG [RMI TCP Connection(4)-127.0.0.1] (TransactionSynchronizationManager.java:161) - Bound value [org.springframework.orm.hibernate3.SessionHolder@17f4fbb] for key [org.hibernate.impl.SessionFactoryImpl@1ea0105] to thread [RMI TCP Connection(4)-127.0.0.1]
2005-11-02 08:07:42,031 DEBUG [RMI TCP Connection(4)-127.0.0.1] (TransactionSynchronizationManager.java:213) - Initializing transaction synchronization
2005-11-02 08:07:42,046 DEBUG [RMI TCP Connection(4)-127.0.0.1] (TransactionSynchronizationManager.java:136) - Retrieved value [org.springframework.orm.hibernate3.SessionHolder@17f4fbb] for key [org.hibernate.impl.SessionFactoryImpl@1ea0105] bound to thread [RMI TCP Connection(4)-127.0.0.1]
2005-11-02 08:07:42,109 DEBUG [RMI TCP Connection(4)-127.0.0.1] (Cascades.java:588) - id unsaved-value strategy UNDEFINED
2005-11-02 08:07:42,109 DEBUG [RMI TCP Connection(4)-127.0.0.1] (BasicEntityPersister.java:860) - Getting current persistent state for: [net.hcsc.service.perfmngmt.scorecard.Scorecard#component[id,version]{id=CONTCOMP, version=1}]
2005-11-02 08:07:42,109 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractBatcher.java:290) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2005-11-02 08:07:42,125 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractBatcher.java:324) - select scorecard_.SCORECARD_ID, scorecard_.SCORECARD_VERSION, scorecard_.SCORECARD_NAME as SCORECARD3_17_, scorecard_.SCORECARD_DESCRIPTION as SCORECARD4_17_, scorecard_.SCORECARD_COMMENT_TITLE as SCORECARD5_17_, scorecard_.SCORECARD_COMMENT as SCORECARD6_17_, scorecard_.SCORECARD_START_DATE as SCORECARD7_17_, scorecard_.SCORECARD_END_DATE as SCORECARD8_17_, scorecard_.PARENT_SCORECARD_ID as PARENT9_17_, scorecard_.PARENT_SCORECARD_VERSION as PARENT10_17_ from SCORECARD scorecard_ where scorecard_.SCORECARD_ID=? and scorecard_.SCORECARD_VERSION=?
2005-11-02 08:07:42,125 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractBatcher.java:378) - preparing statement
2005-11-02 08:07:42,281 DEBUG [RMI TCP Connection(4)-127.0.0.1] (NullableType.java:59) - binding 'CONTCOMP' to parameter: 1
2005-11-02 08:07:42,296 DEBUG [RMI TCP Connection(4)-127.0.0.1] (NullableType.java:59) - binding '1' to parameter: 2
2005-11-02 08:07:42,343 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractBatcher.java:298) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2005-11-02 08:07:42,343 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractBatcher.java:416) - closing statement
2005-11-02 08:07:42,343 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractSaveEventListener.java:410) - transient instance of: net.hcsc.service.perfmngmt.scorecard.Scorecard
2005-11-02 08:07:42,343 DEBUG [RMI TCP Connection(4)-127.0.0.1] (DefaultSaveOrUpdateEventListener.java:159) - saving transient instance
2005-11-02 08:07:42,343 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractSaveEventListener.java:100) - generated identifier: component[id,version]{id=CONTCOMP, version=1}, using strategy: org.hibernate.id.Assigned
2005-11-02 08:07:42,343 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractSaveEventListener.java:133) - saving [net.hcsc.service.perfmngmt.scorecard.Scorecard#component[id,version]{id=CONTCOMP, version=1}]
2005-11-02 08:07:42,359 DEBUG [RMI TCP Connection(4)-127.0.0.1] (Cascades.java:836) - processing cascade ACTION_SAVE_UPDATE for: net.hcsc.service.perfmngmt.scorecard.Scorecard
2005-11-02 08:07:42,359 DEBUG [RMI TCP Connection(4)-127.0.0.1] (Cascades.java:861) - done processing cascade ACTION_SAVE_UPDATE for: net.hcsc.service.perfmngmt.scorecard.Scorecard
2005-11-02 08:07:42,375 DEBUG [RMI TCP Connection(4)-127.0.0.1] (WrapVisitor.java:86) - Wrapped collection in role: net.hcsc.service.perfmngmt.scorecard.Scorecard.indicators
2005-11-02 08:07:42,375 DEBUG [RMI TCP Connection(4)-127.0.0.1] (WrapVisitor.java:86) - Wrapped collection in role: net.hcsc.service.perfmngmt.scorecard.Scorecard.childScorecards
2005-11-02 08:07:42,375 DEBUG [RMI TCP Connection(4)-127.0.0.1] (WrapVisitor.java:86) - Wrapped collection in role: net.hcsc.service.perfmngmt.scorecard.Scorecard.measures
2005-11-02 08:07:42,375 DEBUG [RMI TCP Connection(4)-127.0.0.1] (WrapVisitor.java:86) - Wrapped collection in role: net.hcsc.service.perfmngmt.scorecard.Scorecard.properties
2005-11-02 08:07:42,390 DEBUG [RMI TCP Connection(4)-127.0.0.1] (Cascades.java:836) - processing cascade ACTION_SAVE_UPDATE for: net.hcsc.service.perfmngmt.scorecard.Scorecard
2005-11-02 08:07:42,390 DEBUG [RMI TCP Connection(4)-127.0.0.1] (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: net.hcsc.service.perfmngmt.scorecard.Scorecard.indicators
2005-11-02 08:07:42,390 DEBUG [RMI TCP Connection(4)-127.0.0.1] (Cascades.java:908) - done cascade ACTION_SAVE_UPDATE for collection: net.hcsc.service.perfmngmt.scorecard.Scorecard.indicators
2005-11-02 08:07:42,406 DEBUG [RMI TCP Connection(4)-127.0.0.1] (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: net.hcsc.service.perfmngmt.scorecard.Scorecard.childScorecards
2005-11-02 08:07:42,406 DEBUG [RMI TCP Connection(4)-127.0.0.1] (Cascades.java:153) - cascading to saveOrUpdate: net.hcsc.service.perfmngmt.scorecard.Scorecard
2005-11-02 08:07:42,406 DEBUG [RMI TCP Connection(4)-127.0.0.1] (Cascades.java:588) - id unsaved-value strategy UNDEFINED
2005-11-02 08:07:42,406 DEBUG [RMI TCP Connection(4)-127.0.0.1] (BasicEntityPersister.java:860) - Getting current persistent state for: [net.hcsc.service.perfmngmt.scorecard.Scorecard#component[id,version]{id=CORP, version=1}]
2005-11-02 08:07:42,406 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractBatcher.java:290) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2005-11-02 08:07:42,406 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractBatcher.java:324) - select scorecard_.SCORECARD_ID, scorecard_.SCORECARD_VERSION, scorecard_.SCORECARD_NAME as SCORECARD3_17_, scorecard_.SCORECARD_DESCRIPTION as SCORECARD4_17_, scorecard_.SCORECARD_COMMENT_TITLE as SCORECARD5_17_, scorecard_.SCORECARD_COMMENT as SCORECARD6_17_, scorecard_.SCORECARD_START_DATE as SCORECARD7_17_, scorecard_.SCORECARD_END_DATE as SCORECARD8_17_, scorecard_.PARENT_SCORECARD_ID as PARENT9_17_, scorecard_.PARENT_SCORECARD_VERSION as PARENT10_17_ from SCORECARD scorecard_ where scorecard_.SCORECARD_ID=? and scorecard_.SCORECARD_VERSION=?
2005-11-02 08:07:42,406 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractBatcher.java:378) - preparing statement
2005-11-02 08:07:42,406 DEBUG [RMI TCP Connection(4)-127.0.0.1] (NullableType.java:59) - binding 'CORP' to parameter: 1
2005-11-02 08:07:42,421 DEBUG [RMI TCP Connection(4)-127.0.0.1] (NullableType.java:59) - binding '1' to parameter: 2
2005-11-02 08:07:42,421 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractBatcher.java:298) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2005-11-02 08:07:42,421 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractBatcher.java:416) - closing statement
2005-11-02 08:07:42,421 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractSaveEventListener.java:410) - transient instance of: net.hcsc.service.perfmngmt.scorecard.Scorecard
2005-11-02 08:07:42,421 DEBUG [RMI TCP Connection(4)-127.0.0.1] (DefaultSaveOrUpdateEventListener.java:159) - saving transient instance
2005-11-02 08:07:42,421 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractSaveEventListener.java:100) - generated identifier: component[id,version]{id=CORP, version=1}, using strategy: org.hibernate.id.Assigned
2005-11-02 08:07:42,437 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractSaveEventListener.java:133) - saving [net.hcsc.service.perfmngmt.scorecard.Scorecard#component[id,version]{id=CORP, version=1}]
2005-11-02 08:07:42,437 DEBUG [RMI TCP Connection(4)-127.0.0.1] (Cascades.java:836) - processing cascade ACTION_SAVE_UPDATE for: net.hcsc.service.perfmngmt.scorecard.Scorecard
2005-11-02 08:07:42,437 DEBUG [RMI TCP Connection(4)-127.0.0.1] (Cascades.java:861) - done processing cascade ACTION_SAVE_UPDATE for: net.hcsc.service.perfmngmt.scorecard.Scorecard
2005-11-02 08:07:42,437 DEBUG [RMI TCP Connection(4)-127.0.0.1] (WrapVisitor.java:86) - Wrapped collection in role: net.hcsc.service.perfmngmt.scorecard.Scorecard.indicators
2005-11-02 08:07:42,437 DEBUG [RMI TCP Connection(4)-127.0.0.1] (WrapVisitor.java:86) - Wrapped collection in role: net.hcsc.service.perfmngmt.scorecard.Scorecard.childScorecards
2005-11-02 08:07:42,437 DEBUG [RMI TCP Connection(4)-127.0.0.1] (WrapVisitor.java:86) - Wrapped collection in role: net.hcsc.service.perfmngmt.scorecard.Scorecard.measures
2005-11-02 08:07:42,437 DEBUG [RMI TCP Connection(4)-127.0.0.1] (WrapVisitor.java:86) - Wrapped collection in role: net.hcsc.service.perfmngmt.scorecard.Scorecard.properties
2005-11-02 08:07:42,437 DEBUG [RMI TCP Connection(4)-127.0.0.1] (Cascades.java:836) - processing cascade ACTION_SAVE_UPDATE for: net.hcsc.service.perfmngmt.scorecard.Scorecard
2005-11-02 08:07:42,437 DEBUG [RMI TCP Connection(4)-127.0.0.1] (Cascades.java:890) - cascade ACTION_SAVE_UPDATE for collection: net.hcsc.service.perfmngmt.scorecard.Scorecard.indicators
2005-11-02 08:07:42,437 DEBUG [RMI TCP Connection(4)-127.0.0.1] (Cascades.java:153) - cascading to saveOrUpdate: net.hcsc.service.perfmngmt.indicator.ScorecardIndicator
2005-11-02 08:07:42,453 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractSaveEventListener.java:410) - transient instance of: net.hcsc.service.perfmngmt.indicator.ScorecardIndicator
2005-11-02 08:07:42,453 DEBUG [RMI TCP Connection(4)-127.0.0.1] (DefaultSaveOrUpdateEventListener.java:159) - saving transient instance
2005-11-02 08:07:42,453 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractSaveEventListener.java:133) - saving [net.hcsc.service.perfmngmt.indicator.ScorecardIndicator#<null>]
2005-11-02 08:07:42,453 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractSaveEventListener.java:195) - executing insertions
2005-11-02 08:07:42,453 DEBUG [RMI TCP Connection(4)-127.0.0.1] (BasicEntityPersister.java:1825) - Inserting entity: [net.hcsc.service.perfmngmt.scorecard.Scorecard#component[id,version]{id=CONTCOMP, version=1}]
2005-11-02 08:07:42,453 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractBatcher.java:290) - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2005-11-02 08:07:42,468 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractBatcher.java:324) - insert into SCORECARD (SCORECARD_NAME, SCORECARD_DESCRIPTION, SCORECARD_COMMENT_TITLE, SCORECARD_COMMENT, SCORECARD_START_DATE, SCORECARD_END_DATE, PARENT_SCORECARD_ID, PARENT_SCORECARD_VERSION, SCORECARD_ID, SCORECARD_VERSION) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2005-11-02 08:07:42,468 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractBatcher.java:378) - preparing statement
2005-11-02 08:07:42,484 DEBUG [RMI TCP Connection(4)-127.0.0.1] (BasicEntityPersister.java:1612) - Dehydrating entity: [net.hcsc.service.perfmngmt.scorecard.Scorecard#component[id,version]{id=CONTCOMP, version=1}]
2005-11-02 08:07:42,484 DEBUG [RMI TCP Connection(4)-127.0.0.1] (NullableType.java:59) - binding 'ContingentComp' to parameter: 1
2005-11-02 08:07:42,484 DEBUG [RMI TCP Connection(4)-127.0.0.1] (NullableType.java:59) - binding 'root scorecard' to parameter: 2
2005-11-02 08:07:42,484 DEBUG [RMI TCP Connection(4)-127.0.0.1] (NullableType.java:52) - binding null to parameter: 3
2005-11-02 08:07:42,484 DEBUG [RMI TCP Connection(4)-127.0.0.1] (NullableType.java:52) - binding null to parameter: 4
2005-11-02 08:07:42,484 DEBUG [RMI TCP Connection(4)-127.0.0.1] (NullableType.java:59) - binding '2005-02-01 08:07:41' to parameter: 5
2005-11-02 08:07:42,500 DEBUG [RMI TCP Connection(4)-127.0.0.1] (NullableType.java:59) - binding '2006-01-31 08:07:41' to parameter: 6
2005-11-02 08:07:42,500 DEBUG [RMI TCP Connection(4)-127.0.0.1] (NullableType.java:52) - binding null to parameter: 7
2005-11-02 08:07:42,500 DEBUG [RMI TCP Connection(4)-127.0.0.1] (NullableType.java:52) - binding null to parameter: 8
2005-11-02 08:07:42,500 DEBUG [RMI TCP Connection(4)-127.0.0.1] (NullableType.java:59) - binding 'CONTCOMP' to parameter: 9
2005-11-02 08:07:42,500 DEBUG [RMI TCP Connection(4)-127.0.0.1] (NullableType.java:59) - binding '1' to parameter: 10
2005-11-02 08:07:42,500 DEBUG [RMI TCP Connection(4)-127.0.0.1] (RuleBasedTransactionAttribute.java:119) - Applying rules to determine whether transaction should rollback on java.lang.NullPointerException
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (RuleBasedTransactionAttribute.java:137) - Winning rollback rule is: null
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (RuleBasedTransactionAttribute.java:143) - No relevant rollback rule found: applying superclass default
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (TransactionAspectSupport.java:272) - Invoking rollback for transaction on net.hcsc.service.perfmngmt.service.admin.KpiAdminImpl.saveDefinitionHierarchy due to throwable [java.lang.NullPointerException]
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractPlatformTransactionManager.java:668) - Triggering beforeCompletion synchronization
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractPlatformTransactionManager.java:576) - Initiating transaction rollback
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (HibernateTransactionManager.java:505) - Rolling back Hibernate transaction on Session [org.hibernate.impl.SessionImpl@16daa9]
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (JDBCTransaction.java:132) - rollback
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (JDBCContext.java:278) - before transaction completion
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (SessionImpl.java:372) - before transaction completion
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (JDBCTransaction.java:143) - rolled back JDBC Connection
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (JDBCContext.java:283) - after transaction completion
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (SessionImpl.java:403) - after transaction completion
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (AbstractPlatformTransactionManager.java:692) - Triggering afterCompletion synchronization
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (TransactionSynchronizationManager.java:259) - Clearing transaction synchronization
2005-11-02 08:07:42,515 DEBUG [RMI TCP Connection(4)-127.0.0.1] (TransactionSynchronizationManager.java:184) - Removed value [org.springframework.orm.hibernate3.SessionHolder@17f4fbb] for key [org.hibernate.impl.SessionFactoryImpl@1ea0105] from thread [RMI TCP Connection(4)-127.0.0.1]
2005-11-02 08:07:42,562 DEBUG [RMI TCP Connection(4)-127.0.0.1] (HibernateTransactionManager.java:560) - Closing Hibernate Session [org.hibernate.impl.SessionImpl@16daa9] after transaction
2005-11-02 08:07:42,562 DEBUG [RMI TCP Connection(4)-127.0.0.1] (SessionFactoryUtils.java:777) - Closing Hibernate Session
2005-11-02 08:07:42,562 DEBUG [RMI TCP Connection(4)-127.0.0.1] (SessionImpl.java:269) - closing session
2005-11-02 08:07:42,562 DEBUG [RMI TCP Connection(4)-127.0.0.1] (ConnectionManager.java:317) - closing JDBC connection [ (open PreparedStatements: 1, globally: 1) (open ResultSets: 0, globally: 0)]
Iam building a standalone rmi service. I am trying to save a hierachy of objects to the database. During the process it begins to cascade the indicator collection for the scorecard but I receive the above null pointer exception. When I remove the code to add the indicator to the collection I do not receive the error. Could anybody give me a hint as to what to look for? Thanks in advance