commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Ext-Mike.Ho...@nokia.com>
Subject RE: [jxpath] setValue calling getValue
Date Fri, 08 Nov 2002 21:08:07 GMT
Hi Dmitri,

I retried with the the version at the URL you sent. Different stack trace, but the field still
gets read.

java.lang.Exception
	at com.nokia.b2t.dna.graphmap.MockDomainObject.getStringField(MockDomainObject.java:51)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.commons.jxpath.util.ValueUtils.getValue(ValueUtils.java:287)
	at org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer.getBaseValue(BeanPropertyPointer.java:155)
	at org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer.getNode(BeanPropertyPointer.java:179)
	at org.apache.commons.jxpath.ri.model.beans.PropertyPointer.getValuePointer(PropertyPointer.java:168)
	at org.apache.commons.jxpath.ri.axes.SimplePathInterpreter.valuePointer(SimplePathInterpreter.java:675)
	at org.apache.commons.jxpath.ri.axes.SimplePathInterpreter.interpretSimpleLocationPath(SimplePathInterpreter.java:114)
	at org.apache.commons.jxpath.ri.compiler.Path.getSingleNodePointerForSteps(Path.java:172)
	at org.apache.commons.jxpath.ri.compiler.LocationPath.computeValue(LocationPath.java:137)
	at org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.setValue(JXPathContextReferenceImpl.java:363)
	at org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.createPathAndSetValue(JXPathContextReferenceImpl.java:354)
	at org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.createPathAndSetValue(JXPathContextReferenceImpl.java:349)
	at com.nokia.b2t.dna.graphmap.ObjectGraphMapper.performMapping(ObjectGraphMapper.java:92)
	at com.nokia.b2t.dna.graphmap.ObjectGraphMapper.toDomainGraph(ObjectGraphMapper.java:57)
	at com.nokia.b2t.dna.graphmap.ObjectGraphMapperJUnitTest.main(ObjectGraphMapperJUnitTest.java:136)

> -----Original Message-----
> From: ext Dmitri Plotnikov [mailto:dplotnik@yahoo.com]
> Sent: 08. November 2002 19:53
> To: Jakarta Commons Developers List
> Subject: Re: [jxpath] setValue calling getValue
> 
> 
> Mike,
> 
> You are right, it really should not do that.
> 
> The line numbers in the stack trace indicate that you are using a
> pretty old version of jxpath. Could you upgrade to the current version
> and let me know if the problem persists?
> 
> The binary download is available at
> www.plotnix.com/jxpath/commons-jxpath.zip
> 
> Thank you,
> 
> - Dmitri
> 
> --- Ext-Mike.Hogan@nokia.com wrote:
> > Hi,
> > 
> > When JXPath is setting a property, it first gets the 
> properties value
> > (computeValue()).  I have an throwing an exception in the getter
> > method in my class to show the stack trace, below.
> > 
> > Why does JXPath read the value before setting it, and is there any
> > way to avoid it?
> > 
> > Thanks,
> > Mike.
> > 
> > java.lang.Exception: Reading field
> > 	at
> >
> com.nokia.b2t.dna.graphmap.MockDomainObject$MockNestedDomainOb
> ject.getStringField(MockDomainObject.java:76)
> > 	at java.lang.reflect.Method.invoke(Native Method)
> > 	at
> >
> org.apache.commons.jxpath.util.ValueUtils.getValue(ValueUtils.
> java:287)
> > 	at
> >
> org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer.g
> etNodeValue(BeanPropertyPointer.java:187)
> > 	at
> >
> org.apache.commons.jxpath.ri.model.beans.PropertyPointer.getVa
> luePointer(PropertyPointer.java:152)
> > 	at
> >
> org.apache.commons.jxpath.ri.axes.SimplePathInterpreter.single
> Step(SimplePathInterpreter.java:246)
> > 	at
> >
> org.apache.commons.jxpath.ri.axes.SimplePathInterpreter.interp
> retPath(SimplePathInterpreter.java:119)
> > 	at
> >
> org.apache.commons.jxpath.ri.compiler.Path.getSingleNodePointe
> rForSteps(Path.java:162)
> > 	at
> >
> org.apache.commons.jxpath.ri.compiler.LocationPath.computeValu
> e(LocationPath.java:137)
> > 	at
> >
> org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.setVal
> ue(JXPathContextReferenceImpl.java:329)
> > 	at
> >
> org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.create
> PathAndSetValue(JXPathContextReferenceImpl.java:320)
> > 	at
> >
> org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.create
> PathAndSetValue(JXPathContextReferenceImpl.java:315)
> > 	at
> >
> com.nokia.b2t.dna.graphmap.ObjectGraphMapper.performMapping(Ob
> jectGraphMapper.java:88)
> > 	at
> >
> com.nokia.b2t.dna.graphmap.ObjectGraphMapper.toDomainGraph(Obj
> ectGraphMapper.java:57)
> > 	at
> >
> com.nokia.b2t.dna.graphmap.ObjectGraphMapperJUnitTest.main(Obj
> ectGraphMapperJUnitTest.java:122)
> > 
> > --
> > To unsubscribe, e-mail:  
> > <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:commons-dev-help@jakarta.apache.org>
> > 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2
> 
> --
> To unsubscribe, e-mail:   
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:commons-dev-help@jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message