[jdom-interest] JDOM and Axis2

Rolf Lear jdom at tuis.net
Wed May 23 04:58:30 PDT 2012


Hi Aaron.

I hate being doubtful about your question, but what you're suggesting 
just does not make sense.....

For example, in JDOM2, the 'default' XPathFactory has the following 
implementation for 'compile'....

public XPathExpression<Object> compile(String expression) {
return compile(expression, Filters.fpassthrough(), null, EMPTYNS);
}

and that method calls:

public <T> XPathExpression<T> compile(String expression, Filter<T> filter,
Map<String, Object> variables, Namespace... namespaces) {
return new JaxenCompiled<T>(expression, filter, variables, namespaces);
}

There is just no way for that to return a null value.... It has to 
return a value, or throw an exception....

In the JDOM 1.x code, the code is more complicated, but again, it either 
returns a new instance, or throws an exception. Ther ei sno way to 
return 'null'.


There must be something in your code that is resetting it.... or Axis2 
is doing something bizarre.... You should probably ask a question on the 
Axis2 support areas.... this is not a JDOM problem.

Rolf


On 22/05/2012 11:50 AM, aaron.stromas at rsa.com wrote:
> Hi,
>
> I tried both JDOM and now JDOM2.
>
> For JDOM2,
>
> XPathFactory xpfac = XPathFactory./instance/();
>
> _XPathExpression_xp = xpfac.compile("//foo/bar");
>
> The xp is null.
>
> For JDOM,
>
> XPath xp = XPath.newInstance("//foo/bar");
>
> The xp is null.
>
> Both work in the simple java application.
>
> I tried to putting the JDOM jar in webapps/axis2/WEB-INF/lib along with
> Jaxen – doesn’t do a thing.
>
> Any ideas? TIA
>
> Best regards,
>
> -a
>
>
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list