-->
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: NullPointer in sun.reflect.GeneratedMethodAccessor7.invoke()
PostPosted: Fri Jul 16, 2004 7:48 pm 
Newbie

Joined: Thu Nov 20, 2003 2:58 pm
Posts: 11
Location: Seattle, Washington
This isn't a question or necessarily a bug in hibernate. Just an observation.

I'm deserializing objects from XML doc and I'm not sure if that framework is doing something funny (like somehow adding null objects to the HashMap), but
I am getting a NullPointer way down in sun.reflect code.

I added a log.trace() in BasicPropertyAccessor.get() method to see what was happening.

relevant output follows:

<stuff snipped>
[java] get: DL_STA_ID=q33-station id:Configurable Logger Station Id inserted into data stream., method: public java.lang.String edu.iris.dmc.util.DescribedProperty.getDescription() - BasicPropertyAccessor:95
[java] get: DL_STA_ID=q33-station id:Configurable Logger Station Id inserted into data stream., method: public boolean edu.iris.dmc.util.DescribedProperty.isHidden() - BasicPropertyAccessor:95
[java] get: null, method: public java.lang.String edu.iris.dmc.util.DescribedProperty.getPropName() - BasicPropertyAccessor:95
[java] java.lang.NullPointerException
[java] at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:97)
[java] at net.sf.hibernate.type.ComponentType.getPropertyValue(ComponentType.java:179)
[java] at net.sf.hibernate.type.ComponentType.getPropertyValues(ComponentType.java:205)
[java] at net.sf.hibernate.type.ComponentType.copy(ComponentType.java:285)
[java] at net.sf.hibernate.type.MapType.copy(MapType.java:52)
[java] at net.sf.hibernate.type.TypeFactory.copy(TypeFactory.java:284)
[java] at net.sf.hibernate.impl.SessionImpl.doCopy(SessionImpl.java:4033)
[java] at net.sf.hibernate.impl.SessionImpl.copy(SessionImpl.java:3975)
[java] at net.sf.hibernate.engine.Cascades$5.cascade(Cascades.java:132)
[java] at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:436)
[java] at net.sf.hibernate.engine.Cascades.cascadeCollection(Cascades.java:526)
[java] at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:452)
[java] at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:503)
[java] at net.sf.hibernate.impl.SessionImpl.doCopy(SessionImpl.java:4030)
[java] at net.sf.hibernate.impl.SessionImpl.saveOrUpdateCopy(SessionImpl.java:3971)
[java] at edu.iris.dmc.db.DbMgr.synch(DbMgr.java:271)

I added a check for null in same to get past this, and I'm working again...


Top
 Profile  
 
 Post subject: Re: NullPointer in sun.reflect.GeneratedMethodAccessor7.invo
PostPosted: Sun Jul 18, 2004 11:31 am 
Senior
Senior

Joined: Sat Jul 17, 2004 5:16 pm
Posts: 143
What is the point of this post (sorry, I dont understand the observation)? Which XML serialization framework is this? Is this an observation about hibernate or that XML framework? Sometimes serialization frameworks that work with properties throw exceptions when there is a getter but no setter, but it sounds like that is not your problem.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 19, 2004 2:57 pm 
Newbie

Joined: Thu Nov 20, 2003 2:58 pm
Posts: 11
Location: Seattle, Washington
My point is that HIbernate is trying to use reflection to invoke a method on a null object.


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.