xdagj icon indicating copy to clipboard operation
xdagj copied to clipboard

BUG : Exception in thread "main" cn.hutool.core.io.resource.NoResourceException: Resource of path [xdag-testnet.config] not exist!

Open lonperez opened this issue 3 years ago • 4 comments

Exception in thread "main" cn.hutool.core.io.resource.NoResourceException: Resource of path [xdag-testnet.config] not exist!

when I compile xdagj and use nohup java -jar --enable-preview xdagj-0.4.0-shaded.jar > xdagj.log 2>&1 & run the test net or main net ,It crashes.

Exception in thread "main" cn.hutool.core.io.resource.NoResourceException: Resource of path [xdag-testnet.config] not exist! at cn.hutool.core.io.resource.ClassPathResource.initUrl(ClassPathResource.java:122) at cn.hutool.core.io.resource.ClassPathResource.(ClassPathResource.java:74) at cn.hutool.core.io.resource.ClassPathResource.(ClassPathResource.java:34) at cn.hutool.core.io.resource.ResourceUtil.getResourceObj(ResourceUtil.java:199) at cn.hutool.setting.Setting.(Setting.java:128) at cn.hutool.setting.Setting.(Setting.java:116) at cn.hutool.setting.Setting.(Setting.java:106) at io.xdag.config.AbstractConfig.getSetting(AbstractConfig.java:207) at io.xdag.config.AbstractConfig.(AbstractConfig.java:153) at io.xdag.config.TestnetConfig.(TestnetConfig.java:32) at io.xdag.Launcher.buildConfig(Launcher.java:102) at io.xdag.cli.XdagCli.start(XdagCli.java:126) at io.xdag.cli.XdagCli.main(XdagCli.java:59) at io.xdag.cli.XdagCli.main(XdagCli.java:66) at io.xdag.Bootstrap.main(Bootstrap.java:36)

How can i fix this problem? I follow this tutorial step by step: https://github.com/XDagger/xdagj/blob/master/docs/XDAGJ_Private_Chain_Tutorial_eng.md Can anyone help me ?

lonperez avatar Jul 25 '21 13:07 lonperez

Please check if there is xdag-testnet.config in your resource file directory. Can you provide us with the code version and system version you are running, so that we can better troubleshoot the problem

MyronX avatar Jul 25 '21 13:07 MyronX

yes, xdag-testnet.config in the resource file directory. I used master branch.

lonperez avatar Jul 26 '21 08:07 lonperez

yes, xdag-testnet.config in the resource file directory. I used master branch.

You can try to copy xdag-testnet.config to the compiled jar package path. If you are using a linux or macos system, you also need to copy xdag.sh in the script folder to the same path. Try to execute xdag.sh -t to start the program. If there are any other errors, please contact us.

MyronX avatar Aug 09 '21 04:08 MyronX

yes, xdag-testnet.config in the resource file directory. I used master branch.

You can try to copy xdag-testnet.config to the compiled jar package path. If you are using a linux or macos system, you also need to copy xdag.sh in the script folder to the same path. Try to execute xdag.sh -t to start the program. If there are any other errors, please contact us.

and you also need to add your java path to the xdag.sh file

MyronX avatar Aug 09 '21 15:08 MyronX

fix on 0.5.0

LucasMLK avatar Sep 01 '22 16:09 LucasMLK