-->
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: need help with hibernate eception
PostPosted: Fri Feb 27, 2009 5:59 am 
Newbie

Joined: Tue Feb 10, 2009 6:01 am
Posts: 3
Location: LAgos
i want to know the accouttype and compare it against account actiontype deposit but its is giving an hibernate exception

root cause

org.hibernate.PropertyAccessException: Exception occurred inside setter of org.mifos.application.accounts.savings.business.SavingsBO.savingsBalance
org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:65)
org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:337)
org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:200)


void setSavingsBalance(Money savingsBalance)
{
Integer at=6;
SavingsTrxnDetailEntity trxn1=null;
int test=this.getAccountId();
if(trxn1.getAccountAction().equals(AccountActionTypes.SAVINGS_DEPOSIT))
{

try
{
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/allovermfb",
"root", "");
PreparedStatement update = con.prepareStatement("UPDATE SAVINGS_ACCOUNT SET Flag = ? WHERE ACCOUNT_ID = ? ");
update.setInt(1, 1);
update.setInt(2, test);
update.executeUpdate();
}
catch(Exception e)
{
System.out.println("erroe"+ e);
}
}
this.savingsBalance = savingsBalance;
}

_________________
Laa


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 27, 2009 6:33 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
Quote:
SavingsTrxnDetailEntity trxn1=null;
...
if(trxn1.getAccountAction() ....


Seems like you get a NullPointerException here.


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.