ClassCastException when calling XPathExpressionImpl.evaluate with item argument 
of type NodeList
------------------------------------------------------------------------------------------------

         Key: XALANJ-2203
         URL: http://issues.apache.org/jira/browse/XALANJ-2203
     Project: XalanJ2
        Type: Bug
  Components: XPath  
    Versions: 2.7    
 Environment: Java 5
    Reporter: Eduardo Vilches
    Priority: Minor


When calling XPathExpressionImpl.evaluate(Object item, QName returnType), if 
item is of type NodeList, a ClassCastException is thrown.

I've looked at the source code. The problem seems to happen in 
XPathExpressionImpl.eval(Object contextItem). There is a section of code that 
reads:

Node contextNode = (Node)contextItem;
        // We always need to have a ContextNode with Xalan XPath implementation
        // To allow simple expression evaluation like 1+1 we are setting

The type cast is what causes the exception. Is there a fix or a work-around for 
this?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to