Skip to Main Content

NoSQL Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

PREPARE Statement Fails with "Invalid UUID String" Error

1745752Nov 11 2024 — edited Nov 11 2024

I'm using Oracle NoSQL Database CE Version 24.3.9

When executing the prepare statement with UUID field and DECLARE variable, the database returns [IllegalArgument]: PREPARE: Illegal Argument: Invalid UUID string :

This issue does not appear in the cloud version.

Any guidance or suggestions would be greatly appreciated!

DDL:

CREATE TABLE IF NOT EXISTS a (
   a_id STRING AS UUID,
   b_id STRING AS UUID,
   state STRING,
   PRIMARY KEY(a_id)
)

Prepare Statement:

DECLARE $a string;$state string;$b string; UPDATE a SET state = $state WHERE a_id = $a AND b_id = $b AND state = 'listing'

Code to Reproduce:

package main
import (
    "fmt"
    "github.com/oracle/nosql-go-sdk/nosqldb"
    "time"
)
func main() {
    cfg := nosqldb.Config{
        Mode:     "onprem",
        Endpoint: "http://127.0.0.1:8080",
    }
    client, err := nosqldb.NewClient(cfg)
    if err != nil {
        fmt.Printf("failed to create a NoSQL client: %v\n", err)
        return
    }
    defer client.Close()
    err = tableOp(client, `
CREATE TABLE IF NOT EXISTS a (
   a_id STRING AS UUID,
   b_id STRING AS UUID,
   state STRING,
   PRIMARY KEY(a_id)
)`, nosqldb.OnDemandTableLimits(1))
    if err != nil {
        panic(err)
    }
    result, err := client.Prepare(&nosqldb.PrepareRequest{
        Statement: "DECLARE $a string;$state string;$b string; UPDATE a SET state = $state WHERE a_id = $a AND b_id = $b AND state = 'listing'",
    })
    if err != nil {
        panic(err)
    }
    fmt.Println(result)
}
func tableOp(client *nosqldb.Client, statement string, tableLimit *nosqldb.TableLimits) error {
    tableRes, err := client.DoTableRequest(&nosqldb.TableRequest{
        Statement:   statement,
        TableLimits: tableLimit,
    })
    if err != nil {
        return fmt.Errorf("tableOp failed: %v\n", err)
    }
    _, err = tableRes.WaitForCompletion(client, 60*time.Second, time.Second)
    if err != nil {
        return fmt.Errorf("Error tableOp request: %v\n", err)
    }
    return nil
}

Comments

chonewell Nov 12 2024

My Oracle Cloud tenant, cloud account, and secure email have no issues. Why haven't I received my password reset email for Oracle Cloud? This is very strange, and our attempts have not been able to solve the problem. May I ask who I should turn to for help?

L. Fernigrini Nov 12 2024

If your account is a paid one, open a Support ticket.

If it is a Free Tier then you will have to rely on help from the community. Most probable cause that you did not receive the password reset email is that your account has been stolen and the email has been changed.

chonewell Nov 13 2024

Thank you for your reply!
But when I chatted with the online customer service, they told me that my Oracle Cloud tenant, account, and email were all fine. So, there shouldn't be a problem of theft.
I have a free account, but who can I contact on the forum? I can only post, but no one on the forum can view my account permissions, right. I am currently trying to reset MFA, I don't know if it works.
It's quite ridiculous that I have a free account and can't enjoy any services, but how can I become a paid user if I can't log in to my account.

1 - 3

Post Details

Added on Nov 11 2024
0 comments
146 views