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 "Logé, Patrick" <pl...@emalaya.com> on 2000/10/20 17:32:06 UTC

Xerces problem

Hi all,

I 'd like to sumbit you a strange problem.

I'm trying to create a Cold Fusion custom tag in Java.
This tag should execute an XPath expression against an XML file
and return the node content :

<CFX_JXpath in="#file#" select="//*">

To do this I'm trying to adapt the "ApplyXPath" sample app provided with
Xalan.

If I run the sample from the command line, everything goes very well.

But when I run from ColdFusion I got this error :

"java.lang.NoSuchMethodError: org.apache.xerces.dom.NodeImpl: 
method
(Lorg/apache/xerces/dom/DocumentImpl;Ljava/lang/String;Ljava/lang/String;)V
not found. 
Java exception occurred in call to method."

The error occures when I try this statement

  InputSource inputSource=null;
  inputSource = new InputSource(new FileInputStream(strIn));
  DOMParser domParser = new DOMParser();
  //-----------------------------------------------
  domParser.parse(inputSource); //-------> BANG !!!
  //-----------------------------------------------
OR
  //--------------------------------------------------------------
  domParser.parse("file:///f:/temp/test.xml"); //-------> BANG !!!
  //--------------------------------------------------------------

ColdFusion is using a 1.2.2 runtime environment and uses "jvm.dll" to
execute its code.
When I try the sample app, I use "java.exe" comming from the same JRE.
Both are using the same class path.
I also use Lotusxsl 1.0.1 and XML4J 3.1.0
In my class directory i got:

bsf.jar
bsfengines.jar
compat.jar
lotusxsl.jar
xalan.jar
xerces.jar "I tried both, the one from lotusxsl and xml4j"
xml4j.jar


Any suggestion ?

Patrick LOGÉ
plog@emalaya.com
Phone : +322 340.77.36
Fax      : +322 340.77.39