Stream: committers
Topic: delete a resource from build
Rik Smithies (Oct 08 2018 at 10:10):
I'm trying to delete an obsolete draft resource. I have removed from compartments.xml, translations.xml, hierarchy.xml, all references from other resources, resourcelist.html, history.html, taken all references out of fhir.ini, added to removed-resources section (thanks @Lloyd McKenzie ), and have done a clean. I still get "unable to find resource". What am I missing please?
Rob Hausam (Oct 08 2018 at 14:19):
I would try deleting either your *.class files or if needed your entire publish directory.
Rob Hausam (Oct 08 2018 at 14:24):
that could be "and", not necessarily "or"
for similar issues I've usually found that deleting *.class files works, but not always
Lloyd McKenzie (Oct 08 2018 at 15:23):
If that doesn't work, I'm not sure. Post the tail of your stack trace and I can see if that triggers any ideas
Rik Smithies (Oct 08 2018 at 16:49):
thanks. Still not working. Stack below. I am not sure which of the two traces is the relevant one.
[java] WARNING: Unable to create warnings file - one or more profiles-* files unavailable or invalid
[java] To determine the cause of the build failure, look in the log prior to the warning and information messages immediately above
[java] ERROR: Unable to process warnings: An empty sequence is not allowed as the value of variable $groups
[java] Error on line 14
[java] XTTE0570: An empty sequence is not allowed as the value of variable $groups
[java] in variable groups
[java] This was a Full Build 1.045 371sec 1348MB
[java] ; SystemID: ; Line#: 14; Column#: -1
[java] net.sf.saxon.trans.XPathException: An empty sequence is not allowed as the value of variable $groups
[java] at net.sf.saxon.expr.Expression.typeError(Expression.java:1163)
[java] at net.sf.saxon.expr.CardinalityChecker.iterate(CardinalityChecker.java:226)
[java] at net.sf.saxon.expr.ItemChecker.iterate(ItemChecker.java:170)
[java] at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:340)
[java] at net.sf.saxon.expr.instruct.GlobalVariable.getSelectValue(GlobalVariable.java:563)
[java] at net.sf.saxon.expr.instruct.GlobalVariable.actuallyEvaluate(GlobalVariable.java:615)
[java] at net.sf.saxon.expr.instruct.GlobalVariable.evaluateVariable(GlobalVariable.java:587)
[java] at net.sf.saxon.expr.VariableReference.evaluateVariable(VariableReference.java:505)
[java] at net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:453)
[java] at net.sf.saxon.expr.SlashExpression.iterate(SlashExpression.java:813)
[java] at net.sf.saxon.expr.sort.DocumentSorter.iterate(DocumentSorter.java:145)
[java] at net.sf.saxon.expr.Atomizer.iterate(Atomizer.java:294)
[java] at net.sf.saxon.functions.DistinctValues.iterate(DistinctValues.java:76)
[java] at net.sf.saxon.expr.sort.SortExpression.iterate(SortExpression.java:537)
[java] at net.sf.saxon.expr.instruct.ForEach.iterate(ForEach.java:498)
[java] at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:112)
[java] at net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:454)
[java] at net.sf.saxon.expr.instruct.ForEach.iterate(ForEach.java:498)
[java] at net.sf.saxon.expr.ItemChecker.iterate(ItemChecker.java:170)
[java] at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:112)
[java] at net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:454)
[java] at net.sf.saxon.expr.instruct.CopyOf.iterate(CopyOf.java:798)
[java] at net.sf.saxon.expr.instruct.BlockIterator.next(BlockIterator.java:49)
[java] at net.sf.saxon.expr.sort.SortedIterator.buildArray(SortedIterator.java:223)
[java] at net.sf.saxon.expr.sort.SortedIterator.doSort(SortedIterator.java:255)
[java] at net.sf.saxon.expr.sort.SortedIterator.next(SortedIterator.java:140)
[java] at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:475)
[java] at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138)
[java] at net.sf.saxon.expr.LetExpression.process(LetExpression.java:463)
[java] at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:431)
[java] at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:373)
[java] at net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:239)
[java] at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1057)
[java] at net.sf.saxon.Controller.transformDocument(Controller.java:2080)
[java] at net.sf.saxon.Controller.transform(Controller.java:1903)
[java] at org.hl7.fhir.utilities.Utilities.saxonTransform(Utilities.java:371)
[java] at org.hl7.fhir.tools.publisher.Publisher.processWarnings(Publisher.java:1891)
[java] at org.hl7.fhir.tools.publisher.Publisher.execute(Publisher.java:655)
[java] at org.hl7.fhir.tools.publisher.Publisher.main(Publisher.java:482)
[java] FHIR build failure @ Mon, Oct 8, 2018 17:41+0100 0.927 372sec 1348MB
[java] Error: unable to find resource 'MedicinalProductClinicals'
[java] org.hl7.fhir.exceptions.FHIRException: unable to find resource 'MedicinalProductClinicals'
[java] at org.hl7.fhir.definitions.model.Definitions.getResourceByName(Definitions.java:298)
[java] at org.hl7.fhir.tools.publisher.PageProcessor.getFmm(PageProcessor.java:9950)
[java] at org.hl7.fhir.tools.publisher.PageProcessor.processPageIncludes(PageProcessor.java:933)
[java] at org.hl7.fhir.tools.publisher.PageProcessor.processPageIncludes(PageProcessor.java:652)
[java] at org.hl7.fhir.tools.publisher.PageProcessor.processPageIncludes(PageProcessor.java:648)
[java] at org.hl7.fhir.tools.publisher.Publisher.producePage(Publisher.java:5222)
[java] at org.hl7.fhir.tools.publisher.Publisher.produceSpec(Publisher.java:2451)
[java] at org.hl7.fhir.tools.publisher.Publisher.produceSpecification(Publisher.java:2234)
[java] at org.hl7.fhir.tools.publisher.Publisher.execute(Publisher.java:624)
[java] at org.hl7.fhir.tools.publisher.Publisher.main(Publisher.java:482)
Grahame Grieve (Oct 08 2018 at 18:05):
you still have a reference to it somewhere, in a page
Lloyd McKenzie (Oct 08 2018 at 18:20):
The groups message just means things bombed before the warnings file could be created. The message you care about is prior to this one.
Rik Smithies (Feb 17 2021 at 15:09):
Update on this because it caught me out again and now I know why. The html templates in the build e.g. resourcelist.html do not appear to support xml style comments. If you comment out a resource, the build doesn't notice the comment. So, don't use comments. Physically remove the entries.
Last updated: Apr 12 2022 at 19:14 UTC