New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not generate HTML output (XPathException) [4.0.0 beta 4] #1025
Comments
Thanks for opening your first issue here! 😃 |
+1 |
Also getting this on beta 5. XML report works, though. |
spotbugs-4.0.1-SNAPSHOT java version "1.8.0_60" For me this is caused by NM_CONFUSING bug types.
It looks to me like the html transform doesn't know how to handle errors for bug types which span multiple classes, such as NM_CONFUSING where the error is that two classes have methods that differ by capitalization. Once I exclude NM_CONFUSING, html reports work again.
Unfortunately, I don't remember enough about xml transforms to fix it. |
For me it's DE_MIGHT_IGNORE. The XML report works fine.
|
Yes, DE_MIGHT_IGNORE is another example of multiple class tags for a single bug report. |
If anyone would like to test this fix (or use as a workaround until the next release), you can make a modified copy of default.xsl from your current distribution or download it from the PR here. The only change is to use "Class[1]" instead of "Class". With an ant task, you can specify this alternate xls file using the stylesheet attribute:
|
That stylesheet works like a charm. Thanks so much for the quick fix! |
This did not make it into 4.0.1, it seems? |
I'm migrating from Findbugs to Spotbugs using the Gradle plugin. I was hoping to use 4.0.1 but immediately hit this bug. Using plugin:3.0.0 + tool:3.1.12 which seems to work. |
Yep, fancy.xsl is also affected:
I have patch for both. I know there are two pPR's hanging, let create another one... |
See issue #1025: we had troubles to transorm if BugInstance contained multiple Class elements. This commit fixes fancy.xsl.
See issue #1025: we had troubles to transorm if BugInstance contained multiple Class elements. This commit fixes default.xsl.
See issue #1025: we had troubles to transorm if BugInstance contained multiple Class elements. This commit fixes fancy.xsl.
See issue #1025: we had troubles to transorm if BugInstance contained multiple Class elements. This commit fixes default.xsl.
See issue #1025: we had troubles to transorm if BugInstance contained multiple Class elements. This commit fixes plain.xsl.
Hi,
I tried 4.0.0-beta-4 with same parameters I'm using for 3.1.12 and got this error at the end of analysis :
The following errors occurred during analysis:
Could not generate HTML output
net.sf.saxon.trans.XPathException: A sequence of more than one item is not allowed as the @select attribute of xsl:sort (@classname="infass.util.base.data.IRecord", @classname="infass.util.importation.mapper.MapperRecord", @cl
assname="infass.util.base.data.FlatIRecord", ...)
At net.sf.saxon.expr.Expression.typeError(Expression.java:1464)
At net.sf.saxon.expr.SingletonAtomizer.evaluateItem(SingletonAtomizer.java:221)
At net.sf.saxon.expr.SingletonAtomizer.evaluateItem(SingletonAtomizer.java:31)
At net.sf.saxon.expr.sort.SortExpression.evaluateSortKey(SortExpression.java:394)
At net.sf.saxon.expr.sort.SortedIterator.buildArray(SortedIterator.java:215)
At net.sf.saxon.expr.sort.SortedIterator.doSort(SortedIterator.java:231)
At net.sf.saxon.expr.sort.SortedIterator.next(SortedIterator.java:148)
At net.sf.saxon.om.FocusTrackingIterator.next(FocusTrackingIterator.java:73)
At net.sf.saxon.trans.Mode.applyTemplates(Mode.java:455)
At net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:300)
At net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:255)
At net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
At net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
At net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
At net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:299)
At net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
At net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:243)
At net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:353)
At net.sf.saxon.expr.LetExpression.process(LetExpression.java:608)
At net.sf.saxon.expr.instruct.ForEach.lambda$processLeavingTail$0(ForEach.java:484)
At net.sf.saxon.om.SequenceIterator.forEachOrFail(SequenceIterator.java:128)
At net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:484)
At net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
At net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
At net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
At net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:299)
At net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:721)
At net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:735)
At net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:132)
At net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:352)
At net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:299)
At net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:352)
At net.sf.saxon.trans.Mode.applyTemplates(Mode.java:532)
At net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:747)
At net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:347)
At net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:349)
At net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:71)
At edu.umd.cs.findbugs.HTMLBugReporter.finish(HTMLBugReporter.java:73)
At edu.umd.cs.findbugs.DelegatingBugReporter.finish(DelegatingBugReporter.java:89)
At edu.umd.cs.findbugs.DelegatingBugReporter.finish(DelegatingBugReporter.java:89)
At edu.umd.cs.findbugs.DelegatingBugReporter.finish(DelegatingBugReporter.java:89)
At edu.umd.cs.findbugs.DelegatingBugReporter.finish(DelegatingBugReporter.java:89)
At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1165)
At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:309)
At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:395)
At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1231)
At edu.umd.cs.findbugs.LaunchAppropriateUI.launch(LaunchAppropriateUI.java:106)
At edu.umd.cs.findbugs.LaunchAppropriateUI.main(LaunchAppropriateUI.java:198)
The text was updated successfully, but these errors were encountered: