question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

com.oracle.svm.core.util.UserError$UserException: Error parsing resource configuration in resourceconfig-arm64-ios.json

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jperedadnrcommented, Sep 1, 2020

Maybe it is related to this change: https://github.com/gluonhq/substrate/pull/739, I will investigate.

1reaction
jperedadnrcommented, Aug 28, 2020

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(",").

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found