Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2893

Unable to initialise

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.6.0
    • 3.8.0
    • DFDL Schemas, SAX
    • None

    Description

      Because of the recent changes in Misc.scala of Release 3.6.0 to resolve jar path differently, I am unable to create compiler.

      The method optRelativeJarFileURI in org.apache.daffodil.lib.util.Misc.scala assumes to have onl two parts of the jar file location. Hence the following assert exists
      Assert.invariant(parts.length == 2)

      For me, i am using smooks as a dependency in my project which has daffodil included as a dependency. As a result i see following file path getting used as contextURI. When i use jar created for my project to deploy on a docker, i get this. The code seems to be working in my local but deploying it on docker makes it unfunctional.
       
      jar:file:/dpw-test-1.0.0-SNAPSHOT-exe.jar!/BOOT-INF/lib/daffodil-lib_2.12-3.6.0.jar!/org/apache/daffodil/xsd/DFDL_part3_model.xsd 
       
      Because of assertion i get to see following stacktrace

      Caused by: org.smooks.api.SmooksConfigException: org.smooks.api.SmooksConfigException: java.lang.RuntimeException: org.apache.daffodil.lib.exceptions.Abort: Invariant broken: parts.length.==(2)
      org.apache.daffodil.lib.exceptions.Assert$.abort(Assert.scala:159)
      org.apache.daffodil.lib.util.Misc$.optRelativeJarFileURI(Misc.scala:183)
      org.apache.daffodil.lib.util.Misc$.getResourceRelativeOnlyOption(Misc.scala:145)
      org.apache.daffodil.lib.xml.XMLUtils$.$anonfun$resolveSchemaLocation$3(XMLUtils.scala:1492)
      at org.smooks.cartridges.dfdl.unparser.DfdlUnparserContentHandlerFactory.create(DfdlUnparserContentHandlerFactory.java:74)
      at org.smooks.cartridges.dfdl.unparser.DfdlUnparserContentHandlerFactory.create(DfdlUnparserContentHandlerFactory.java:56)
      at org.smooks.engine.delivery.DefaultContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.addContentDeliveryUnit(DefaultContentDeliveryConfigBuilder.java:442)
      at org.smooks.engine.delivery.DefaultContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.applyContentDeliveryUnitStrategy(DefaultContentDeliveryConfigBuilder.java:399)
      at org.smooks.engine.delivery.DefaultContentDeliveryConfigBuilder$ContentHandlerExtractionStrategy.applyStrategy(DefaultContentDeliveryConfigBuilder.java:373)
      at org.smooks.engine.delivery.DefaultContentDeliveryConfigBuilder$ResourceConfigTableIterator.iterate(DefaultContentDeliveryConfigBuilder.java:524)
      at org.smooks.engine.delivery.DefaultContentDeliveryConfigBuilder$ResourceConfigTableIterator.access$200(DefaultContentDeliveryConfigBuilder.java:504)
      at org.smooks.engine.delivery.DefaultContentDeliveryConfigBuilder.extractContentHandlers(DefaultContentDeliveryConfigBuilder.java:346)
      at org.smooks.engine.delivery.DefaultContentDeliveryConfigBuilder.load(DefaultContentDeliveryConfigBuilder.java:238)
      at org.smooks.engine.delivery.DefaultContentDeliveryConfigBuilder.build(DefaultContentDeliveryConfigBuilder.java:140)
      at org.smooks.engine.delivery.DefaultContentDeliveryRuntimeFactory.create(DefaultContentDeliveryRuntimeFactory.java:86)
      at org.smooks.engine.DefaultExecutionContext.<init>(DefaultExecutionContext.java:117)
      at org.smooks.engine.DefaultExecutionContext.<init>(DefaultExecutionContext.java:94)
      at org.smooks.Smooks.createExecutionContext(Smooks.java:438)
      at org.smooks.Smooks.createExecutionContext(Smooks.java:404)
      at org.smooks.engine.resource.visitor.smooks.NestedSmooksVisitor.filterSource(NestedSmooksVisitor.java:398)
      at org.smooks.engine.resource.visitor.smooks.NestedSmooksVisitor.replaceBefore(NestedSmooksVisitor.java:325)
      at org.smooks.engine.resource.visitor.smooks.NestedSmooksVisitor.visitBefore(NestedSmooksVisitor.java:264)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor$VisitBeforeInvocation.invoke(AbstractInterceptorVisitor.java:178)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor$VisitBeforeInvocation.invoke(AbstractInterceptorVisitor.java:175)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor.intercept(AbstractInterceptorVisitor.java:122)
      at org.smooks.engine.delivery.interceptor.EventInterceptor.visitBefore(EventInterceptor.java:67)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor$VisitBeforeInvocation.invoke(AbstractInterceptorVisitor.java:178)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor$VisitBeforeInvocation.invoke(AbstractInterceptorVisitor.java:175)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor.intercept(AbstractInterceptorVisitor.java:122)
      at org.smooks.engine.delivery.interceptor.TextConsumerInterceptor.visitBefore(TextConsumerInterceptor.java:89)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor$VisitBeforeInvocation.invoke(AbstractInterceptorVisitor.java:178)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor$VisitBeforeInvocation.invoke(AbstractInterceptorVisitor.java:175)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor.intercept(AbstractInterceptorVisitor.java:122)
      at org.smooks.engine.delivery.interceptor.StreamResultWriterInterceptor.visitBefore(StreamResultWriterInterceptor.java:87)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor$VisitBeforeInvocation.invoke(AbstractInterceptorVisitor.java:178)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor$VisitBeforeInvocation.invoke(AbstractInterceptorVisitor.java:175)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor.intercept(AbstractInterceptorVisitor.java:122)
      at org.smooks.engine.delivery.interceptor.ExceptionInterceptor.intercept(ExceptionInterceptor.java:106)
      at org.smooks.engine.delivery.interceptor.ExceptionInterceptor.visitBefore(ExceptionInterceptor.java:86)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor$VisitBeforeInvocation.invoke(AbstractInterceptorVisitor.java:178)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor$VisitBeforeInvocation.invoke(AbstractInterceptorVisitor.java:175)
      at org.smooks.engine.delivery.interceptor.AbstractInterceptorVisitor.intercept(AbstractInterceptorVisitor.java:122)
      at org.smooks.engine.delivery.interceptor.StaticProxyInterceptor.visitBefore(StaticProxyInterceptor.java:120)
      at org.smooks.engine.delivery.sax.ng.SaxNgHandler.visitBefore(SaxNgHandler.java:284)
      at org.smooks.engine.delivery.sax.ng.SaxNgHandler.startElement(SaxNgHandler.java:186)
      at org.smooks.engine.delivery.SmooksContentHandler.startElement(SmooksContentHandler.java:110)
      at com.ctc.wstx.sr.BasicStreamReader.fireSaxStartElement(BasicStreamReader.java:1787)
      at com.ctc.wstx.sax.WstxSAXParser.fireStartTag(WstxSAXParser.java:806)
      at com.ctc.wstx.sax.WstxSAXParser.fireEvents(WstxSAXParser.java:691)
      at com.ctc.wstx.sax.WstxSAXParser.parse(WstxSAXParser.java:623)
      at org.smooks.engine.delivery.sax.ng.SaxNgParser.parse(SaxNgParser.java:86)
      at org.smooks.engine.delivery.sax.ng.SaxNgFilter.doFilter(SaxNgFilter.java:110)
      ... 158 more

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              reshmakumari06 Reshma
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: