"Dynamodb start" missing log4j/logger - exception
See original GitHub issueIssue Description
Console output:
>sls dynamodb start
Dynamodb Local Started, Visit: http://localhost:8000/shell
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/Logger
at com.amazonaws.services.dynamodbv2.local.server.DynamoDBProxyServer.<clinit>(DynamoDBProxyServer.java:36)
at com.amazonaws.services.dynamodbv2.local.main.ServerRunner.createServer(ServerRunner.java:123)
at com.amazonaws.services.dynamodbv2.local.main.ServerRunner.createServerFromCommandLineArgs(ServerRunner.java:119)
at com.amazonaws.services.dynamodbv2.local.main.ServerRunner.main(ServerRunner.java:70)
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.Logger
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 4 more
DynamoDB Local failed to start with code 1
Versions:
>sls --v
1.5.1
>java -version
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)
>node -v
v7.2.0
Package.json:
"serverless-dynamodb-local": "^0.2.16",
"serverless-offline": "^3.8.3"
serverless.yaml
service: aws-nodejs-nexit
provider:
name: aws
runtime: nodejs4.3
functions:
hello:
handler: src/handler.hello
events:
- http:
path: hello
method: get
plugins:
- serverless-offline
- serverless-dynamodb-local
custom:
dynamodb:
start:
port: 8000
inMemory: true
migration: true
migration:
dir: ./offline/migrations
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
"Dynamodb start" missing log4j/logger - exception #69
@AshanFernando seems yes, no error when running jar from site. >java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb ...
Read more >Error handling with DynamoDB - AWS Documentation
Discover the best practices for handling client and server errors and exceptions returned by Amazon DynamoDB operations.
Read more >java.lang.NoClassDefFoundError: org/apache/log4j/Logger ...
ClassNotFoundException This an Exception , it indicates that the class was ... this dependency in my build.gradle , the error disappeared :.
Read more >Log4j 2 Lock-free Asynchronous Loggers for Low-Latency ...
If a problem happens during the logging process and an exception is ... starting another thread is not likely to give better performance....
Read more >VPC errors - Amazon EMR - 亚马逊云科技
... configurationMissing DHCP Options SetPermissions errorsErrors that result in START_FAILEDCluster Terminated with errors and NameNode fails to start.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No sense of testing the jar from the aws site, instead, you should test with your local dynamoLocal.jar in the dir .dynamodb of the serverless project home.
Test against with “java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb” to see what happens.
Probably this issue is caused by an interrupted download and worse still, when you re-run sls dynamodb install, it will remind you that “Dynamodb is already installed on path!” even it’s a broken jar.
Prune that dir and run “sls dynamodb install” again! Hope that helps
Thank you