GithubHelp home page GithubHelp logo

oracle / nosql-java-sdk Goto Github PK

View Code? Open in Web Editor NEW
23.0 11.0 23.0 6.54 MB

SDK for Java for the Oracle NoSQL Database

Home Page: https://www.oracle.com/database/nosql/

License: Universal Permissive License v1.0

Java 99.84% Shell 0.16%
nosql cloud database nosql-database oracle-cloud java oracle

nosql-java-sdk's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nosql-java-sdk's Issues

Instruction for running 'Quickstart' for cloud simulator has a typo

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

Problems running the instruction 'drop table' in Quickstart for Cloud Simulator

Hi. Thanks again for your help.

Explanation

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?

Steps to reproduce the problem

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 😊

Not working with ARM

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)

Reactive Support

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.

Determine if Put was create or update

Currently getExistingVersion() is always empty unless you:

  1. Specify setReturnRow(true)
  2. Specify one of these options: IfAbsent, IfPresent, IfVersion.
  3. The condition fails

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.