xml-xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Schölch (JIRA) <xalan-...@xml.apache.org>
Subject [jira] Commented: (XALANJ-2372) Exception using javascript extensions
Date Fri, 09 Mar 2007 09:09:24 GMT

    [ https://issues.apache.org/jira/browse/XALANJ-2372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479542
] 

Matthias Schölch commented on XALANJ-2372:
------------------------------------------

Another Day,
Another Java-Version
Another Exception

This case is with with JAVA VERSION 1.3.1_20
xalan.bat:
@ECHO OFF

set LIBDIR=D:\fop\lib

set LOCALCLASSPATH=%LIBDIR%\js.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\bsf.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\serializer.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-logging-1.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-logging-adapters-1.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-logging-api-1.1.jar

echo %LOCALCLASSPATH%

C:\Programme\Java\jre1.3.1\bin\java -cp %LOCALCLASSPATH% org.apache.xalan.xslt.Process %1
%2 %3 %4 %5 %6 %7 %8


Exception:
org.apache.xalan.extensions.ObjectFactory$ConfigurationError: Provider org.apach
e.bsf.BSFManager not found
        at org.apache.xalan.extensions.ObjectFactory.newInstance(ObjectFactory.j
ava:462)
        at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(ExtensionH
andlerGeneral.java:204)
        at java.lang.reflect.Constructor.newInstance(Native Method)
        at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(Extensio
nNamespaceSupport.java:93)
        at org.apache.xalan.extensions.ExtensionsTable.<init>(ExtensionsTable.ja
va:64)
        at org.apache.xalan.transformer.TransformerImpl.setExtensionsTable(Trans
formerImpl.java:441)
        at org.apache.xalan.transformer.TransformerImpl.transformNode(Transforme
rImpl.java:1323)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:709)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1284)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1262)
        at org.apache.xalan.xslt.Process.main(Process.java:1046)
javax.xml.transform.TransformerException: java.lang.reflect.InvocationTargetExce
ption
        at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(Extensio
nNamespaceSupport.java:99)
        at org.apache.xalan.extensions.ExtensionsTable.<init>(ExtensionsTable.ja
va:64)
        at org.apache.xalan.transformer.TransformerImpl.setExtensionsTable(Trans
formerImpl.java:441)
        at org.apache.xalan.transformer.TransformerImpl.transformNode(Transforme
rImpl.java:1323)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:709)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1284)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1262)
        at org.apache.xalan.xslt.Process.main(Process.java:1046)
---------
java.lang.reflect.InvocationTargetException: javax.xml.transform.TransformerExce
ption: BSF Manager kann nicht initialisiert werden.
        at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(ExtensionH
andlerGeneral.java:214)
        at java.lang.reflect.Constructor.newInstance(Native Method)
        at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(Extensio
nNamespaceSupport.java:93)
        at org.apache.xalan.extensions.ExtensionsTable.<init>(ExtensionsTable.ja
va:64)
        at org.apache.xalan.transformer.TransformerImpl.setExtensionsTable(Trans
formerImpl.java:441)
        at org.apache.xalan.transformer.TransformerImpl.transformNode(Transforme
rImpl.java:1323)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:709)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1284)
        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
l.java:1262)
        at org.apache.xalan.xslt.Process.main(Process.java:1046)

file:///d:/fopt/test.xsl; Zeilennummer19; Spaltennummer53; XSLT-Fehler (javax.xm
l.transform.TransformerException): java.lang.NullPointerException
Exception in thread "main" java.lang.RuntimeException: java.lang.NullPointerExce
ption
        at org.apache.xalan.xslt.Process.doExit(Process.java:1153)
        at org.apache.xalan.xslt.Process.main(Process.java:1126)

> Exception using javascript extensions
> -------------------------------------
>
>                 Key: XALANJ-2372
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2372
>             Project: XalanJ2
>          Issue Type: Bug
>          Components: Xalan-extensions
>    Affects Versions: 2.7
>         Environment: XP SP2, Java 1.6.0-b105/ 1.4.2_05, Xalan 2.7 , xerces-2_9_0, bsf.jar
2.4, js.jar (testet with 1.6R5, 1.5R5), Commons-Logging 1.1
>            Reporter: Matthias Schölch
>
> Hi,
> this call wouldn't work. 
> D:\fop>xalan.bat -in D:\fopt\data.xml -xsl D:\fopt\test.xsl -out D:\fopt\foo.html
> javax.xml.transform.TransformerException: java.lang.reflect.InvocationTargetExce
> ption
>         at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(Extensio
> nNamespaceSupport.java:99)
>         at org.apache.xalan.extensions.ExtensionsTable.<init>(ExtensionsTable.ja
> va:64)
>         at org.apache.xalan.transformer.TransformerImpl.setExtensionsTable(Trans
> formerImpl.java:441)
>         at org.apache.xalan.transformer.TransformerImpl.transformNode(Transforme
> rImpl.java:1323)
>         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:709)
>         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1284)
>         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1262)
>         at org.apache.xalan.xslt.Process.main(Process.java:1046)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
> rce)
>         at java.lang.reflect.Constructor.newInstance(Unknown Source)
>         at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(Extensio
> nNamespaceSupport.java:93)
>         ... 7 more
> Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
>         at org.apache.bsf.BSFManager.<init>(BSFManager.java:102)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
> rce)
>         at java.lang.reflect.Constructor.newInstance(Unknown Source)
>         at java.lang.Class.newInstance0(Unknown Source)
>         at java.lang.Class.newInstance(Unknown Source)
>         at org.apache.xalan.extensions.ObjectFactory.newInstance(ObjectFactory.j
> ava:457)
>         at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(ExtensionH
> andlerGeneral.java:204)
>         ... 12 more
> ---------
> java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
> rce)
>         at java.lang.reflect.Constructor.newInstance(Unknown Source)
>         at org.apache.xalan.extensions.ExtensionNamespaceSupport.launch(Extensio
> nNamespaceSupport.java:93)
>         at org.apache.xalan.extensions.ExtensionsTable.<init>(ExtensionsTable.ja
> va:64)
>         at org.apache.xalan.transformer.TransformerImpl.setExtensionsTable(Trans
> formerImpl.java:441)
>         at org.apache.xalan.transformer.TransformerImpl.transformNode(Transforme
> rImpl.java:1323)
>         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:709)
>         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1284)
>         at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImp
> l.java:1262)
>         at org.apache.xalan.xslt.Process.main(Process.java:1046)
> Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactor
>         at org.apache.bsf.BSFManager.<init>(BSFManager.java:102)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown So
> rce)
>         at java.lang.reflect.Constructor.newInstance(Unknown Source)
>         at java.lang.Class.newInstance0(Unknown Source)
>         at java.lang.Class.newInstance(Unknown Source)
>         at org.apache.xalan.extensions.ObjectFactory.newInstance(ObjectFactory.
> ava:457)
>         at org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(Extension
> andlerGeneral.java:204)
>         ... 12 more
> file:///D:/fopt/test.xsl; Zeilennummer18; Spaltennummer95; XSLT-Fehler (javax.x
> l.transform.TransformerException): java.lang.NullPointerException
> Exception in thread "main" java.lang.RuntimeException: java.lang.NullPointerExc
> ption
>         at org.apache.xalan.xslt.Process.doExit(Process.java:1153)
>         at org.apache.xalan.xslt.Process.main(Process.java:1126)
> Here my xalan.bat:
> @ECHO OFF
> set LIBDIR=lib
> set LOCALCLASSPATH=build/fop.jar
> set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis.jar
> set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl.jar
> set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan.jar
> set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\serializer.jar
> set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\js.jar
> set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\bsf.jar
> java -cp %LOCALCLASSPATH% org.apache.xalan.xslt.Process %1 %2 %3 %4 %5 %6 %7 %8
> my Styleesheet (after many tries Ive copied the example from xalan.apache.org)
> <?xml version="1.0"?>
> <!--Namespaces are global if you set them in the stylesheet element-->
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
> version="1.0" xmlns:xalan="http://xml.apache.org/xalan"
> xmlns:my-ext="ext1" extension-element-prefixes="my-ext">
> 	<!--The component and its script are in the lxslt namespace and define the
> implementation of the extension.-->
> 	<xalan:component prefix="my-ext" functions="getdate">
> 		<xalan:script lang="javascript">function getdate()
> {
> var d = new Date();
> return "Foo";
> </xalan:script>
> 	</xalan:component>
> 	<xsl:template match="/">
> 		<p>Test :<xsl:value-of select="my-ext:getdate()"/>.</p>
> 	</xsl:template>
> </xsl:stylesheet>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message