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

Cannot start 'Java' local dynamodb with versions greater than 8.0.0 #119

Open
mxro opened this issue Oct 25, 2024 · 1 comment
Open

Cannot start 'Java' local dynamodb with versions greater than 8.0.0 #119

mxro opened this issue Oct 25, 2024 · 1 comment

Comments

@mxro
Copy link
Contributor

mxro commented Oct 25, 2024

Environment

  • Windows
  • Yarn 3 (PnP enabled)

Test case

  • Install dynamo-db-local with version 8.0.0
  • Try spawning with command java
  • Local instance starts up

  • Install dynamo-db-local with version 8.1.1 (same issue with 9+ versions as well)
  • Try spawning with command java
  • Local instance never starts up

For reference, here the code how I spawn the instance:

 if (commandExists('java')) {
    console.debug('Starting local DynamoDB with Java');
    const pr = dynamoDBLocal.spawn({
      port: MAPPED_PORT,
      path: null,
      detached: false,
    });
    await waitPort({
      host: 'localhost',
      port: MAPPED_PORT,
    });
    console.debug('Started local DynamoDB with Java');
    return {
      port: MAPPED_PORT,
      stop: async () => {
        console.debug('Stopping local Java DynamoDB');
        try {
          await killProcess(pr);
        } catch (e) {
          console.error('Stopping local Java DynamoDB process not successful');
          throw e;
        }
        console.debug('Local Java DynamoDB stopped');
      },
    };
  }

https://github.com/goldstack/goldstack/blob/09810c61c34b39436420e64b72f86a29fa3d796b/workspaces/templates-lib/packages/template-dynamodb/src/localDynamoDB.ts#L142

The waitPort method never returns when using package > 8.0.0. Could this be related with the path lookup in package having changed?

@chrisguttandin
Copy link
Owner

I think the main difference between the v8.0 and v8.1 is this commit c17285a. It updates DynamoDB Local to v2.3.0. This update in itself updated the JDK.

c17285a#diff-4a887757e1a3d31931e4b8281af3d6c5bf8cbe84d5b503218990fe81d22df575R10-R14

Could that be the reason for the problem?

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

2 participants