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

Error: Unable to initialize main class com.amazonaws.services.dynamodbv2.local.main.ServerRunner #38

Open
alexbulakh1994 opened this issue May 22, 2020 · 2 comments

Comments

@alexbulakh1994
Copy link

All working well but today I suddenly get such error
Error: Unable to initialize main class com.amazonaws.services.dynamodbv2.local.main.ServerRunner
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException

How I could fix this ?

@alejoamiras
Copy link

alejoamiras commented Jun 25, 2020

@alexbulakh1994 testing around I found that adding this code fixed it:

DynamoDBLocal.configureInstaller({
  installPath: './dynamodblocal-bin',
  downloadUrl: 'https://s3.sa-east-1.amazonaws.com/dynamodb-local-sao-paulo/dynamodb_local_latest.tar.gz'
});

Actually, having created the installPath folder before, I just needed:

DynamoDBLocal.configureInstaller({
  installPath: './dynamodblocal-bin'
});

But the combination of both parameters made it work without having the folder previously created.

@wernerwws
Copy link

I also got this error in a jest test and was able to fix it by increasing the timeout for this particular test that spins up the DynamoDB-local DB.

To increase the timeout for a jest test see: jestjs/jest#5055 (comment)

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

3 participants