Skip to content

Commit

Permalink
Set pricenode mainClassName explicitly
Browse files Browse the repository at this point in the history
Problem: after the upgrade from 6.6.1 to 7.3, the usual invocation of,
e.g. `./bisq-pricenode 2 2` started failing as reported by @Emzy at [1].

    bisq@ubuntu-4gb-fsn1-1:~$ /bisq/bisq/bisq-pricenode 2
    Error: Could not find or load main class 2
    Caused by: java.lang.ClassNotFoundException: 2

Solution: for unknown reasons, the bisq-pricenode script worked as
expected under 6.6.1, i.e. contained the fq main class name in its
scripted invocation of `java -jar ...`, but under 7.3, this main class
name was missing. Through trial and error, it turns out that setting
`mainClassName` explicitly in the :pricenode subproject configuration
solves this problem and makes the start script work as expected.
Presumably, this problem arose in conjunction with the major version
upgrade of the spring boot Gradle plugin that was necessary when
upgrading to Gradle 7.3, but this has not been verified.

[1]: #5824 (comment)
  • Loading branch information
cbeams committed Nov 15, 2021
1 parent 0ea056c commit cb7b0e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,8 @@ configure(project(':monitor')) {
configure(project(':pricenode')) {
apply plugin: "org.springframework.boot"

mainClassName = 'bisq.price.Main'

version = file("src/main/resources/version.txt").text.trim()

jar.manifest.attributes(
Expand Down

0 comments on commit cb7b0e8

Please sign in to comment.