commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans-Peter Stoerr (JIRA)" <>
Subject [jira] Created: (JXPATH-103) createPathAndSetValue(...) differs from createPath(...).setValue(...) : "Factory is not set"
Date Thu, 06 Sep 2007 12:32:35 GMT
createPathAndSetValue(...) differs from createPath(...).setValue(...) : "Factory is not set"

                 Key: JXPATH-103
             Project: Commons JXPath
          Issue Type: Bug
    Affects Versions: 1.2 Final
            Reporter: Hans-Peter Stoerr
            Priority: Minor


If I have a bean (as shown below), I guess it is an error that the second of the next two
calls does not work:

        JXPathContext.newContext(new TestBean()).createPathAndSetValue("/attrib", "val");
        JXPathContext.newContext(new TestBean()).createPath("/attrib").setValue("val");

The first one works, but the second one throws up:
org.apache.commons.jxpath.JXPathException: Exception trying to create xpath /attrib; Factory
is not set on the JXPathContext - cannot create path: /attrib
	at org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.createPath(
	at org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.createPath(

The bean is as follows:

    public static class TestBean {
        public String plainattrib;
        private String attrib;
        public String getAttrib() {
            return attrib;
        public void setAttrib(String attrib) {
            this.attrib = attrib;

(Don't ask: I cannot use the first method, since I have to pass around the Pointer.)

Thanks so much,


This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message