I created the users space:
s = box.schema.space.create('users')
s:format({
> {name = 'id', type = 'unsigned'},
> {name = 'user_name', type = 'string'},
> {name = 'age', type = 'unsigned'}
> })
I have entity User:
@Tuple(spaceName = "users")
public class User {
@Id
private Long id;
@Field(name = "user_name")
private String name;
private Long age;
}
DB connection settings:
@Configuration
@EnableTarantoolRepositories(basePackageClasses = UserRepository.class)
public class TarantoolConfiguration extends AbstractTarantoolDataConfiguration {
@Value("${tarantool.host}")
protected String host;
@Value("${tarantool.port}")
protected int port;
@Value("${tarantool.username}")
protected String username;
@Value("${tarantool.password}")
protected String password;
@Override
protected TarantoolServerAddress tarantoolServerAddress() {
return new TarantoolServerAddress(host, port);
}
@Override
public TarantoolCredentials tarantoolCredentials() {
return new SimpleTarantoolCredentials(username, password);
}
@Override
public TarantoolClient tarantoolClient(TarantoolClientConfig tarantoolClientConfig,
TarantoolClusterAddressProvider tarantoolClusterAddressProvider) {
return new ProxyTarantoolTupleClient(super.tarantoolClient(tarantoolClientConfig, tarantoolClusterAddressProvider));
}
}
There is also an endpoint that simply displays a list of users:
@GetMapping("/users")
public List<User> getUsers() {
return (List<User>) userRepository.findAll();
}
When accessing the address http://localhost:8080/users throws exception:
ERROR 2203 --- [nio-8080-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is io.tarantool.driver.exceptions.TarantoolClientException: Failed to refresh spaces and indexes metadata] with root cause
io.tarantool.driver.exceptions.TarantoolServerException: TarantoolServerException: code=32801, message=Procedure 'ddl.get_schema' is not defined
at
What could be the problem?