hi!

I've got this exception from hibernate 2.1.3

Caused by: net.sf.hibernate.PropertyAccessException: Null value was
assigned to a property of primitive type setter of
com.netvisor.ttm.persistence.TTMDSLTask.sapInstId
at
net.sf.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPro
pertyAccessor.java:42)
at
net.sf.hibernate.persister.AbstractEntityPersister.setPropertyValues(Abs
tractEntityPersister.java:221)
at
net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2199
)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:240)
at
net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo
ader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
at net.sf.hibernate.loader.Loader.list(Loader.java:946)
at net.sf.hibernate.loader.CriteriaLoader.list(CriteriaLoader.java:121)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3604)
at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:238)
at
com.netvisor.common.data_model_metadata.HibernateEntityMetadata.listByCr
iteria(HibernateEntityMetadata.java:172)
... 83 more
Caused by: java.lang.NullPointerException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
net.sf.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPro
pertyAccessor.java:38)
... 93 more

I've turned off cgi reflection optimizer to see this detailed exception.
the code that triggers it is a simple 

createCriteria().list()

I'm using java 1.4, could it be that you are already playing with 1.5 so
you did not notice this? (I assume setting null to a primitive type sets
the natural value)

hope it helps, 

- 101

Attachment: hibernate.log
Description: hibernate.log

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN"         
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd";>

<hibernate-mapping>
	<class name="com.netvisor.ttm.persistence.TTMDSLTask" table="NV_TTM_DSL_TASKS">
			<cache usage="read-write"/>

			<id column="ID" name="id" length="20">
				<generator class="assigned"/>
			</id>

			<property name="sapId"			column="SAP_ID"			length="10"/>

			<property name="sapInstId"		column="SAP_INST_ID"/>
			<property name="customerName"	column="CUSTOMER_NAME"	length="60"/>
			<property name="siteAddress"	column="SITE_ADDRESS"	length="50"/>
			<property name="phoneNumber"	column="PHONE_NUMBER"	length="20"/>

			<property name="wfmsCreateXml"	column="WFMS_CREATE_XML" length="1024"/>

			<property name="lineId"			column="LINE_ID"		length="20"/>
			<property name="dslType"		column="DSL_TYPE"/>
			<property name="dslProfile"		column="DSL_PROFILE"	length="20"/>

			<property name="dslamDomain"	column="DSLAM_DOMAIN"	length="20"/>
			<property name="dslamNode"		column="DSLAM_NODE"		length="20"/>
			<property name="dslamSlot"		column="DSLAM_SLOT"		length="10"/>
			<property name="dslamPort"		column="DSLAM_PORT"		length="10"/>
			
			<property name="ntSerial"		column="NT_SERIAL"		length="30"/>

			<property name="publicIpAddress" column="PUBLIC_IP_ADDR" length="15"/>
			<property name="mgmtIpAddress"	column="MGMT_IP_ADDR"	length="15"/>

			<property name="routerSerial"	column="ROUTER_SERIAL"	length="30"/>
			<property name="routerDomain"	column="ROUTER_DOMAIN"	length="20"/>

			<!--property name="rekodStatus"	column="REKOD_STATUS"	length="10"		not-null="true"/-->
			<property name="rekodDirty"		column="REKOD_DIRTY"/>

			<!--property name="hpsdStatus"		column="HPSD_STATUS"	length="10"		not-null="true"/-->
			<property name="hpsdDirty"		column="HPSD_DIRTY"/>

			<!--property name="wfmsStatus"		column="WFMS_STATUS"	length="10"		not-null="true"/-->
			<property name="wfmsDirty"		column="WFMS_DIRTY"/>

			<!--property name="ttmStatus"		column="TTM_STATUS"		length="10"		not-null="true"/-->
			<property name="ttmMessage"		column="TTM_MESSAGE"	length="1024"/>

			<property name="lastModifiedRekod"	column="LAST_MOD_REKOD"/>
			<property name="lastModifiedWfms"	column="LAST_MOD_WFMS"/>
			<property name="lastModifiedHpsd"	column="LAST_MOD_HPSD"/>

			<property name="inkaTs"				column="INKA_TS"/>
			<property name="anmsTs"				column="ANMS_TS"/>

	</class>
</hibernate-mapping>




Attachment: TTMDSLTask.java
Description: TTMDSLTask.java

Reply via email to