web3j icon indicating copy to clipboard operation
web3j copied to clipboard

Can not generate a contract either by plugin or web3j-cli

Open Gelassen opened this issue 3 years ago • 0 comments

Issue_title

I have an issue with generating an one of my contracts either by plugin or web3j-cli.

Issue_description

If it would be done over web3j-cli, the issue is:

Generating ru.home.SwapChainAbi ... part 'struct Match' is keyword

If it would be done over gradle-plugin, stacktrace is not informative enough, just shows somewhere in the middle of build process daemon is killed:

$./gradlew generateContractWrappers
FAILURE: Build failed with an exception.

* What went wrong:
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)

* Try:
Run with --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.launcher.daemon.client.DaemonDisappearedException: Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
        at org.gradle.launcher.daemon.client.DaemonClient.handleDaemonDisappearance(DaemonClient.java:242)
        at org.gradle.launcher.daemon.client.DaemonClient.monitorBuild(DaemonClient.java:218)
        at org.gradle.launcher.daemon.client.DaemonClient.executeBuild(DaemonClient.java:180)
        at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:143)
        at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:94)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:56)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:212)
        at org.gradle.launcher.cli.DefaultCommandLineActionFactory$ParseAndBuildAction.execute(DefaultCommandLineActionFactory.java:404)
        at org.gradle.launcher.cli.DefaultCommandLineActionFactory$ParseAndBuildAction.execute(DefaultCommandLineActionFactory.java:376)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:38)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23)
        at org.gradle.launcher.cli.DefaultCommandLineActionFactory$WithLogging.execute(DefaultCommandLineActionFactory.java:369)
        at org.gradle.launcher.Main.doAction(Main.java:35)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:31)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:31)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)

It is linked with this issue which had been closed without solution (the last comment is not correct): https://github.com/web3j/web3j/issues/1789

The SwapValue.sol is successfully built with a wrapper, for SwapChain.sol a wrapper is not built.

Issue_context

Here are the gist with abi and bin for SwapChain.sol Here is the code of the project where you can take contracts to recreate the issue.

Possible link with this issue.

Gelassen avatar Dec 07 '22 09:12 Gelassen