Thanks for reporting this. The Saxon optimizer is stumbling over the
expression <xsl:if test="true() = false()"> which occurs 20 or 30 times in this stylesheet. This is a bug which I will fix, but in the meantime please replace these occurrences with <xsl:if test="false()"> and it should run OK. Michael Kay Saxonica Limited > -----Original Message----- > From: Sreenivas.T [mailto:[hidden email]] > Sent: 04 October 2005 08:36 > To: [hidden email]; [hidden email] > Subject: saxonb8-5 and saxonb8-5-1 error > > Hi, > We are facing problem with saxonb8-5 and > saxonb8-5-1. Our application throws error while > getting the transformer from TransformerFactory for > some xsls. Our application transformation happens at > jboss-3.2.3 and we have added saxon8.jar, > saxon8-dom.jar and saxon8-jdom.jar to the server > classpath. The same report works fine with > saxon6-5-4.jar. > > I've attached the XML and XSL files which are giving > errors. > Please help out soon whether its a known issue. > > The code to get the transformer is shown below > protected Transformer getTransformer(String > docXslUrl) > throws TransformerConfigurationException{ > > TransformerFactory theTransformerFactory; > HashMap transformerCache = null; > > if (theTransformerFactory == null) { > theTransformerFactory = > TransformerFactory.newInstance(); > } > if (transformerCache == null) { > transformerCache = new HashMap(); > } > //Testing xsl access > URL xslUrl = null; > try { > xslUrl = new URL(docXslUrl); > } catch (MalformedURLException e) { > } > try { //Testing the URL access > InputStream stream = xslUrl.openStream(); > stream.close(); > } catch (IOException e) { > > } > > Transformer returnedTransformer = (Transformer) > transformerCache.get(docXslUrl); > if (returnedTransformer == null) { > returnedTransformer = > theTransformerFactory.newTransformer(new > StreamSource(docXslUrl)); > > returnedTransformer.setErrorListener(errorListener); > transformerCache.put(docXslUrl, > returnedTransformer); > } > return returnedTransformer; > } > > When we try to get the transformer from the > transformer factory the following error is thrown. > > Running an XSLT 1.0 stylesheet with an XSLT 2.0 > processor > java.lang.ArrayIndexOutOfBoundsException: 0 > java.lang.ArrayIndexOutOfBoundsException: 0 > at > > net.sf.saxon.instruct.Choose.getItemType(Choose.java:145) > at > > net.sf.saxon.expr.PromotionOffer.promote(PromotionOffer.java:221) > at > > net.sf.saxon.expr.PromotionOffer.accept(PromotionOffer.java:174) > at > > net.sf.saxon.instruct.Instruction.promote(Instruction.java:255) > at > > net.sf.saxon.expr.ComputedExpression.doPromotion(ComputedExpre > ssion.java:254) > at > > net.sf.saxon.instruct.Block.promoteInst(Block.java:265) > at > > net.sf.saxon.instruct.Instruction.promote(Instruction.java:259) > at > > net.sf.saxon.expr.ComputedExpression.doPromotion(ComputedExpre > ssion.java:254) > at > > net.sf.saxon.instruct.ParentNodeConstructor.promoteInst(Parent > NodeConstructor.java:131) > at > > net.sf.saxon.instruct.Instruction.promote(Instruction.java:259) > at > > net.sf.saxon.expr.ComputedExpression.doPromotion(ComputedExpre > ssion.java:254) > at > > net.sf.saxon.instruct.ForEach.optimize(ForEach.java:119) > at > > net.sf.saxon.instruct.ParentNodeConstructor.optimize(ParentNod > eConstructor.java:118) > at > net.sf.saxon.instruct.Block.optimize(Block.java:247) > at > > net.sf.saxon.instruct.ParentNodeConstructor.optimize(ParentNod > eConstructor.java:118) > at > > net.sf.saxon.instruct.Choose.optimize(Choose.java:132) > at > net.sf.saxon.instruct.Block.optimize(Block.java:247) > at > > net.sf.saxon.instruct.ParentNodeConstructor.optimize(ParentNod > eConstructor.java:118) > at > net.sf.saxon.instruct.Block.optimize(Block.java:247) > at > > net.sf.saxon.instruct.ParentNodeConstructor.optimize(ParentNod > eConstructor.java:118) > at > > net.sf.saxon.instruct.ParentNodeConstructor.optimize(ParentNod > eConstructor.java:118) > at > > net.sf.saxon.instruct.ForEach.optimize(ForEach.java:102) > at > > net.sf.saxon.instruct.ParentNodeConstructor.optimize(ParentNod > eConstructor.java:118) > at > net.sf.saxon.instruct.Block.optimize(Block.java:247) > at > > net.sf.saxon.instruct.ParentNodeConstructor.optimize(ParentNod > eConstructor.java:118) > at > > net.sf.saxon.instruct.ForEach.optimize(ForEach.java:102) > at > > net.sf.saxon.instruct.ForEach.optimize(ForEach.java:102) > at > > net.sf.saxon.instruct.ForEach.optimize(ForEach.java:102) > at > > net.sf.saxon.instruct.ForEach.optimize(ForEach.java:102) > at > net.sf.saxon.instruct.Block.optimize(Block.java:247) > at > > net.sf.saxon.instruct.ParentNodeConstructor.optimize(ParentNod > eConstructor.java:118) > at > net.sf.saxon.instruct.Block.optimize(Block.java:247) > at > > net.sf.saxon.instruct.ParentNodeConstructor.optimize(ParentNod > eConstructor.java:118) > at > net.sf.saxon.instruct.Block.optimize(Block.java:247) > at > > net.sf.saxon.instruct.ParentNodeConstructor.optimize(ParentNod > eConstructor.java:118) > at > > net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:104) > at > > net.sf.saxon.expr.LetExpression.optimize(LetExpression.java:104) > at > > net.sf.saxon.instruct.ForEach.optimize(ForEach.java:102) > at > net.sf.saxon.instruct.Block.optimize(Block.java:247) > at > > net.sf.saxon.instruct.ParentNodeConstructor.optimize(ParentNod > eConstructor.java:118) > at > > net.sf.saxon.style.XSLTemplate.compile(XSLTemplate.java:305) > at > > net.sf.saxon.style.XSLStylesheet.compileStylesheet(XSLStyleshe > et.java:989) > at > > net.sf.saxon.PreparedStylesheet.setStylesheetDocument(Prepared > Stylesheet.java:285) > at > > net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:117) > at > > net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFa > ctoryImpl.java:133) > at > > net.sf.saxon.TransformerFactoryImpl.newTransformer(Transformer > FactoryImpl.java:88) > at > > obbisoft.transport.businessobject.report.ObbiReportServerBean. > getTransformer(ObbiReportServerBean.java:389) > at > > obbisoft.transport.businessobject.report.ObbiReportServerBean. > runReport(ObbiReportServerBean.java:326) > at > > obbisoft.transport.businessobject.report.ObbiReportServerBean. > runReport(ObbiReportServerBean.java:187) > at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess > orImpl.java:39) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth > odAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > > org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.i > nvoke(StatelessSessionContainer.java:683) > at > > org.jboss.resource.connectionmanager.CachedConnectionIntercept > or.invoke(CachedConnectionInterceptor.java:185) > at > > org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invo > ke(StatelessSessionInstanceInterceptor.java:72) > at > > org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(Abstrac > tTxInterceptor.java:84) > at > > org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxI > nterceptorCMT.java:297) > at > > org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT > .java:128) > at > > org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInter > ceptor.java:118) > at > > org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) > at > > org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(Pro > xyFactoryFinderInterceptor.java:122) > at > > org.jboss.ejb.StatelessSessionContainer.internalInvoke(Statele > ssSessionContainer.java:331) > at > org.jboss.ejb.Container.invoke(Container.java:700) > at > sun.reflect.GeneratedMethodAccessor51.invoke(Unknown > Source) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth > odAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > > org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(Reflec > tedMBeanDispatcher.java:284) > at > > org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) > at > > org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoke > r.java:367) > at > sun.reflect.GeneratedMethodAccessor53.invoke(Unknown > Source) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth > odAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) > at > sun.rmi.transport.Transport$1.run(Transport.java:148) > at > java.security.AccessController.doPrivileged(Native > Method) > at > > sun.rmi.transport.Transport.serviceCall(Transport.java:144) > at > > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport > .java:460) > at > > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTr > ansport.java:701) > at java.lang.Thread.run(Thread.java:534) > > > Thanks and regards, > Sreenivas.T > > > > > __________________________________ > Yahoo! Mail - PC Magazine Editors' Choice 2005 > http://mail.yahoo.com > ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ saxon-help mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/saxon-help |
Free forum by Nabble | Edit this page |