-->
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.  [ 3 posts ] 
Author Message
 Post subject: Help understanding exception
PostPosted: Tue Dec 30, 2003 11:14 pm 
Beginner
Beginner

Joined: Tue Sep 02, 2003 3:25 pm
Posts: 21
Location: Kingston Jamaica, West Indies
Does anyone have any idea why i would get this exception and what does it mean.!!!


java.lang.NullPointerException
[12/30/03 22:13:21:281 GMT-05:00] 124d84d6 SystemErr R at net.sf.hibernate.type.IntegerType.next(IntegerType.java:49)
[12/30/03 22:13:21:281 GMT-05:00] 124d84d6 SystemErr R at net.sf.hibernate.engine.Versioning.increment(Versioning.java:25)
[12/30/03 22:13:21:281 GMT-05:00] 124d84d6 SystemErr R at net.sf.hibernate.impl.SessionImpl.getNextVersion(SessionImpl.java:2507)
[12/30/03 22:13:21:281 GMT-05:00] 124d84d6 SystemErr R at net.sf.hibernate.impl.SessionImpl.flushEntity(SessionImpl.java(Compiled Code))
[12/30/03 22:13:21:281 GMT-05:00] 124d84d6 SystemErr R at net.sf.hibernate.impl.SessionImpl.flushEntities(SessionImpl.java(Compiled Code))
[12/30/03 22:13:21:281 GMT-05:00] 124d84d6 SystemErr R at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2207)
[12/30/03 22:13:21:281 GMT-05:00] 124d84d6 SystemErr R at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2186)
[12/30/03 22:13:21:281 GMT-05:00] 124d84d6 SystemErr R at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
[12/30/03 22:13:21:281 GMT-05:00] 124d84d6 SystemErr R at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:252)
[12/30/03 22:13:21:281 GMT-05:00] 124d84d6 SystemErr R at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:122)
[12/30/03 22:13:21:281 GMT-05:00] 124d84d6 SystemErr R at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:108)
[12/30/03 22:13:21:297 GMT-05:00] 124d84d6 SystemErr R at org.fsl.lmis.licensing.LicensingService.createApplication(LicensingService.java:2019)
[12/30/03 22:13:21:297 GMT-05:00] 124d84d6 SystemErr R at org.fsl.lmis.licensing.struts.actions.LicenseApplication2Action.doCreate(LicenseApplication2Action.java:144)
[12/30/03 22:13:21:297 GMT-05:00] 124d84d6 SystemErr R at org.fsl.lmis.licensing.struts.actions.LicenseApplicationBaseAction.Submit(LicenseApplicationBaseAction.java:129)


------------
Example of my mapping

<hibernate-mapping>
<class name="org.fsl.lmis.licensing.businessobjects.LicenceApplication"
table="APPLICATION"
schema="LICENSING"
dynamic-update="false"
dynamic-insert="true"
discriminator-value="0">

<id name="applicationNumber" column="APPL_NO" type="long">
<generator class="assigned"/>
</id>

<discriminator column="LIC_TYPE" type="short"/>

<version name="versionNbr" column="VERSION_NBR" type="integer" />


<property name="lastUpdateTime" column="UPDATE_DTIME" type="timestamp"/>
<property name="licenceType" column="LIC_TYPE" type="short" insert="false" update="false"/>

<property name="applicationStatus" column="APPL_STATUS" type="integer"/>
<property name="applicationStatusDate" column="APPL_STATUS_DATE" type="date"/>
<property name="applicationDate" column="APPL_DATE" type="date"/>
<property name="applicationEntryDate" column="APPL_ENTRY_DATE" type="date"/>

<property name="firstName" column="FIRST_NAME" type="string"/>
<property name="lastName" column="LAST_NAME" type="string"/>
<property name="tccNumber" column="TCC_NO" type="string"/>

<property name="locationCodeValue" column="LOC_CODE" type="string"/>
<property name="pickupLocationCodeValue" column="PICKUP_LOC_CODE" type="string"/>
<property name="parishCodeValue" column="PARISH_CODE" type="string"/>
<property name="routeCodeValue" column="ROUTE_CODE" type="integer"/>
<property name="areaCodeValue" column="AREA_CODE" type="string"/>

<property name="streetNumber" column="STREET_NO" type="string"/>
<property name="streetName" column="STREET_NAME" type="string"/>

<property name="mark" column="MARK" type="string"/>
<property name="dueAmount" column="DUE_AMT" type="big_decimal"/>
<property name="paidAmount" column="PAID_AMT" type="big_decimal"/>
<property name="poBox" column="PO_BOX" type="string"/>
<property name="postOffice" column="POST_OFFICE" type="string"/>
<property name="assignedByUser" column="ASSN_BY_USER" type="string"/>
<property name="assignedToUser" column="ASSN_TO_USER" type="string"/>



<list name="routePoints"
table="APP_ROUTE_POINTS"
schema="LICENSING"
inverse="true"
lazy="false"
cascade="none">
<key column="APPL_NO"/>
<index column="SEQ_NO" type="integer"/>
<one-to-many class="org.fsl.lmis.licensing.businessobjects.RoutePoint"/>
</list>

<list name="otherOwners"
table="OTHER_OWNER"
schema="LICENSING"
inverse="true"
lazy="false"
cascade="none">
<key column="APPL_NO"/>
<index column="OWNER_SNO" type="integer"/>
<one-to-many class="org.fsl.lmis.licensing.businessobjects.OtherOwner"/>
</list>




<many-to-one name="customer"
class="org.fsl.lmis.licensing.businessobjects.Customer"
column="CUST_ID"
cascade="save-update"/>

<many-to-one name="previousApplication"
class="org.fsl.lmis.licensing.businessobjects.LicenceApplication"
column="PREV_APPL_NO" />

<many-to-one name="previousLicence"
class="org.fsl.lmis.licensing.businessobjects.Licence"
column="PREV_LIC_NO"/>


<!-- Redundant field just to track if a LicenceApplication is a renewal -->
<property name="previousLicenceNo" column="PREV_LIC_NO"
type="long"
insert="false"
update="false"/>


<set name="licence"
inverse="true"
lazy="false">
<key column="APPL_NO"/>
<one-to-many class="org.fsl.lmis.licensing.businessobjects.Licence" />
</set>

<set
name="vehicles"
inverse="true"
lazy="false"
cascade="none">

<key column="LAST_APPL_NO"/>
<one-to-many class="org.fsl.lmis.licensing.businessobjects.Vehicle" />
</set>

<set
name="applicationFees"
inverse="true"
lazy="false"
cascade="none" >

<key column="APPL_NO"/>
<one-to-many class="org.fsl.lmis.licensing.businessobjects.ApplicationFee" />
</set>

<subclass name="org.fsl.lmis.licensing.businessobjects.PrivateCarrierLicenceApplication"
discriminator-value="1"
dynamic-update="true"
dynamic-insert="true">
</subclass>

<subclass name="org.fsl.lmis.licensing.businessobjects.PublicCarrierLicenceApplication"
discriminator-value="2"
dynamic-update="true"
dynamic-insert="true">
</subclass>

<subclass name="org.fsl.lmis.licensing.businessobjects.RouteTaxiLicenceApplication"
discriminator-value="3"
dynamic-update="true"
dynamic-insert="true">
</subclass>

<subclass name="org.fsl.lmis.licensing.businessobjects.HackneyCarriageLicenceApplication"
discriminator-value="4"
dynamic-update="true"
dynamic-insert="true">
</subclass>

<subclass name="org.fsl.lmis.licensing.businessobjects.RuralStageCarriageLicenceApplication"
discriminator-value="5"
dynamic-update="true"
dynamic-insert="true">
</subclass>

<subclass name="org.fsl.lmis.licensing.businessobjects.ContractCarriageLicenceApplication"
discriminator-value="6"
dynamic-update="true"
dynamic-insert="true">
</subclass>

<subclass name="org.fsl.lmis.licensing.businessobjects.MMRLicenceApplication"
discriminator-value="7"
dynamic-update="true"
dynamic-insert="true">
</subclass>

<subclass name="org.fsl.lmis.licensing.businessobjects.NTCSLicenceApplication"
discriminator-value="8"
dynamic-update="true"
dynamic-insert="true">
</subclass>

<subclass name="org.fsl.lmis.licensing.businessobjects.JUTCStageCarriageLicenceApplication"
discriminator-value="9"
dynamic-update="true"
dynamic-insert="true">
</subclass>

<subclass name="org.fsl.lmis.licensing.businessobjects.JUTCExpressLicenceApplication"
discriminator-value="10"
dynamic-update="true"
dynamic-insert="true">
</subclass>

<subclass name="org.fsl.lmis.licensing.businessobjects.HackneyCarriageMeteredLicenceApplication"
discriminator-value="11"
dynamic-update="true"
dynamic-insert="true">
</subclass>

<subclass name="org.fsl.lmis.licensing.businessobjects.HackneyCarriageUnmeteredLicenceApplication"
discriminator-value="12"
dynamic-update="true"
dynamic-insert="true">
</subclass>

<subclass name="org.fsl.lmis.licensing.businessobjects.ContractCarriageCarLicenceApplication"
discriminator-value="13"
dynamic-update="true"
dynamic-insert="true">
</subclass>

<subclass name="org.fsl.lmis.licensing.businessobjects.ContractCarriageBusLicenceApplication"
discriminator-value="14"
dynamic-update="true"
dynamic-insert="true">
</subclass>
</class>

</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 31, 2003 4:20 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
You're probably updating a versioned object that have null in it's version property. Hibernate tries to get the next number of a null value.

Are you sure that you don't swallow an HibernateException from session ? Once session raise an exception, Hibernate should not be used since it may be in an inconsistent state.

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Thanks
PostPosted: Wed Dec 31, 2003 11:44 am 
Beginner
Beginner

Joined: Tue Sep 02, 2003 3:25 pm
Posts: 21
Location: Kingston Jamaica, West Indies
I found where it was null thanks again


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.