F
Fisch von Gestern
I have tried to run the extension function/element examples provided
with the Xalan-J download. I believe that my classpath is correct,
and that my versions are up-to-date. However, I can't get past the
following error. Any help, please?
===========================================================================
C:\xalan>test
C:\xalan>REM @echo off
C:\xalan>set XALANPATH=C:\xalan\xalan-j_2_6_0
C:\xalan>set CLASSPATH=C:\xalan\xalan-j_2_6_0\bin\xalan.jar
C:\xalan>set CLASSPATH=C:\xalan\xalan-j_2_6_0\bin\xalan.jar;C:\xalan\xalan-j_2_6
_0\bin\xercesImpl.jar
C:\xalan>rem ~~~~~~ EXTENSIONS ~~~~~
C:\xalan>set ClassPath=C:\xalan\xalan-j_2_6_0\bin\xalan.jar;C:\xalan\xalan-j_2_6
_0\bin\xercesImpl.jar;C:\xalan\xalan-j_2_6_0\bin\xml-apis.jar
C:\xalan>set ClassPath=C:\xalan\xalan-j_2_6_0\bin\xalan.jar;C:\xalan\xalan-j_2_6
_0\bin\xercesImpl.jar;C:\xalan\xalan-j_2_6_0\bin\xml-apis.jar;C:\xalan\xalan-j_2
_6_0\bin\bsf.jar
C:\xalan>set ClassPath=C:\xalan\xalan-j_2_6_0\bin\xalan.jar;C:\xalan\xalan-j_2_6
_0\bin\xercesImpl.jar;C:\xalan\xalan-j_2_6_0\bin\xml-apis.jar;C:\xalan\xalan-j_2
_6_0\bin\bsf.jar;C:\xalan\xalan-j_2_6_0\rhino\js.jar
C:\xalan>echo C:\xalan\xalan-j_2_6_0\bin\xalan.jar;C:\xalan\xalan-j_2_6_0\bin\xe
rcesImpl.jar;C:\xalan\xalan-j_2_6_0\bin\xml-apis.jar;C:\xalan\xalan-j_2_6_0\bin\
bsf.jar;C:\xalan\xalan-j_2_6_0\rhino\js.jar
C:\xalan\xalan-j_2_6_0\bin\xalan.jar;C:\xalan\xalan-j_2_6_0\bin\xercesImpl.jar;C
:\xalan\xalan-j_2_6_0\bin\xml-apis.jar;C:\xalan\xalan-j_2_6_0\bin\bsf.jar;C:\xal
an\xalan-j_2_6_0\rhino\js.jar
C:\xalan>java -version
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
C:\xalan>set SAMPLES=C:\xalan\xalan-j_2_6_0\samples\extensions
C:\xalan>set tstXML=C:\xalan\xalan-j_2_6_0\samples\extensions\2-basicJscript.xml
C:\xalan>set tstXSL=C:\xalan\xalan-j_2_6_0\samples\extensions\2-basicJscript.xsl
C:\xalan>java org.apache.xalan.xslt.Process -IN
C:\xalan\xalan-j_2_6_0\samples\e
xtensions\2-basicJscript.xml -XSL
C:\xalan\xalan-j_2_6_0\samples\extensions\2-ba
sicJscript.xsl -OUT test_out.txt
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(ExtensionH
andlerGeneral.java:293)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(Extensio
nNamespaceSupport.java:74)
at org.apache.xalan.extensions.ExtensionsTable.<init>(ExtensionsTable.ja
va:118)
at org.apache.xalan.transformer.TransformerImpl.setExtensionsTable(Trans
formerImpl.java:437)
at org.apache.xalan.transformer.TransformerImpl.transformNode(Transforme
rImpl.java:1169)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:668)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1129)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1107)
at org.apache.xalan.xslt.Process.main(Process.java:1041)
Caused by: com.ibm.bsf.BSFException: JavaScript Error: Internal Error:
java.lang
..IllegalArgumentException: Line number can not be negative:-1
at com.ibm.bsf.engines.javascript.JavaScriptEngine.handleError(JavaScrip
tEngine.java:182)
at com.ibm.bsf.engines.javascript.JavaScriptEngine.eval(JavaScriptEngine
..java:87)
at com.ibm.bsf.util.BSFEngineImpl.exec(BSFEngineImpl.java:106)
... 17 more
javax.xml.transform.TransformerException:
java.lang.reflect.InvocationTargetExce
ption
at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(Extensio
nNamespaceSupport.java:80)
at org.apache.xalan.extensions.ExtensionsTable.<init>(ExtensionsTable.ja
va:118)
at org.apache.xalan.transformer.TransformerImpl.setExtensionsTable(Trans
formerImpl.java:437)
at org.apache.xalan.transformer.TransformerImpl.transformNode(Transforme
rImpl.java:1169)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:668)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1129)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1107)
at org.apache.xalan.xslt.Process.main(Process.java:1041)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(Extensio
nNamespaceSupport.java:74)
... 7 more
Caused by: javax.xml.transform.TransformerException: Could not compile
extension
at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(ExtensionH
andlerGeneral.java:300)
... 12 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(ExtensionH
andlerGeneral.java:293)
... 12 more
Caused by: com.ibm.bsf.BSFException: JavaScript Error: Internal Error:
java.lang
..IllegalArgumentException: Line number can not be negative:-1
at com.ibm.bsf.engines.javascript.JavaScriptEngine.handleError(JavaScrip
tEngine.java:182)
at com.ibm.bsf.engines.javascript.JavaScriptEngine.eval(JavaScriptEngine
..java:87)
at com.ibm.bsf.util.BSFEngineImpl.exec(BSFEngineImpl.java:106)
... 17 more
---------
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(Extensio
nNamespaceSupport.java:74)
at org.apache.xalan.extensions.ExtensionsTable.<init>(ExtensionsTable.ja
va:118)
at org.apache.xalan.transformer.TransformerImpl.setExtensionsTable(Trans
formerImpl.java:437)
at org.apache.xalan.transformer.TransformerImpl.transformNode(Transforme
rImpl.java:1169)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:668)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1129)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1107)
at org.apache.xalan.xslt.Process.main(Process.java:1041)
Caused by: javax.xml.transform.TransformerException: Could not compile
extension
at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(ExtensionH
andlerGeneral.java:300)
... 12 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(ExtensionH
andlerGeneral.java:293)
... 12 more
Caused by: com.ibm.bsf.BSFException: JavaScript Error: Internal Error:
java.lang
..IllegalArgumentException: Line number can not be negative:-1
at com.ibm.bsf.engines.javascript.JavaScriptEngine.handleError(JavaScrip
tEngine.java:182)
at com.ibm.bsf.engines.javascript.JavaScriptEngine.eval(JavaScriptEngine
..java:87)
at com.ibm.bsf.util.BSFEngineImpl.exec(BSFEngineImpl.java:106)
... 17 more
file:///C:/xalan/xalan-j_2_6_0/samples/extensions/2-basicJscript.xsl;
Line #33;
Column #42; XSLT Error (javax.xml.transform.TransformerException):
java.lang.Nul
lPointerException
C:\xalan>
with the Xalan-J download. I believe that my classpath is correct,
and that my versions are up-to-date. However, I can't get past the
following error. Any help, please?
===========================================================================
C:\xalan>test
C:\xalan>REM @echo off
C:\xalan>set XALANPATH=C:\xalan\xalan-j_2_6_0
C:\xalan>set CLASSPATH=C:\xalan\xalan-j_2_6_0\bin\xalan.jar
C:\xalan>set CLASSPATH=C:\xalan\xalan-j_2_6_0\bin\xalan.jar;C:\xalan\xalan-j_2_6
_0\bin\xercesImpl.jar
C:\xalan>rem ~~~~~~ EXTENSIONS ~~~~~
C:\xalan>set ClassPath=C:\xalan\xalan-j_2_6_0\bin\xalan.jar;C:\xalan\xalan-j_2_6
_0\bin\xercesImpl.jar;C:\xalan\xalan-j_2_6_0\bin\xml-apis.jar
C:\xalan>set ClassPath=C:\xalan\xalan-j_2_6_0\bin\xalan.jar;C:\xalan\xalan-j_2_6
_0\bin\xercesImpl.jar;C:\xalan\xalan-j_2_6_0\bin\xml-apis.jar;C:\xalan\xalan-j_2
_6_0\bin\bsf.jar
C:\xalan>set ClassPath=C:\xalan\xalan-j_2_6_0\bin\xalan.jar;C:\xalan\xalan-j_2_6
_0\bin\xercesImpl.jar;C:\xalan\xalan-j_2_6_0\bin\xml-apis.jar;C:\xalan\xalan-j_2
_6_0\bin\bsf.jar;C:\xalan\xalan-j_2_6_0\rhino\js.jar
C:\xalan>echo C:\xalan\xalan-j_2_6_0\bin\xalan.jar;C:\xalan\xalan-j_2_6_0\bin\xe
rcesImpl.jar;C:\xalan\xalan-j_2_6_0\bin\xml-apis.jar;C:\xalan\xalan-j_2_6_0\bin\
bsf.jar;C:\xalan\xalan-j_2_6_0\rhino\js.jar
C:\xalan\xalan-j_2_6_0\bin\xalan.jar;C:\xalan\xalan-j_2_6_0\bin\xercesImpl.jar;C
:\xalan\xalan-j_2_6_0\bin\xml-apis.jar;C:\xalan\xalan-j_2_6_0\bin\bsf.jar;C:\xal
an\xalan-j_2_6_0\rhino\js.jar
C:\xalan>java -version
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
C:\xalan>set SAMPLES=C:\xalan\xalan-j_2_6_0\samples\extensions
C:\xalan>set tstXML=C:\xalan\xalan-j_2_6_0\samples\extensions\2-basicJscript.xml
C:\xalan>set tstXSL=C:\xalan\xalan-j_2_6_0\samples\extensions\2-basicJscript.xsl
C:\xalan>java org.apache.xalan.xslt.Process -IN
C:\xalan\xalan-j_2_6_0\samples\e
xtensions\2-basicJscript.xml -XSL
C:\xalan\xalan-j_2_6_0\samples\extensions\2-ba
sicJscript.xsl -OUT test_out.txt
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(ExtensionH
andlerGeneral.java:293)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(Extensio
nNamespaceSupport.java:74)
at org.apache.xalan.extensions.ExtensionsTable.<init>(ExtensionsTable.ja
va:118)
at org.apache.xalan.transformer.TransformerImpl.setExtensionsTable(Trans
formerImpl.java:437)
at org.apache.xalan.transformer.TransformerImpl.transformNode(Transforme
rImpl.java:1169)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:668)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1129)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1107)
at org.apache.xalan.xslt.Process.main(Process.java:1041)
Caused by: com.ibm.bsf.BSFException: JavaScript Error: Internal Error:
java.lang
..IllegalArgumentException: Line number can not be negative:-1
at com.ibm.bsf.engines.javascript.JavaScriptEngine.handleError(JavaScrip
tEngine.java:182)
at com.ibm.bsf.engines.javascript.JavaScriptEngine.eval(JavaScriptEngine
..java:87)
at com.ibm.bsf.util.BSFEngineImpl.exec(BSFEngineImpl.java:106)
... 17 more
javax.xml.transform.TransformerException:
java.lang.reflect.InvocationTargetExce
ption
at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(Extensio
nNamespaceSupport.java:80)
at org.apache.xalan.extensions.ExtensionsTable.<init>(ExtensionsTable.ja
va:118)
at org.apache.xalan.transformer.TransformerImpl.setExtensionsTable(Trans
formerImpl.java:437)
at org.apache.xalan.transformer.TransformerImpl.transformNode(Transforme
rImpl.java:1169)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:668)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1129)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1107)
at org.apache.xalan.xslt.Process.main(Process.java:1041)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(Extensio
nNamespaceSupport.java:74)
... 7 more
Caused by: javax.xml.transform.TransformerException: Could not compile
extension
at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(ExtensionH
andlerGeneral.java:300)
... 12 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(ExtensionH
andlerGeneral.java:293)
... 12 more
Caused by: com.ibm.bsf.BSFException: JavaScript Error: Internal Error:
java.lang
..IllegalArgumentException: Line number can not be negative:-1
at com.ibm.bsf.engines.javascript.JavaScriptEngine.handleError(JavaScrip
tEngine.java:182)
at com.ibm.bsf.engines.javascript.JavaScriptEngine.eval(JavaScriptEngine
..java:87)
at com.ibm.bsf.util.BSFEngineImpl.exec(BSFEngineImpl.java:106)
... 17 more
---------
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(Extensio
nNamespaceSupport.java:74)
at org.apache.xalan.extensions.ExtensionsTable.<init>(ExtensionsTable.ja
va:118)
at org.apache.xalan.transformer.TransformerImpl.setExtensionsTable(Trans
formerImpl.java:437)
at org.apache.xalan.transformer.TransformerImpl.transformNode(Transforme
rImpl.java:1169)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:668)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1129)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1107)
at org.apache.xalan.xslt.Process.main(Process.java:1041)
Caused by: javax.xml.transform.TransformerException: Could not compile
extension
at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(ExtensionH
andlerGeneral.java:300)
... 12 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(ExtensionH
andlerGeneral.java:293)
... 12 more
Caused by: com.ibm.bsf.BSFException: JavaScript Error: Internal Error:
java.lang
..IllegalArgumentException: Line number can not be negative:-1
at com.ibm.bsf.engines.javascript.JavaScriptEngine.handleError(JavaScrip
tEngine.java:182)
at com.ibm.bsf.engines.javascript.JavaScriptEngine.eval(JavaScriptEngine
..java:87)
at com.ibm.bsf.util.BSFEngineImpl.exec(BSFEngineImpl.java:106)
... 17 more
file:///C:/xalan/xalan-j_2_6_0/samples/extensions/2-basicJscript.xsl;
Line #33;
Column #42; XSLT Error (javax.xml.transform.TransformerException):
java.lang.Nul
lPointerException
C:\xalan>