https://kotlinlang.org logo
#ktor
Title
# ktor
p

Partho Paul

06/20/2022, 4:28 PM
Hi everyone, I’m trying to fetch an application from dynamodb using latest aws sdk. I’m doing it as below:
Copy code
getDynamoDbClient().getItem {

                tableName = TABLE_NAME
                key = request
            }
When I’m running this piece of code, I’m getting VerifyError Exception. Can someone please help me figuring out what I’m doing wrong? Attached in thread is the full error message. Kotlin version: 1.7.0, Ktor version: 2.0.2, aws version: 0.16.0 TIA
Copy code
Bad type on operand stack
Exception Details:
  Location:
    Generated_for_debugger_class$generated_for_debugger_fun$1$1.invoke(Laws/sdk/kotlin/services/dynamodb/model/GetItemRequest$Builder;)V @8: getfield
  Reason:
    Type 'Generated_for_debugger_class$generated_for_debugger_fun$1$1' (current frame, stack[1]) is not assignable to 'Generated_for_debugger_class$generated_for_debugger_fun$1'
  Current Frame:
    bci: @8
    flags: { }
    locals: { 'Generated_for_debugger_class$generated_for_debugger_fun$1$1', 'aws/sdk/kotlin/services/dynamodb/model/GetItemRequest$Builder' }
    stack: { 'aws/sdk/kotlin/services/dynamodb/model/GetItemRequest$Builder', 'Generated_for_debugger_class$generated_for_debugger_fun$1$1' }
  Bytecode:
    0000000: 2b12 2db8 0033 2b2a b400 37b6 003d 1221
    0000010: 123f b600 4559 1210 b600 4b5a 575b 575f
    0000020: 5d58 b600 4f2b 2ab4 0051 b400 5512 2112
    0000030: 57b6 0045 5912 10b6 004b 5a57 5b57 5f5d
    0000040: 58b6 004f b1
a

Aleksei Tirman [JB]

06/20/2022, 5:57 PM
Could you please explain how this problem is related to the Ktor framework?
p

Partho Paul

06/21/2022, 4:40 AM
@Aleksei Tirman [JB] Posted here since I couldn’t find any channel for aws. Let me know if there’s a channel for this query.
21 Views