exec failing with Java stack trace when using whereSortKey().beginsWith([string])
troncoso opened this issue · 2 comments
Describe the bug
When attempting to use exec
, execFetchAll
, or execCount
with whereSortKey().beginsWith
, an error is thrown and the message contains a java stacktrace
NOTE: I am using DynamoDB Local. This may have some bearing since the executable is a java package.
NOTE 2: I can confirm that the code works when running in AWS hosted DynamoDB. So this problem seems specific to DynamoDB Local
To Reproduce
Steps to reproduce the behavior:
- Clone https://github.com/Troncoso/dynamo-easy-bug.git
- Run
npm install
- Run
npm run start
- See error
Expected behavior
The output of the above steps should be:
TOTAL: 0
Actual behavior
An error is thrown:
Sep 08, 2020 6:24:17 PM com.almworks.sqlite4java.Internal log
WARNING: [sqlite] SQLiteDBAccess$20@b747cc8: job exception
java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.SQLiteDBAccess$20.doWork(SQLiteDBAccess.java:2109)
at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.SQLiteDBAccess$20.doWork(SQLiteDBAccess.java:2010)
at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.AmazonDynamoDBOfflineSQLiteJob.job(AmazonDynamoDBOfflineSQLiteJob.java:117)
at com.almworks.sqlite4java.SQLiteJob.execute(SQLiteJob.java:372)
at com.almworks.sqlite4java.SQLiteQueue.executeJob(SQLiteQueue.java:534)
at com.almworks.sqlite4java.SQLiteQueue.queueFunction(SQLiteQueue.java:667)
at com.almworks.sqlite4java.SQLiteQueue.runQueue(SQLiteQueue.java:623)
at com.almworks.sqlite4java.SQLiteQueue.access$000(SQLiteQueue.java:77)
at com.almworks.sqlite4java.SQLiteQueue$1.run(SQLiteQueue.java:205)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 10 more
Sep 08, 2020 6:24:19 PM com.almworks.sqlite4java.Internal log
WARNING: [sqlite] SQLiteDBAccess$20@6a9bd9b2: job exception
java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.SQLiteDBAccess$20.doWork(SQLiteDBAccess.java:2109)
at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.SQLiteDBAccess$20.doWork(SQLiteDBAccess.java:2010)
at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.AmazonDynamoDBOfflineSQLiteJob.job(AmazonDynamoDBOfflineSQLiteJob.java:117)
at com.almworks.sqlite4java.SQLiteJob.execute(SQLiteJob.java:372)
at com.almworks.sqlite4java.SQLiteQueue.executeJob(SQLiteQueue.java:534)
at com.almworks.sqlite4java.SQLiteQueue.queueFunction(SQLiteQueue.java:667)
at com.almworks.sqlite4java.SQLiteQueue.runQueue(SQLiteQueue.java:623)
at com.almworks.sqlite4java.SQLiteQueue.access$000(SQLiteQueue.java:77)
at com.almworks.sqlite4java.SQLiteQueue$1.run(SQLiteQueue.java:205)
at java.base/java.lang.Thread.run(Thread.java:834)
Sep 08, 2020 6:24:20 PM com.almworks.sqlite4java.Internal log
WARNING: [sqlite] SQLiteDBAccess$20@5672d725: job exception
java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.SQLiteDBAccess$20.doWork(SQLiteDBAccess.java:2109)
at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.SQLiteDBAccess$20.doWork(SQLiteDBAccess.java:2010)
at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.AmazonDynamoDBOfflineSQLiteJob.job(AmazonDynamoDBOfflineSQLiteJob.java:117)
at com.almworks.sqlite4java.SQLiteJob.execute(SQLiteJob.java:372)
at com.almworks.sqlite4java.SQLiteQueue.executeJob(SQLiteQueue.java:534)
at com.almworks.sqlite4java.SQLiteQueue.queueFunction(SQLiteQueue.java:667)
at com.almworks.sqlite4java.SQLiteQueue.runQueue(SQLiteQueue.java:623)
at com.almworks.sqlite4java.SQLiteQueue.access$000(SQLiteQueue.java:77)
at com.almworks.sqlite4java.SQLiteQueue$1.run(SQLiteQueue.java:205)
at java.base/java.lang.Thread.run(Thread.java:834)
Sep 08, 2020 6:24:31 PM com.almworks.sqlite4java.Internal log
WARNING: [sqlite] SQLiteDBAccess$20@51367cde: job exception
java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.SQLiteDBAccess$20.doWork(SQLiteDBAccess.java:2109)
at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.SQLiteDBAccess$20.doWork(SQLiteDBAccess.java:2010)
at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.AmazonDynamoDBOfflineSQLiteJob.job(AmazonDynamoDBOfflineSQLiteJob.java:117)
at com.almworks.sqlite4java.SQLiteJob.execute(SQLiteJob.java:372)
at com.almworks.sqlite4java.SQLiteQueue.executeJob(SQLiteQueue.java:534)
at com.almworks.sqlite4java.SQLiteQueue.queueFunction(SQLiteQueue.java:667)
at com.almworks.sqlite4java.SQLiteQueue.runQueue(SQLiteQueue.java:623)
at com.almworks.sqlite4java.SQLiteQueue.access$000(SQLiteQueue.java:77)
at com.almworks.sqlite4java.SQLiteQueue$1.run(SQLiteQueue.java:205)
at java.base/java.lang.Thread.run(Thread.java:834)
Note: If you comment out line 20 in that test repo, you'll see that it works correctly
@troncoso Thanks for the report. We can't do anything here, as it's clearly a bug in dynamoDB Local. Please submit the bug there.