You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Dave Thompson (Jira)" <ji...@apache.org> on 2021/01/13 23:16:00 UTC

[jira] [Commented] (DAFFODIL-1026) Invalid configuration file causes exception

    [ https://issues.apache.org/jira/browse/DAFFODIL-1026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17264481#comment-17264481 ] 

Dave Thompson commented on DAFFODIL-1026:
-----------------------------------------

Executing the following parse command resulted in the error below.

*Command:*

/home/dthompson/incubator-daffodil/daffodil-cli/target/universal/stage/bin/daffodil parse -I xml -P /home/dthompson/dfdl-testharness/saved_parsers/0.0.0/jpeg.parser.bin -o /home/dthompson/parsed/Norway.jpg2.xml -c /home/dthompson/dfdlTestData/data-formats/jpeg/parse_data/Norway.jpg

*Error:*

org.xml.sax.SAXParseException; systemId: file:/home/dthompson/dfdlTestData/data-formats/jpeg/parse_data/Norway.jpg; lineNumber: 1; columnNumber: 1; Invalid byte 1 of 1-byte UTF-8 sequence.
 at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
 at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
 at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
 at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
 at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
 at org.apache.daffodil.xml.DFDLXercesAdapter.loadXML(DaffodilXMLLoader.scala:400)
 at scala.xml.factory.XMLLoader.load(XMLLoader.scala:56)
 at scala.xml.factory.XMLLoader.load$(XMLLoader.scala:56)
 at scala.xml.parsing.FactoryAdapter.load(FactoryAdapter.scala:39)
 at org.apache.daffodil.xml.DaffodilXMLLoader.load(DaffodilXMLLoader.scala:562)
 at org.apache.daffodil.configuration.ConfigurationLoader$.getConfiguration(ConfigurationLoader.scala:43)
 at org.apache.daffodil.configuration.ConfigurationLoader$.getConfiguration(ConfigurationLoader.scala:50)
 at org.apache.daffodil.Main$.loadConfigurationFile(Main.scala:593)
 at org.apache.daffodil.Main$.run(Main.scala:889)
 at org.apache.daffodil.Main$.main(Main.scala:1531)
 at org.apache.daffodil.Main.main(Main.scala)
Caused by: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
 at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)
 at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
 at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
 at org.apache.xerces.impl.XMLEntityScanner.skipString(Unknown Source)
 ... 17 more

> Invalid configuration file causes exception
> -------------------------------------------
>
>                 Key: DAFFODIL-1026
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1026
>             Project: Daffodil
>          Issue Type: Bug
>          Components: CLI, General
>            Reporter: Steve Lawrence
>            Priority: Major
>              Labels: beginner, reverify
>
> An exception was found when accidentally using the -c option for the input data. For example:
> {code}
> daffodil parse -s ../examples/pcap/pcap.dfdl.xsd -c ../examples/pcap/dns.cap
> {code}
> Results in the following exception:
> {code}
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> !!   An unexpected exception occurred. This is a bug!   !!
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>  Please report this bug and help us fix it:
>   https://opensource.ncsa.illinois.edu/confluence/display/DFDL/How+to+Report+a+B
> ug
>  Please include the following exception, the command you
>  ran, and any input, schema, or tdml files used that led
>  to this bug.
> java.nio.charset.MalformedInputException: Input length = 1
>         at java.nio.charset.CoderResult.throwException(CoderResult.java:288)
>         at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:377)
>         at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:210)
>         at java.io.InputStreamReader.read(InputStreamReader.java:205)
>         at java.io.BufferedReader.fill(BufferedReader.java:165)
>         at java.io.BufferedReader.read(BufferedReader.java:186)
>         at scala.io.BufferedSource$$anonfun$iter$1$$anonfun$apply$mcI$sp$1.apply
> $mcI$sp(BufferedSource.scala:38)
>         at scala.io.Codec.wrap(Codec.scala:68)
>         at scala.io.BufferedSource$$anonfun$iter$1.apply(BufferedSource.scala:38
> )
>         at scala.io.BufferedSource$$anonfun$iter$1.apply(BufferedSource.scala:38
> )
>         at scala.collection.Iterator$$anon$9.next(Iterator.scala:162)
>         at scala.collection.Iterator$$anon$17.hasNext(Iterator.scala:511)
>         at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327)
>         at scala.io.Source.hasNext(Source.scala:226)
>         at scala.xml.parsing.MarkupParser$class.ch(MarkupParser.scala:104)
>         at scala.xml.parsing.ConstructingParser.ch(ConstructingParser.scala:47)
>         at scala.xml.parsing.MarkupParser$class.document(MarkupParser.scala:221)
>         at scala.xml.parsing.ConstructingParser.document(ConstructingParser.scal
> a:47)
>         at edu.illinois.ncsa.daffodil.configuration.ConfigurationLoader$.getConf
> iguration(ConfigurationLoader.scala:61)
>         at edu.illinois.ncsa.daffodil.configuration.ConfigurationLoader$.getConf
> iguration(ConfigurationLoader.scala:68)
>         at edu.illinois.ncsa.daffodil.Main$.loadConfigurationFile(Main.scala:498
> )
>         at edu.illinois.ncsa.daffodil.Main$.run(Main.scala:642)
>         at edu.illinois.ncsa.daffodil.Main$.main(Main.scala:1075)
>         at edu.illinois.ncsa.daffodil.Main.main(Main.scala)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)