Error while trying to query the in memory database with Persist Client

19 Views Asked by At

I am getting the following error when tried to run the code which uses bal persist for inmemory database access(version: Ballerina 2201.6.0 (Swan Lake Update 6)

Language specification 2022R4 Update Tool 1.3.15) 
 Compiling source
        user/rainier:0.1.0
ballerinax/persist.inmemory:1.0.0 [central.ballerina.io ->/Users/user/.ballerina/repositories/central.ballerina.io/bala/ballerinax/persist.inmemory/1.0.0]  100% [==================] 20/20 KB (0:00:00 / 0:00:00) 
        ballerinax/persist.inmemory:1.0.0 pulled from central successfully
ERROR [generated/store/persist_client.bal:(29:5,32:16)] {ballerina/jballerina.java}CLASS_NOT_FOUND 'io.ballerina.stdlib.persist.inmemory.datastore.InMemoryProcessor'
ERROR [generated/store/persist_client.bal:(34:5,37:16)] {ballerina/jballerina.java}CLASS_NOT_FOUND 'io.ballerina.stdlib.persist.inmemory.datastore.InMemoryProcessor'
1

There are 1 best solutions below

0
sahanhe On BEST ANSWER

This can be caused by the absence of native dependancy in the ballerina.toml file, which was added during the bal persist init. Can you check whether following dependency in your Ballerina.toml file

[[platform.java11.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "persist.inmemory-native"
version = "1.0.0"