You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Mukul Gandhi (Jira)" <xe...@xml.apache.org> on 2023/03/20 14:57:00 UTC

[jira] [Comment Edited] (XERCESJ-1752) Cannot use latest IBM ICU with latest Xerces, need support for the latest Eclipse XPath Engine

    [ https://issues.apache.org/jira/browse/XERCESJ-1752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17702692#comment-17702692 ] 

Mukul Gandhi edited comment on XERCESJ-1752 at 3/20/23 2:56 PM:
----------------------------------------------------------------

A new icu4j jar has been committed to xercesj svn with revision 1908569, as a fix for this issue.  This jar file was built with icu4j sources of version 68.1, using java 1.7 source and target levels. This shall allow us, to keep xercesj's java min requirement to java 1.7.

For the information of users, following were the build settings that I've used to produce this particular icu4j jar file,

info:
     [echo] ----- Build Environment Information -------------------
     [echo] Java Home:    d:\jdk1.8.0_281\jre
     [echo] Java Version: 1.8.0_281
     [echo] Ant Home:     ${ant.home}
     [echo] Ant Version:  Apache Ant(TM) version 1.10.12 compiled on October 13 2021

@compile:
     [echo] build-local:     ../../shared/../../build-local.properties
     [echo] --- java compiler arguments ------------------------
     [echo] source dir:     D:\icu-release-68-1\icu4j\main\classes\core/src
     [echo] output dir:     D:\icu-release-68-1\icu4j\main\classes\core/out/bin
     [echo] bootclasspath:  
     [echo] classpath:      
     [echo] source:         1.7
     [echo] target:          1.7



was (Author: mukul_gandhi):
A new icu4j jar has been committed to xercesj svn with revision 1908569, as a fix for this issue.  This jar file was built with icu4j sources of version 68.1, using java 1.7 source and target levels. This shall allow us, to keep xercesj's java min requirement to java 1.7.

> Cannot use latest IBM ICU with latest Xerces, need support for the latest Eclipse XPath Engine
> ----------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1752
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1752
>             Project: Xerces2-J
>          Issue Type: Improvement
>            Reporter: Ivan Pedruzzi
>            Assignee: Mukul Gandhi
>            Priority: Major
>         Attachments: Test.xml, Test.xsd
>
>
> The latest ICU 72  [https://github.com/unicode-org/icu/releases/download/release-72-1/icu4j-72_1.jar]
> breaks the Eclipse XPath engine 1.2.1 bundled with Xerces.
>      the ICU lib removed function isHighSurrogate from class UCharacter which is used by the constructor of class StringCodePointIterator
>   Exception in thread "main" java.lang.NoSuchMethodError: com.ibm.icu.lang.UCharacter.isHighSurrogate(C)Z
>       at org.eclipse.wst.xml.xpath2.processor.internal.utils.StringCodePointIterator.<init>(StringCodePointIterator.java:35)
> to fix the problem, you may think to update to the latest Eclipse XPath engine 2.1 [https://www.jabylon.org/maven/org/eclipse/wst/xml/xpath2/processor/2.1.100/processor-2.1.100.jar]
> but that breaks Xerces 2.1 
> because Eclipse XPath removed the constructor of class DefaultEvaluator used by AbstractXPath2EngineImpl.evaluateXPathExpr
>  
> Exception in thread "main" java.lang.NoSuchMethodError: org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.<init>(Lorg/eclipse/wst/xml/xpath2/processor/DynamicContext;Lorg/w3c/dom/Document;Lorg/w3c/dom/Node;)V
>       at org.apache.xerces.impl.xs.AbstractXPath2EngineImpl.evaluateXPathExpr(Unknown Source)
>  
> Looking at the new constructor rather than taking a single org.w3c.dom.Node, now it takes an array of objects,  it seems that they accept a sequence of nodes as context
>  
> public DefaultEvaluator(
> org.eclipse.wst.xml.xpath2.api.StaticContext staticContext,
> org.eclipse.wst.xml.xpath2.api.DynamicContext dynamicContext,
> Object[] contextItems) {
>  
>        this(staticContext, dynamicContext);
>  
>        // initialize context item with root of document
>        ResultBuffer rs = new ResultBuffer();
>        for (Object obj : contextItems)
> {               if (obj instanceof Node) rs.add(NodeType.dom_to_xpath((Node)obj, _sc.getTypeModel()));        }
>        set_focus(new Focus(rs.getSequence()));
>        _param = null;
> }
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org