commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitri Plotnikov <dplot...@yahoo.com>
Subject Re: [jxpath] setValue calling getValue
Date Fri, 08 Nov 2002 17:52:40 GMT
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$MockNestedDomainObject.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.getNodeValue(BeanPropertyPointer.java:187)
> 	at
>
org.apache.commons.jxpath.ri.model.beans.PropertyPointer.getValuePointer(PropertyPointer.java:152)
> 	at
>
org.apache.commons.jxpath.ri.axes.SimplePathInterpreter.singleStep(SimplePathInterpreter.java:246)
> 	at
>
org.apache.commons.jxpath.ri.axes.SimplePathInterpreter.interpretPath(SimplePathInterpreter.java:119)
> 	at
>
org.apache.commons.jxpath.ri.compiler.Path.getSingleNodePointerForSteps(Path.java:162)
> 	at
>
org.apache.commons.jxpath.ri.compiler.LocationPath.computeValue(LocationPath.java:137)
> 	at
>
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.setValue(JXPathContextReferenceImpl.java:329)
> 	at
>
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.createPathAndSetValue(JXPathContextReferenceImpl.java:320)
> 	at
>
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.createPathAndSetValue(JXPathContextReferenceImpl.java:315)
> 	at
>
com.nokia.b2t.dna.graphmap.ObjectGraphMapper.performMapping(ObjectGraphMapper.java:88)
> 	at
>
com.nokia.b2t.dna.graphmap.ObjectGraphMapper.toDomainGraph(ObjectGraphMapper.java:57)
> 	at
>
com.nokia.b2t.dna.graphmap.ObjectGraphMapperJUnitTest.main(ObjectGraphMapperJUnitTest.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>


Mime
View raw message