aspose file tools*
The moose likes Websphere and the fly likes XPath functions and WebSphere Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "XPath functions and WebSphere" Watch "XPath functions and WebSphere" New topic
Author

XPath functions and WebSphere

Jon Bricker
Greenhorn

Joined: Feb 28, 2003
Posts: 23
I am having trouble getting XPath functions to work properly in WS 4.0.5. We are using JDom and Jaxen as our Java and XPath APIs. We are loading the Xalan, JDom, Jaxen and Xerces with our ear file in the top lib ( because they are being used in both the EJB and the Web layer).
In this first set of code without a XPath function we can get the element and then the text to get the result:

This second one will return a null;

jdoc is our JDom Document.
I suspect that WS is calling an older version of Xalan that does not have the functions. Any suggestions on what to look for?
thanks
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Try changing your classloader policy to PARENT_LAST.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Jon Bricker
Greenhorn

Joined: Feb 28, 2003
Posts: 23
that would work if we were using WS 5.0. How can we do the same thing with WS 4?
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Check section 6.4.1 of the WAS 4.0 infocenter. I think you want to change your ejbDelegationMode to false to make this work within your EJB's. I'm guessing that it should be working correctly already within your JAR's.
Kyle
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XPath functions and WebSphere