benchbase icon indicating copy to clipboard operation
benchbase copied to clipboard

Can't run "./mvnw clean package -P postgres" during quickstart

Open adkol opened this issue 1 year ago • 7 comments

Running the command "./mvnw clean package -P postgres" results in the following error:

Screenshot 2024-01-19 at 2 39 33 PM

What is causing this issue and how should I go about resolving it?

adkol avatar Jan 19 '24 20:01 adkol

When I was using JDK 11, I encountered the same error as you. However, the issue was resolved when I upgraded to JDK 21.So, you can try upgrading to JDK 21 to resolve this issue. Why use JDK 21? This is because there is a corresponding configuration in the pom.xml file, as follows:

<java.version>21</java.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>

If upgrading to JDK 21 still doesn't resolve the issue, you can try removing the spotify 'format' goal from the pom.xml file. I'm not sure if removing it will have any side effects.

<plugin>
    <!-- format/check code via google style format -->
    <groupId>com.spotify.fmt</groupId>
    <artifactId>fmt-maven-plugin</artifactId>
    <version>2.21.1</version>
    <executions>
        <execution>
            <goals>
                <goal>check</goal>
                <!-- <goal>format</goal> -->
            </goals>
        </execution>
    </executions>
</plugin>

ks-zhk avatar Jan 23 '24 02:01 ks-zhk

Thank you, that fixed that issue! I am still running into the following issue preventing me from building successfully and am not sure how to fix it. I have increased the heap size in my JVM and also tried setting forkCount to 0 for all of the plugins in pom.xml, but I'm still getting the same error. Any help is appreciated! Screenshot 2024-02-05 at 9 20 44 PM

adkol avatar Feb 06 '24 02:02 adkol

I think we'll need some more information. Are you trying to run this with java 11? I don't think that's supported anymore. Have you tried to reproduce this in the devcontainer? You should at least get a consistent java 21 environment by doing that.

bpkroth avatar Feb 09 '24 19:02 bpkroth

Also, might be related to #457

bpkroth avatar Feb 09 '24 19:02 bpkroth

Tried benchbase for the first time today. And also hit this error.

I am not a fan of Maven after spending a few years maintaining the Linkbench repo. So take this with a grain of salt, but why would you reformat code at compile time (see here)? This is just one more thing that makes me shake my head WRT to how things are done in the land of Java+Maven+Log4j .

The reason that I ask is that people like me who try out benchbase get a lousy experience because the error from the failed formatting hides the root cause which is that we are using a too-old version of the JDK. In my case I am using the default openjdk for Ubuntu 22.04 which unfortunately only supports version 11. I then installed a more recent openjdk version (sudo apt install openjdk-21-jdk) and the build finishes without error.

mdcallag avatar Sep 13 '24 19:09 mdcallag

I had trouble finding this bug report because the text for which I was searching was in a screen shot. Please, do the OSS world a favor and copy/paste error text so that others will find it.

mdcallag avatar Sep 13 '24 23:09 mdcallag

Tried benchbase for the first time today. And also hit this error.

I am not a fan of Maven after spending a few years maintaining the Linkbench repo. So take this with a grain of salt, but why would you reformat code at compile time (see here)? This is just one more thing that makes me shake my head WRT to how things are done in the land of Java+Maven+Log4j .

The reason that I ask is that people like me who try out benchbase get a lousy experience because the error from the failed formatting hides the root cause which is that we are using a too-old version of the JDK. In my case I am using the default openjdk for Ubuntu 22.04 which unfortunately only supports version 11. I then installed a more recent openjdk version (sudo apt install openjdk-21-jdk) and the build finishes without error.

Don't necessarily disagree with any of this. For my own part, I'm donating some time to help keep the lights on and add a few small features here and there, but not doing major structural changes like that.

What I did do though was create a docker image to publish a "works out of the box" image you can reference to manage some of those issues.

Unfortunately, you get other ones like needing to know a thing or two about how volume mapping works in a container environment in order to get your results in/out of the system.

The instructions probably need some improvements, but the short version is the last example here: https://github.com/cmu-db/benchbase/?tab=readme-ov-file#how-use-with-docker

https://github.com/cmu-db/benchbase/tree/main/docker/benchbase

bpkroth avatar Sep 16 '24 17:09 bpkroth

For future reference, it seems like this repo is getting updated and now runs on openjdk-23. I had some issues installing openjdk-23 on Ubuntu, sudo apt install didn't work. Instead what I did is clone the repo with tag V2023, which I think still runs on JDK-21. Then run as usual and it runs fine. If you also have an issue with not building, most likely a jdk problem.

Image
git clone https://github.com/cmu-db/benchbase.git ../benchbase
cd ../benchbase
git checkout b4b36683afdf79dd8bf70b95199b874c68218975

JamshedK avatar Mar 30 '25 21:03 JamshedK