You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Henry Zongaro (JIRA)" <xa...@xml.apache.org> on 2004/11/02 12:18:36 UTC

[jira] Commented: (XALANJ-654) Programmer's assertion in getNextStepPos: unknown stepType: -1

     [ http://nagoya.apache.org/jira/browse/XALANJ-654?page=comments#action_54922 ]
     
Henry Zongaro commented on XALANJ-654:
--------------------------------------

Lars Huttar (lars@huttar.net) writes:

I feel otherwise (Re: Joe's comment). I was bitten by this error message too.
Even though I, and Yannick, and George, had committed syntax errors, that does
not mean that this error message is not a bug. "Unknown stepType: -1" gives no
clue as to what the error is. As most programmers have experienced, unhelpful
error messages can lead to hours of frustration and lost productivity. It's not
my intent to rant, just to emphasize that just because the programmer has
committed a syntax error doesn't relieve the processor of all responsibility to
respond in an appropriate way.

This is one reason I like to keep Saxon around: when Xalan gives an error
message that doesn't help, Saxon usually does a better job. In this case, I had
an incomplete XPath expression in a test:
        <xsl:if test="$entity/*/access[@role = $role and (@function ='none' or
@function = 'read')] and">
(note the "and" with nothing after it).
I only discovered this because Saxon gave the error "E Error in expression
$entity/*/access[@role = $role and (@function ='none' or @function = 'read')]
and: Unexpected token EOF in expression	model.xsl
file:/C:/Program%20Files/Apache%20Group/cocoon/mount/gem3/standards/r3/c2/model.xsl
53:0"
Very helpful.

So, the suggested fix would be to print an error message that gives indications
of what would have caused this condition.


> Programmer's assertion in getNextStepPos: unknown stepType: -1
> --------------------------------------------------------------
>
>          Key: XALANJ-654
>          URL: http://nagoya.apache.org/jira/browse/XALANJ-654
>      Project: XalanJ2
>         Type: Bug
>   Components: Xalan-interpretive transformation, transformation
>     Versions: 2.2.x
>  Environment: Operating System: Solaris
> Platform: Sun
>     Reporter: George Lindholm
>     Assignee: Xalan Developers Mailing List

>
> Trying to migrate my xalan 1.x to the 2.x release. Narrowed problem down to this
> statement:
> <xsl:value-of select="concat(email, &gt;)"/>
> replacing the "&gt;" with a "'a'" works fine.
> javax.xml.transform.TransformerConfigurationException:
> javax.xml.transform.TransformerConfigurationException:
> javax.xml.transform.TransformerException: java.lang.RuntimeException:
> Programmer's assertion in getNextStepPos: unknown stepType: -1
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:767)
> 	at xalan.Untitled1.main(Untitled1.java:32)
> ---------
> javax.xml.transform.TransformerConfigurationException:
> javax.xml.transform.TransformerException: java.lang.RuntimeException:
> Programmer's assertion in getNextStepPos: unknown stepType: -1
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:946)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
> 	at xalan.Untitled1.main(Untitled1.java:32)
> ---------
> javax.xml.transform.TransformerException: java.lang.RuntimeException:
> Programmer's assertion in getNextStepPos: unknown stepType: -1
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:942)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
> 	at xalan.Untitled1.main(Untitled1.java:32)
> ---------
> java.lang.RuntimeException: Programmer's assertion in getNextStepPos: unknown
> stepType: -1
> 	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1094)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:934)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
> 	at xalan.Untitled1.main(Untitled1.java:32)
> ---------
> java.lang.RuntimeException: Programmer's assertion in getNextStepPos: unknown
> stepType: -1
> 	at org.apache.xpath.compiler.OpMap.getNextStepPos(OpMap.java:277)
> 	at org.apache.xpath.axes.DescendantIterator.<init>(DescendantIterator.java:121)
> 	at org.apache.xpath.axes.WalkerFactory.newDTMIterator(WalkerFactory.java:297)
> 	at org.apache.xpath.compiler.Compiler.locationPath(Compiler.java:677)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:217)
> 	at org.apache.xpath.compiler.Compiler.compileOperation(Compiler.java:255)
> 	at org.apache.xpath.compiler.Compiler.gt(Compiler.java:390)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:179)
> 	at org.apache.xpath.compiler.Compiler.arg(Compiler.java:625)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:211)
> 	at org.apache.xpath.compiler.Compiler.compileFunction(Compiler.java:1066)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:215)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:163)
> 	at org.apache.xpath.XPath.<init>(XPath.java:224)
> 	at
> org.apache.xalan.processor.StylesheetHandler.createXPath(StylesheetHandler.java:196)
> 	at org.apache.xalan.processor.XSLTAttributeDef.processEXPR(XSLTAttributeDef.java:575)
> 	at
> org.apache.xalan.processor.XSLTAttributeDef.processValue(XSLTAttributeDef.java:920)
> 	at
> org.apache.xalan.processor.XSLTAttributeDef.setAttrValue(XSLTAttributeDef.java:1078)
> 	at
> org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:375)
> 	at
> org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:311)
> 	at
> org.apache.xalan.processor.ProcessorTemplateElem.startElement(ProcessorTemplateElem.java:122)
> 	at
> org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:656)
> 	at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
> 	at
> org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1214)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
> 	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:934)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
> 	at xalan.Untitled1.main(Untitled1.java:32)
> ---------
> java.lang.RuntimeException: Programmer's assertion in getNextStepPos: unknown
> stepType: -1
> 	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1094)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:934)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
> 	at xalan.Untitled1.main(Untitled1.java:32)
> ---------
> java.lang.RuntimeException: Programmer's assertion in getNextStepPos: unknown
> stepType: -1
> 	at org.apache.xpath.compiler.OpMap.getNextStepPos(OpMap.java:277)
> 	at org.apache.xpath.axes.DescendantIterator.<init>(DescendantIterator.java:121)
> 	at org.apache.xpath.axes.WalkerFactory.newDTMIterator(WalkerFactory.java:297)
> 	at org.apache.xpath.compiler.Compiler.locationPath(Compiler.java:677)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:217)
> 	at org.apache.xpath.compiler.Compiler.compileOperation(Compiler.java:255)
> 	at org.apache.xpath.compiler.Compiler.gt(Compiler.java:390)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:179)
> 	at org.apache.xpath.compiler.Compiler.arg(Compiler.java:625)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:211)
> 	at org.apache.xpath.compiler.Compiler.compileFunction(Compiler.java:1066)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:215)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:163)
> 	at org.apache.xpath.XPath.<init>(XPath.java:224)
> 	at
> org.apache.xalan.processor.StylesheetHandler.createXPath(StylesheetHandler.java:196)
> 	at org.apache.xalan.processor.XSLTAttributeDef.processEXPR(XSLTAttributeDef.java:575)
> 	at
> org.apache.xalan.processor.XSLTAttributeDef.processValue(XSLTAttributeDef.java:920)
> 	at
> org.apache.xalan.processor.XSLTAttributeDef.setAttrValue(XSLTAttributeDef.java:1078)
> 	at
> org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:375)
> 	at
> org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:311)
> 	at
> org.apache.xalan.processor.ProcessorTemplateElem.startElement(ProcessorTemplateElem.java:122)
> 	at
> org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:656)
> 	at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
> 	at
> org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1214)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
> 	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:934)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
> 	at xalan.Untitled1.main(Untitled1.java:32)
> ---------
> javax.xml.transform.TransformerException: java.lang.RuntimeException:
> Programmer's assertion in getNextStepPos: unknown stepType: -1
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:942)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
> 	at xalan.Untitled1.main(Untitled1.java:32)
> ---------
> java.lang.RuntimeException: Programmer's assertion in getNextStepPos: unknown
> stepType: -1
> 	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1094)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:934)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
> 	at xalan.Untitled1.main(Untitled1.java:32)
> ---------
> java.lang.RuntimeException: Programmer's assertion in getNextStepPos: unknown
> stepType: -1
> 	at org.apache.xpath.compiler.OpMap.getNextStepPos(OpMap.java:277)
> 	at org.apache.xpath.axes.DescendantIterator.<init>(DescendantIterator.java:121)
> 	at org.apache.xpath.axes.WalkerFactory.newDTMIterator(WalkerFactory.java:297)
> 	at org.apache.xpath.compiler.Compiler.locationPath(Compiler.java:677)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:217)
> 	at org.apache.xpath.compiler.Compiler.compileOperation(Compiler.java:255)
> 	at org.apache.xpath.compiler.Compiler.gt(Compiler.java:390)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:179)
> 	at org.apache.xpath.compiler.Compiler.arg(Compiler.java:625)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:211)
> 	at org.apache.xpath.compiler.Compiler.compileFunction(Compiler.java:1066)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:215)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:163)
> 	at org.apache.xpath.XPath.<init>(XPath.java:224)
> 	at
> org.apache.xalan.processor.StylesheetHandler.createXPath(StylesheetHandler.java:196)
> 	at org.apache.xalan.processor.XSLTAttributeDef.processEXPR(XSLTAttributeDef.java:575)
> 	at
> org.apache.xalan.processor.XSLTAttributeDef.processValue(XSLTAttributeDef.java:920)
> 	at
> org.apache.xalan.processor.XSLTAttributeDef.setAttrValue(XSLTAttributeDef.java:1078)
> 	at
> org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:375)
> 	at
> org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:311)
> 	at
> org.apache.xalan.processor.ProcessorTemplateElem.startElement(ProcessorTemplateElem.java:122)
> 	at
> org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:656)
> 	at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
> 	at
> org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1214)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
> 	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:934)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
> 	at xalan.Untitled1.main(Untitled1.java:32)
> ---------
> java.lang.RuntimeException: Programmer's assertion in getNextStepPos: unknown
> stepType: -1
> 	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1094)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:934)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
> 	at xalan.Untitled1.main(Untitled1.java:32)
> ---------
> java.lang.RuntimeException: Programmer's assertion in getNextStepPos: unknown
> stepType: -1
> 	at org.apache.xpath.compiler.OpMap.getNextStepPos(OpMap.java:277)
> 	at org.apache.xpath.axes.DescendantIterator.<init>(DescendantIterator.java:121)
> 	at org.apache.xpath.axes.WalkerFactory.newDTMIterator(WalkerFactory.java:297)
> 	at org.apache.xpath.compiler.Compiler.locationPath(Compiler.java:677)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:217)
> 	at org.apache.xpath.compiler.Compiler.compileOperation(Compiler.java:255)
> 	at org.apache.xpath.compiler.Compiler.gt(Compiler.java:390)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:179)
> 	at org.apache.xpath.compiler.Compiler.arg(Compiler.java:625)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:211)
> 	at org.apache.xpath.compiler.Compiler.compileFunction(Compiler.java:1066)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:215)
> 	at org.apache.xpath.compiler.Compiler.compile(Compiler.java:163)
> 	at org.apache.xpath.XPath.<init>(XPath.java:224)
> 	at
> org.apache.xalan.processor.StylesheetHandler.createXPath(StylesheetHandler.java:196)
> 	at org.apache.xalan.processor.XSLTAttributeDef.processEXPR(XSLTAttributeDef.java:575)
> 	at
> org.apache.xalan.processor.XSLTAttributeDef.processValue(XSLTAttributeDef.java:920)
> 	at
> org.apache.xalan.processor.XSLTAttributeDef.setAttrValue(XSLTAttributeDef.java:1078)
> 	at
> org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:375)
> 	at
> org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:311)
> 	at
> org.apache.xalan.processor.ProcessorTemplateElem.startElement(ProcessorTemplateElem.java:122)
> 	at
> org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:656)
> 	at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
> 	at
> org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1214)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
> 	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:934)
> 	at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)
> 	at xalan.Untitled1.main(Untitled1.java:32)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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