JeremyYao commented on issue #975: URL: https://github.com/apache/daffodil-vscode/issues/975#issuecomment-2698634574
### How to Replicate Ticket 1. Download the SampleWorkspace folder and use it. (May have to modify paths for bad.dfdl.xsd and test.txt in launch.json) [sampleWorkspace.zip](https://github.com/user-attachments/files/19076231/sampleWorkspace.zip) 2. Run and debug (press `F5`)  3. Take note of the uncolored schema errors  Full PowerShell output ```PowerShell C:\Users\jeremy.yao\repos\sampleWorkspace>c:\Users\jeremy.yao\repos\daffodil-vscode-ctc\daffodil-debugger-3.8.0-1.4.1-SNAPSHOT\bin\daffodil-debugger.bat --listenPort 4666 -J"--add-opens=java.base/java.lang=ALL-UNNAMED" 13:55:08,747 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 13:55:08,747 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/C:/Users/jeremy.yao/repos/daffodil-vscode-ctc/daffodil-debugger-3.8.0-1.4.1-SNAPSHOT/lib/org.apache.daffodil.daffodil-debugger-1.4.1-SNAPSHOT.jar!/logback.xml] 13:55:08,753 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@563e4951 - URL [jar:file:/C:/Users/jeremy.yao/repos/daffodil-vscode-ctc/daffodil-debugger-3.8.0-1.4.1-SNAPSHOT/lib/org.apache.daffodil.daffodil-debugger-1.4.1-SNAPSHOT.jar!/logback.xml] is not of type file 13:55:08,890 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 13:55:08,891 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 13:55:08,906 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT] 13:55:08,922 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 13:55:09,036 |-INFO in ch.qos.logback.core.ConsoleAppender[STDOUT] - Enabling JANSI WindowsAnsiOutputStream for the console. 13:55:09,037 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - Failed to create WindowsAnsiOutputStream. Falling back on the default stream. ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream at ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type org.fusesource.jansi.WindowsAnsiOutputStream at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:68) at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:39) at at ch.qos.logback.core.ConsoleAppender.getTargetStreamForWindows(ConsoleAppender.java:88) at at ch.qos.logback.core.ConsoleAppender.start(ConsoleAppender.java:79) at at ch.qos.logback.core.joran.action.AppenderAction.end(AppenderAction.java:90) at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:309) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:193) at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:179) at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53) at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:64) at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:134) at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84) at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150) at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124) at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362) at at org.typelevel.log4cats.slf4j.Slf4jLogger$.getLoggerFromName(Slf4jLogger.scala:30) at at org.typelevel.log4cats.slf4j.Slf4jLogger$.getLogger(Slf4jLogger.scala:27) at at org.apache.daffodil.debugger.dap.DAPodil$.<init>(DAPodil.scala:439) at at org.apache.daffodil.debugger.dap.DAPodil$.<clinit>(DAPodil.scala) at at org.apache.daffodil.debugger.dap.DAPodil.main(DAPodil.scala) Caused by: java.lang.ClassNotFoundException: org.fusesource.jansi.WindowsAnsiOutputStream at at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) at at ch.qos.logback.core.util.OptionHelper.instantiateByClassNameAndParameter(OptionHelper.java:55) at ... 25 common frames omitted 13:55:09,037 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.FileAppender] 13:55:09,041 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE] 13:55:09,041 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 13:55:09,041 |-INFO in ch.qos.logback.core.FileAppender[FILE] - File property is set to [c:\Users\jeremy.yao\repos\sampleWorkspace/daffodil-debugger.log] 13:55:09,041 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO 13:55:09,041 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT] 13:55:09,050 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT] 13:55:09,050 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 13:55:09,051 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@6cdba6dc - Registering current configuration as safe fallback point 2025-03-04 13:55:10,118 [io-compute-4] INFO o.a.d.d.d.DAPodil - ****************************************************** A DAP server for debugging Daffodil schema processors. Build info: version: 1.4.1-SNAPSHOT daffodilVersion: 3.8.0 scalaVersion: 2.12.15 sbtVersion: 1.10.6 Runtime info: JVM version: 17.0.12 (C:\Program Files\Java\jdk-17) ****************************************************** 2025-03-04 13:55:10,118 [io-compute-4] INFO o.a.d.d.d.DAPodil - launched with options listenPort: 4666, listenTimeout: 10 seconds 2025-03-04 13:55:10,169 [io-compute-4] INFO o.a.d.d.d.DAPodil - waiting at tcp://localhost:4666 2025-03-04 13:55:11,714 [io-compute-blocker-4] INFO o.a.d.d.d.DAPodil - connected at tcp://localhost:4666 2025-03-04 13:55:12,066 [io-compute-9] INFO o.a.d.d.d.DAPSession - R> #1 initialize {"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"dfdl","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true,"supportsANSIStyling":true} 2025-03-04 13:55:12,134 [io-compute-2] INFO o.a.d.d.d.DAPSession - <R #1 initialize success {"supportsConfigurationDoneRequest":true,"supportsHitConditionalBreakpoints":false,"supportsConditionalBreakpoints":false,"supportsEvaluateForHovers":false,"supportsCompletionsRequest":false,"supportsRestartFrame":false,"supportsSetVariable":false,"supportsRestartRequest":false,"supportTerminateDebuggee":false,"supportsDelayedStackTraceLoading":false,"supportsLogPoints":false,"supportsExceptionInfoRequest":false,"supportsDataBreakpoints":false,"supportsClipboardContext":false,"supportsLoadedSourcesRequest":false} 2025-03-04 13:55:12,139 [io-compute-blocker-2] INFO o.a.d.d.d.DAPSession - <E initialized 2025-03-04 13:55:12,139 [io-compute-2] INFO o.a.d.d.d.DAPSession - R> #2 launch {"request":"launch","type":"dfdl","name":"974Test_1","schema":{"path":"c:\\Users\\jeremy.yao\\repos\\sampleWorkspace\\bad.dfdl.xsd","rootName":null,"rootNamespace":null},"data":"c:\\Users\\jeremy.yao\\repos\\sampleWorkspace\\test.txt","debugServer":4666,"infosetFormat":"xml","infosetOutput":{"type":"file","path":"C:\\Users\\jeremy.yao\\repos\\sampleWorkspace/target/infoset.xml"},"tdmlConfig":{"action":"generate","name":"Default Test Case","description":"Generated by DFDL VSCode Extension","path":"C:\\Users\\jeremy.yao\\AppData\\Local\\Temp\\generatedTDML.tdml"},"trace":true,"stopOnEntry":true,"useExistingServer":false,"openDataEditor":true,"openInfosetView":true,"openInfosetDiffView":true,"daffodilDebugClasspath":[],"dataEditor":{"port":6669,"logging":{"file":"C:\\Users\\jeremy.yao\\repos\\sampleWorkspace/dataEditor-${omegaEditPort}.log","level":"info"}},"dfdlDebugger":{"logging":{"file":"C:\\Users\\j eremy.yao\\repos\\sampleWorkspace/daffodil-debugger.log","level":"INFO"}},"__configurationTarget":6,"__sessionId":"0c513575-191e-4f2f-801c-f9d224d287ac"} 2025-03-04 13:55:12,151 [io-compute-8] INFO o.a.d.d.d.DAPSession - R> #3 configurationDone null 2025-03-04 13:55:13,905 [io-compute-4] ERROR o.a.d.d.d.DAPSession - couldn't launch, request #2 launch {"request":"launch","type":"dfdl","name":"974Test_1","schema":{"path":"c:\\Users\\jeremy.yao\\repos\\sampleWorkspace\\bad.dfdl.xsd","rootName":null,"rootNamespace":null},"data":"c:\\Users\\jeremy.yao\\repos\\sampleWorkspace\\test.txt","debugServer":4666,"infosetFormat":"xml","infosetOutput":{"type":"file","path":"C:\\Users\\jeremy.yao\\repos\\sampleWorkspace/target/infoset.xml"},"tdmlConfig":{"action":"generate","name":"Default Test Case","description":"Generated by DFDL VSCode Extension","path":"C:\\Users\\jeremy.yao\\AppData\\Local\\Temp\\generatedTDML.tdml"},"trace":true,"stopOnEntry":true,"useExistingServer":false,"openDataEditor":true,"openInfosetView":true,"openInfosetDiffView":true,"daffodilDebugClasspath":[],"dataEditor":{"port":6669,"logging":{"file":"C:\\Users\\jeremy.yao\\repos\\sampleWorkspace/dataEditor-${omegaEditPort}.log","level":"info"}},"dfdlDebugger":{"logging" :{"file":"C:\\Users\\jeremy.yao\\repos\\sampleWorkspace/daffodil-debugger.log","level":"INFO"}},"__configurationTarget":6,"__sessionId":"0c513575-191e-4f2f-801c-f9d224d287ac"} org.apache.daffodil.debugger.dap.Compiler$CompilationFailed: Schema Definition Error: Error loading schema due to cvc-datatype-valid.1.2.3: '-1' is not a valid value of union type 'DFDLNonNegativeInteger_Or_DFDLExpression'. Schema context: Location line 16 column 94 in c:\Users\jeremy.yao\repos\sampleWorkspace\bad.dfdl.xsd, Schema Definition Error: Error loading schema due to cvc-attribute.3: The value '-1' of attribute 'dfdl:length' on element 'xs:element' is not valid with respect to its type, 'DFDLNonNegativeInteger_Or_DFDLExpression'. Schema context: Location line 16 column 94 in c:\Users\jeremy.yao\repos\sampleWorkspace\bad.dfdl.xsd, Schema Definition Error: Error loading schema due to cvc-datatype-valid.1.2.3: '-1' is not a valid value of union type 'DFDLNonNegativeInteger_Or_DFDLExpression'. Schema context: Location line 16 column 94 in c:\Users\jeremy.yao\repos\sampleWorkspace\bad.dfdl.xsd, Schema Definition Error: Error loading schema due to cvc-attribute.3: The value '-1' of attribute 'dfdl:length' on element 'xs:element' is not valid with respect to its type, 'DFDLNonNegativeInteger_Or_DFDLExpression'. Schema context: Location line 16 column 94 in c:\Users\jeremy.yao\repos\sampleWorkspace\bad.dfdl.xsd, Schema Definition Error: Error loading schema due to cvc-datatype-valid.1.2.3: '-1' is not a valid value of union type 'DFDLNonNegativeInteger_Or_DFDLExpression'. Schema context: Location line 16 column 94 in c:\Users\jeremy.yao\repos\sampleWorkspace\bad.dfdl.xsd, Schema Definition Error: Error loading schema due to cvc-attribute.3: The value '-1' of attribute 'dfdl:length' on element 'xs:element' is not valid with respect to its type, 'DFDLNonNegativeInteger_Or_DFDLExpression'. Schema context: Location line 16 column 94 in c:\Users\jeremy.yao\repos\sampleWorkspace\bad.dfdl.xsd at org.apache.daffodil.debugger.dap.Compiler$$anon$1.$anonfun$compile$2(Compiler.scala:52) at cats.MonadError.$anonfun$ensureOr$1(MonadError.scala:41) at org.apache.daffodil.debugger.dap.Compiler$$anon$1.$anonfun$compile$2(Compiler.scala:52) at org.apache.daffodil.debugger.dap.Compiler$$anon$1.$anonfun$compile$2(Compiler.scala:52) at cats.MonadError.$anonfun$ensureOr$1(MonadError.scala:41) at println @ com.monovore.decline.effect.CommandIOApp$.addVersionFlag(CommandIOApp.scala:67) at ensureOr$extension @ org.apache.daffodil.debugger.dap.Compiler$$anon$1.compile(Compiler.scala:52) at map @ org.apache.daffodil.debugger.dap.Compiler$$anon$1.compile(Compiler.scala:53) at map @ org.apache.daffodil.debugger.dap.Parse$.apply(Parse.scala:87) at flatMap @ org.apache.daffodil.debugger.dap.Parse$.apply(Parse.scala:85) at println @ com.monovore.decline.effect.CommandIOApp$.addVersionFlag(CommandIOApp.scala:67) at map @ org.apache.daffodil.debugger.dap.Parse$Debugee$LaunchArgs$Manual.data(Parse.scala:219) at flatMap @ org.apache.daffodil.debugger.dap.Parse$.$anonfun$debugee$11(Parse.scala:753) at ifM$extension @ org.typelevel.log4cats.slf4j.internal.Slf4jLoggerInternal$Slf4jLogger.info(Slf4jLoggerInternal.scala:99) 2025-03-04 13:55:13,905 [io-compute-4] INFO o.a.d.d.d.DAPSession - <E daffodil.error.request 2025-03-04 13:55:13,915 [io-compute-blocker-12] INFO o.a.d.d.d.DAPSession - <E terminated 2025-03-04 13:55:13,917 [io-compute-blocker-12] INFO o.a.d.d.d.DAPSession - <R #3 configurationDone success null 2025-03-04 13:55:13,940 [io-compute-0] INFO o.a.d.d.d.DAPSession - R> #4 disconnect {"restart":false} 2025-03-04 13:55:13,943 [io-compute-11] INFO o.a.d.d.d.DAPSession - R> #5 threads null 2025-03-04 13:55:13,947 [io-compute-7] INFO o.a.d.d.d.DAPSession - <R #4 disconnect success null 2025-03-04 13:55:14,537 [io-compute-11] INFO o.a.d.d.d.DAPodil - disconnected at tcp://localhost:4666 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
