I can confirm that at least sbt clean does not resolve the issue.  Didn't try a 
got clean, although I had just cloned the repo in question so I don't think it 
had gotten dirty in anyway either.

Josh

On Mar 18, 2022 1:22 PM, Steve Lawrence <slawre...@apache.org> wrote:
That's surprising to me. All that exportJars is supposed to to do is
include or not include certains files on the class path and use packages
jars instead.

And that assertion that is failing is beacuase the length of test data
is negative, which should never happen and I don't know how exportJars
would affect that.

It almost sounds like something got corrupted or needed to be rebuilt,
and changing exportJars allowed that to happen? Maybe there's some
conflict between using IntelliJ and sbt at the same time?

I wonder if doing an sbt clean or git clean would resolve the issue.


On 3/18/22 1:10 PM, Olabusayo Kilo wrote:
> We noticed that only when running "sbt test" in schema projects with the
> exportJar setting, the error below was generated resulting in failure of
> all the tests. Note that running the same tests via IntelliJ/Junit
> didn't reproduce this error, and the error was isolated to using sbt to
> run the tests.
>
> The cause was isolated to having the "exportJars := true" setting in
> build.sbt. Removing the setting removed the error, and got all tests
> passing. Sending this out as an FYI in case someone else runs into this
> in the future.
>
> [info] Test a.b.c started
> [error] Test a.b.c failed: org.apache.daffodil.exceptions.Abort: Usage
> error: lengthLimitInBits.>=(0)
> [error] org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:137)
> [error]
> org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.doParseWithBothApis(DaffodilTDMLDFDLProcessor.scala:290)
>
> [error]
> org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.parse(DaffodilTDMLDFDLProcessor.scala:248)
>
> [error]
> org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.parse(DaffodilTDMLDFDLProcessor.scala:253),
> took 0.003 sec
> [error]     at
> org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:137)
> [error]     at
> org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.doParseWithBothApis(DaffodilTDMLDFDLProcessor.scala:290)
>
> [error]     at
> org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.parse(DaffodilTDMLDFDLProcessor.scala:248)
>
> [error]     at
> org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.parse(DaffodilTDMLDFDLProcessor.scala:253)
>
> [error]     at
> org.apache.daffodil.tdml.ParserTestCase.doParseExpectSuccess(TDMLRunner.scala:1026)
>
> [error]     at
> org.apache.daffodil.tdml.ParserTestCase.runParseExpectSuccess(TDMLRunner.scala:1169)
>
> [error]     at
> org.apache.daffodil.tdml.ParserTestCase.$anonfun$runProcessor$2(TDMLRunner.scala:920)
>
> [error]     at
> org.apache.daffodil.tdml.ParserTestCase.$anonfun$runProcessor$2$adapted(TDMLRunner.scala:917)
>
> [error]     at scala.util.Either$RightProjection.foreach(Either.scala:652)
> [error]     at
> org.apache.daffodil.tdml.ParserTestCase.runProcessor(TDMLRunner.scala:917)
> [error]     at org.apache.daffodil.tdml.TestCase.run(TDMLRunner.scala:870)
> [error]     at
> org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:416)
> [error]     at
> org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:191)
> [error]     at
> org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:197)
>

Reply via email to