Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
adkol opened this issue Jan 19, 2024 · 7 comments
Open

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

adkol opened this issue Jan 19, 2024 · 7 comments

Comments

@adkol
Copy link

adkol commented Jan 19, 2024

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?

@ks-zhk
Copy link

ks-zhk commented Jan 23, 2024

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>

@adkol
Copy link
Author

adkol commented Feb 6, 2024

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

@bpkroth
Copy link
Collaborator

bpkroth commented Feb 9, 2024

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
Copy link
Collaborator

bpkroth commented Feb 9, 2024

Also, might be related to #457

@mdcallag
Copy link

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
Copy link

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.

@bpkroth
Copy link
Collaborator

bpkroth commented Sep 16, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants