oracle / nosql-java-sdk Goto Github PK
View Code? Open in Web Editor NEWSDK for Java for the Oracle NoSQL Database
Home Page: https://www.oracle.com/database/nosql/
License: Universal Permissive License v1.0
SDK for Java for the Oracle NoSQL Database
Home Page: https://www.oracle.com/database/nosql/
License: Universal Permissive License v1.0
Hi, hope you're doing fine.
Just a very minor typo. The instructions to run the 'Quickstart' for the cloud simulator specify running as an argument cloudsi
instead of cloudsim
.
$ java -cp .:<path-to-nosqldriver.jar> Quickstart -service cloudsi -endpoint http://localhost:8080
Hi. Thanks again for your help.
I'm trying to run the Quickstart snippet for the Cloud Simulator option and I'm encountering a problem.
I'm creating a Maven Project and adding the nosqldriver
dependency.
<dependency>
<groupId>com.oracle.nosql.sdk</groupId>
<artifactId>nosqldriver</artifactId>
<version>5.2.27</version>
</dependency>
I'm also creating the Quickstart.java
file and running it as expressed in the code. The program successfully creates the table, puts the demo object and reads that same object, but the program breaks when executing the drop table
statement.
tableRequest = new TableRequest()
.setStatement("drop table if exists " + tableName);
handle.doTableRequest(tableRequest,
20000,
1000);
The stacktrace of the exception thrown is the following:
Acquired handle for service cloudsim at endpoint http://localhost:8080
Created table JavaQuickstart ...
Put row, result non-null Version
Got row, result {"id":123,"name":"joe","data":{"a":1,"b":2}}
Exception in thread "main" oracle.nosql.driver.TableNotFoundException: Table not found: cloudsim:JavaQuickstart
at oracle.nosql.driver.ops.serde.BinaryProtocol.mapException(BinaryProtocol.java:524)
at oracle.nosql.driver.http.Client.handleResponseErrorCode(Client.java:1077)
at oracle.nosql.driver.http.Client.processOKResponse(Client.java:911)
at oracle.nosql.driver.http.Client.processResponse(Client.java:863)
at oracle.nosql.driver.http.Client.execute(Client.java:511)
at oracle.nosql.driver.http.NoSQLHandleImpl.getTable(NoSQLHandleImpl.java:210)
at oracle.nosql.driver.ops.TableResult.waitForCompletion(TableResult.java:457)
at oracle.nosql.driver.http.NoSQLHandleImpl.doTableRequest(NoSQLHandleImpl.java:355)
at com.oracle.Quickstart.main(Quickstart.java:205)
Process finished with exit code 1
The code looks OK, so I'm not able to pinpoint the source of the problem. Any idea how to go about it?
I just created a new project on IntelliJ IDEA using Maven, set the Quickstart file as my main class and ran the code. I'm not adding the jar file to the classpath for executing since I'm using the Maven dependency. I'm using OpenJDK 16 on Oracle Linux 8, the code also fails in OpenJDK 11.
Are you able to reproduce the problem?
Thanks in advance 😊
This library is not able to connect with host when run on ARM nodes. Is anyone else facing this issue?
Unable to connect to host.
Caused by: java.lang.RuntimeException: Timeout exception: host=<HOST> port=443 uri=<URL>
at oracle.nosql.driver.util.HttpRequestUtil.doRequest(HttpRequestUtil.java:293)
at oracle.nosql.driver.util.HttpRequestUtil.doPostRequest(HttpRequestUtil.java:119)
at oracle.nosql.driver.iam.FederationRequestHelper.getSecurityToken(FederationRequestHelper.java:60)
at oracle.nosql.driver.iam.SecurityTokenSupplier.getSecurityTokenInternal(SecurityTokenSupplier.java:246)
at oracle.nosql.driver.iam.SecurityTokenSupplier.getSecurityTokenFromIAM(SecurityTokenSupplier.java:228)
Seems that you are using Netty for HttpClient implementation.
Although async is not supported yet, maybe it would be better to use Reactor Netty instead for reactive support?
Adding reactive support would improve already existing implementation for Spring Oracle NoSQL SDK (currently it just wraps synchronous requests, that doesn't open real reactive programming perspectives) and allow using NoSQL SDK in real reactive environments.
If it is welcome, I can realize such functionality as separate module and send a pull request. But please, add at least a marker interface for oracle.nosql.driver.http.Client so driver (like QueryDriver) can set other client implementations.
When I checked the readme file, it explained version 5.4.14.
However, the version available is until 5.4.13:
Reference:
Currently getExistingVersion() is always empty unless you:
My issue is that I need the put operation to succeed and return getExistingVersion() for the previous version—if one exists—without specifying a conditional Option.
Using the older NoSQL api this was possible by setting ReturnRow.Choice.VERSION.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.