Matthew --

Did you ever end up working on this?  I just tried my example and
everything works fine except XalanJ hangs up at the end.  I traced this
in a debugger and everything seems fine until I return from the
org.apache.xalan.xslt.Process.main method.  At that point, everything
hangs!!

I conclude from this that there is some problem in one of the native
methods that is causing an overwrite of some piece of storage.

Unfortunately, I'm not that familiar with c++ nor with BSF's native code
so I think the best way to handle this is to just report a bug to the
BSF folks.  This is fairly easy to recreate but the BSF project doesn't
seem active.

Do we have anyone with VisualC set up on a windows box that might want
to track down this code in a debugger and propose a fix to the BSF
folks?

Gary

> -----Original Message-----
> From: Matthew L. Avizinis [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, October 23, 2001 7:12 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Embedded script with XalanJ
> 
> 
> I attempted the following instructions but have yet to 
> achieve success (it's been put on the back burner on low for 
> now).  If you are successful, let us all know. Hope this gets 
> you started somewhere.
> 
>    Matthew L. Avizinis <mailto:[EMAIL PROTECTED]>
> Gleim Publications, Inc.
>    4201 NW 95th Blvd.
>  Gainesville, FL 32606
> (352)-375-0772 ext. 101
>       www.gleim.com <http://www.gleim.com>
> 
> 
> -----Original Message-----
> From: Gary L Peskin [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 31, 2001 4:20 PM
> To: [EMAIL PROTECTED]
> Subject: RE: embedded script using VBScript
> 
> Matthew --
> 
> This is confusing and I agree that the instructions are not 
> clear (or even available).  You need to go to the BSF website 
> at 
> http://www-124.ibm.com/developerworks/project/showfiles.php?gr
> oup_id=16&
> release_id=59 and download the latest binary release which 
> should be bsf-bin-2.2.zip.  Extract the bsf.jar file there 
> and replace the one that came with the XalanJ download just 
> be to be safe.
> 
> Then, you need to extract bsfactivescriptengine.dll from that 
> same .zip. Save this .dll file somewhere.  It needs to be 
> either on your PATH (not
> CLASSPATH) or in your working directory.  This is loaded with
> 
>   System.loadLibrary("bsfactivescriptingengine.dll")
> 
> If it still blows up, try examing the system property 
> java.library.path. It should, however, be set correctly from 
> your PATH environment variable.
> 
> Also, you'll need to have MSVCP60.DLL installed in your 
> working directory or a directory on your path.
> 
> I've had a few questions about this but no one has ever 
> reported to me that they got it to work.  Can you please 
> follow these steps and let me know your results?  If we can 
> get things to work, I'd really appreciate any suggested 
> documentation changes to the "Extensions" page on the XalanJ 
> web site that will provide the information that people need 
> to get started with this quickly and effectively.
> 
> Thanks,
> Gary
> 
> > -----Original Message-----
> > From: Gary L Peskin [mailto:[EMAIL PROTECTED]]
> > This is loaded with
> >
> >   System.loadLibrary("bsfactivescriptingengine.dll")
> >
> 
> Ooops, I should have said that this is loaded with
> 
>    System.loadLibrary("bsfactivescriptingengine")
> 
> without the .dll suffix.  That is added by the WinJVM.
> 
> Gary
> 
> 
> 
> 
> 
> > -----Original Message-----
> > From: Khairnar Dinesh [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, October 19, 2001 10:23 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: Embedded script with XalanJ
> >
> >
> > Hi!
> >
> > I would like to know
> > how I can get vbscript embedded into the xsl file
> > work perfectly.
> >
> > when I apply following xsl
> >
> > <?xml version="1.0"?>
> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> >                 xmlns:lxslt="http://xml.apache.org/xslt";
> >                 xmlns:counter="MyCounter"
> >                 extension-element-prefixes="counter"
> >                 version="1.0">
> >   <lxslt:component prefix="counter"
> >                    functions="read">
> >     <lxslt:script lang="vbscript">
> >       function read(str)
> >         read str
> >      end function
> >     </lxslt:script>
> >   </lxslt:component>
> >   <xsl:template match="/">
> >     <HTML>
> >       <H1>Names in alphatebical order</H1>
> >         <p>
> >         <xsl:value-of select="counter:read('FromRead')"/>
> >         </p>
> >     </HTML>
> >   </xsl:template>
> > </xsl:stylesheet>
> >
> > on the following xml
> > <?xml version="1.0"?>
> > <doc>
> >   <name first="David" last="Marston"/>
> >    <name first="Shane" last="Curcuru"/>
> > </doc>
> >
> > what I get is as follows:
> >
> > java.lang.reflect.InvocationTargetException:
> > java.lang.NullPointerException
> >     at 
> com.ibm.bsf.engines.activescript.ActiveScriptEngine.call(ActiveScr
> > iptEngine.
> > java:793)
> >     at java.lang.reflect.Method.invoke(Native Method)
> >     at
> > org.apache.xalan.extensions.ExtensionHandlerGeneral.callFunction(E
> > xtensionHa
> > ndlerGeneral.java:299)
> >     at
> > org.apache.xalan.extensions.ExtensionsTable.extFunction(Extensions
> > Table.java
> > :253)
> >     at
> > org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction
> > .java:141)
> >     at org.apache.xpath.XPath.execute(XPath.java:260)
> >     at
> > org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:251)
> >     at
> > org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
> > (Transform
> > erImpl.java:2251)
> >     at
> > org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralRe
> > sult.java:
> > 637)
> >     at
> > org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
> > (Transform
> > erImpl.java:2251)
> >     at
> > org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralRe
> > sult.java:
> > 637)
> >     at
> > org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
> > (Transform
> > erImpl.java:2251)
> >     at
> > org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(T
> > ransformer
> > Impl.java:2134)
> >     at
> > org.apache.xalan.transformer.TransformerImpl.transformNode(Transfo
> > rmerImpl.j
> > ava:1246)
> >     at
> > org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.j
> > ava:3070)
> >     at java.lang.Thread.run(Thread.java:484)
> > file:///D:/Dinesh/SelfTutorials/JavaXML/Xalan/vbscript.xsl; Line
> > 21; Column
> > 58; javax.xml.transform.TransformerException: Could not 
> create extension:
> > read because of: java.lang.reflect.InvocationTargetException
> >     at
> > org.apache.xalan.transformer.TransformerImpl.transformNode(Transfo
> > rmerImpl.j
> > ava:1269)
> >     at
> > org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.j
> > ava:3070)
> >     at java.lang.Thread.run(Thread.java:484)
> > ---------
> > ; SystemID: 
> file:///D:/Dinesh/SelfTutorials/JavaXML/Xalan/vbscript.xsl;
> > Line#: 21; Column#: 58
> > ; SystemID: 
> file:///D:/Dinesh/SelfTutorials/JavaXML/Xalan/vbscript.xsl;
> > Line#: 21; Column#: 58
> > javax.xml.transform.TransformerException: Could not create 
> extension: read
> > because of: java.lang.reflect.InvocationTargetException
> >     at
> > org.apache.xalan.extensions.ExtensionHandlerGeneral.callFunction(E
> > xtensionHa
> > ndlerGeneral.java:322)
> >     at
> > org.apache.xalan.extensions.ExtensionsTable.extFunction(Extensions
> > Table.java
> > :253)
> >     at
> > org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction
> > .java:141)
> >     at org.apache.xpath.XPath.execute(XPath.java:260)
> >     at
> > org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:251)
> >     at
> > org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
> > (Transform
> > erImpl.java:2251)
> >     at
> > org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralRe
> > sult.java:
> > 637)
> >     at
> > org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
> > (Transform
> > erImpl.java:2251)
> >     at
> > org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralRe
> > sult.java:
> > 637)
> >     at
> > org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
> > (Transform
> > erImpl.java:2251)
> >     at
> > org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(T
> > ransformer
> > Impl.java:2134)
> >     at
> > org.apache.xalan.transformer.TransformerImpl.transformNode(Transfo
> > rmerImpl.j
> > ava:1246)
> >     at
> > org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.j
> > ava:3070)
> >     at java.lang.Thread.run(Thread.java:484)
> >
> > Regards,
> > Dinesh.
> >
> >
> > The information in this message is confidential and may be legally 
> > privileged. It is intended solely for the addressee. Access to this 
> > message by anyone else is unauthorized. If you are not the intended 
> > recipient, any disclosure, copying, or distribution of the 
> message, or 
> > any action or omission taken by you in reliance on it, is 
> prohibited 
> > and may be unlawful. Please immediately contact the sender 
> if you have 
> > received this message in error.
> 

Reply via email to