-->
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.  [ 4 posts ] 
Author Message
 Post subject: Why the NPE happened in hibernate source code?
PostPosted: Mon May 31, 2010 10:25 pm 
Newbie

Joined: Mon May 31, 2010 10:07 pm
Posts: 3
Hi All

There is a NPE was thrown out from hibernate source code, the NPE is a intermittent issue in my test environment, if it didn't happen during 4 hours, it will don't happen any more. Below is my source code:
Code:
SQLQuery query = session.createSQLQuery("update process_instance set step_id=?, status=?, cost=?, time_ended=? where process_id=?");
query.setString(0, inst.getStepId());
query.setInteger(1, inst.getStatus());
query.setLong(2, inst.getCost());
query.setTimestamp(3, inst.getTimeEnded());
query.setLong(4, inst.getProcessId());
                           
int exist = query.executeUpdate();


Below is the statck trace:
2010-05-24 19:16:13,515 ERROR [STDERR] java.lang.NullPointerException
2010-05-24 19:16:13,515 ERROR [STDERR] at org.hibernate.util.ArrayHelper.toTypeArray(ArrayHelper.java:75)
2010-05-24 19:16:13,515 ERROR [STDERR] at org.hibernate.impl.AbstractQueryImpl.typeArray(AbstractQueryImpl.java:831)
2010-05-24 19:16:13,515 ERROR [STDERR] at org.hibernate.impl.AbstractQueryImpl.getQueryParameters(AbstractQueryImpl.java:839)
2010-05-24 19:16:13,515 ERROR [STDERR] at org.hibernate.impl.SQLQueryImpl.getQueryParameters(SQLQueryImpl.java:194)
2010-05-24 19:16:13,515 ERROR [STDERR] at org.hibernate.impl.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:334)
2010-05-24 19:16:13,515 ERROR [STDERR] at test.component.handlers.bpmn.ProcessInstanceLoggerImpl.commit(ProcessInstanceLoggerImpl.java:136)


Top
 Profile  
 
 Post subject: Re: Why the NPE happened in hibernate source code?
PostPosted: Tue Jun 01, 2010 4:20 am 
Newbie

Joined: Mon May 31, 2010 10:07 pm
Posts: 3
Can someone give me a resolution?


Top
 Profile  
 
 Post subject: Re: Why the NPE happened in hibernate source code?
PostPosted: Fri Jun 18, 2010 4:44 am 
Newbie

Joined: Mon May 31, 2010 10:07 pm
Posts: 3
Up
Nobody know the reason?


Top
 Profile  
 
 Post subject: Re: Why the NPE happened in hibernate source code?
PostPosted: Fri Jun 18, 2010 4:59 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
could you show enough code to try reproducing the problem?
Ideally you should make a unit test and open an issue on JIRA, assuming it's not caused by an error in your code/model

_________________
Sanne
http://in.relation.to/


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