com.oracle.svm.core.util.UserError$UserException: Error parsing resource configuration in resourceconfig-arm64-ios.json
See original GitHub issueI follow this doc: https://docs.gluonhq.com/client/#_resources
I run tracing agent to collect the resources being used in HotSpot, after that I copy the file from resource-config.json to src/main/resources/META-INF/substrate/config/resourceconfig.json
The content is as below:
{
"resources":[
{"pattern":"\\QProcessorMetadata.txt\\E"},
{"pattern":"\\Qres/pdf/rs/[AAA] BBB CCC DDD (EEE) V1.4 2019 09 05.pdf\\E"}
],
"bundles":[
{"name":"com.sun.javafx.tk.quantum.QuantumMessagesBundle"},
{"name":"errors/errors"}
]
}
When I compile, I got error as below:
[Fri Aug 28 16:07:16 SGT 2020][INFO] [SUB] Error: Error parsing resource configuration in /Users/incomemac/Desktop/income-workplace/HelloFX webview/target/client/arm64-ios/gvm/resourceconfig-arm64-ios.json:
[Fri Aug 28 16:07:16 SGT 2020][INFO] [SUB] line 20 column 47 Trailing comma is not allowed in JSON
[Fri Aug 28 16:07:16 SGT 2020][INFO] [SUB] Verify that the configuration matches the schema described in the -H:PrintFlags=+ output for option ResourceConfigurationFiles.
[Fri Aug 28 16:07:16 SGT 2020][INFO] [SUB] com.oracle.svm.core.util.UserError$UserException: Error parsing resource configuration in /Users/incomemac/Desktop/income-workplace/HelloFX webview/target/client/arm64-ios/gvm/resourceconfig-arm64-ios.json:
[Fri Aug 28 16:07:16 SGT 2020][INFO] [SUB] line 20 column 47 Trailing comma is not allowed in JSON
[Fri Aug 28 16:07:16 SGT 2020][INFO] [SUB] Verify that the configuration matches the schema described in the -H:PrintFlags=+ output for option ResourceConfigurationFiles.
[Fri Aug 28 16:07:16 SGT 2020][INFO] [SUB] at com.oracle.svm.core.util.UserError.abort(UserError.java:68)
[Fri Aug 28 16:07:16 SGT 2020][INFO] [SUB] at com.oracle.svm.hosted.config.ConfigurationParserUtils.doParseAndRegister(ConfigurationParserUtils.java:138)
I checked the content of this file HelloFX webview/target/client/arm64-ios/gvm/resourceconfig-arm64-ios.json
{
"resources": [
{"pattern": ".*\\.png$"},
{"pattern": ".*\\.jpg$"},
{"pattern": ".*\\.jpeg$"},
{"pattern": ".*\\.gif$"},
{"pattern": ".*\\.bmp$"},
{"pattern": ".*\\.ttf$"},
{"pattern": ".*\\.raw$"},
{"pattern": ".*\\.xml$"},
{"pattern": ".*\\.fxml$"},
{"pattern": ".*\\.css$"},
{"pattern": ".*\\.gls$"},
{"pattern": ".*\\.json$"},
{"pattern": ".*\\.dat$"},
{"pattern": ".*\\.license$"},
{"pattern": ".*\\.frag$"},
{"pattern": ".*\\.vert$"},
{"pattern": ".*\\.obj$"},
{"pattern":"\\QProcessorMetadata.txt\\E"}, ,
{"pattern":"\\Qres/pdf/rs/[AAA] BBB CCC DDD (EEE) V1.4 2019 09 05.pdf\\E"}
]
}
There is extra comma after this {"pattern":"\\QProcessorMetadata.txt\\E"}. I guess there is something wrong when merging the content, especially there is a resource file as named in this one [AAA] BBB CCC DDD (EEE) V1.4 2019 09 05.pdf.
The content is generated by tracing agent, there is no manual modification on that, and the json generated by tracing agent is valid, could be something wrong in the maven plugin while merging the resource content?
I am using version <client.plugin.version>0.1.31</client.plugin.version>.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)

Top Related StackOverflow Question
Maybe it is related to this change: https://github.com/gluonhq/substrate/pull/739, I will investigate.
Right, I’ve filed an issue to document that missing part. And you are also right about the trim, it is used for the filter, but not for the returned line. Trimming it will remove the leading indentation, so we probably just need to trim it when checking
r.endsWith(",").