Version missing error when running web3j truffle
Exception in thread "main" java.lang.IllegalArgumentException: Input string is NULL or empty
when running the command
web3j truffle generate [--javaTypes|--solidityTypes] /path/to/<truffle-smart-contract-output>.json -o /path/to/src/main/java -p com.your.organisation.name with corresponding arguments, I get:
Exception in thread "main" java.lang.IllegalArgumentException: Input string is NULL or empty
at com.github.zafarkhaja.semver.VersionParser.<init>(VersionParser.java:162)
at com.github.zafarkhaja.semver.VersionParser.parseValidSemVer(VersionParser.java:194)
at com.github.zafarkhaja.semver.Version.valueOf(Version.java:265)
at org.web3j.console.services.Updater.promptIfUpdateAvailable(Updater.java:35)
at org.web3j.console.Web3jCommand.parse(Web3jCommand.java:108)
at org.web3j.console.Web3j.main(Web3j.java:18)
Steps To Reproduce
truffle init
put contract in contracts folder
truffle compile
web3j truffle generate [--javaTypes|--solidityTypes] /path/to/<truffle-smart-contract-output>.json -o /path/to/src/main/java -p com.your.organisation.name
Expected behavior
no error produced, java files generated
Actual behavior
error produced, no java files created
I am running into this issue when I attempt to run any web3j command whatsoever.
wrong place to report, https://github.com/web3j/web3j-cli
also, try rm ~/.web3j then curl -L get.web3j.io | sh && source ~/.web3j/source.sh and run again, this helped me.