{"id":18554272,"url":"https://github.com/oracle/nosql-java-sdk","last_synced_at":"2025-05-09T00:04:23.672Z","repository":{"id":37581032,"uuid":"298920362","full_name":"oracle/nosql-java-sdk","owner":"oracle","description":"SDK for Java for the Oracle NoSQL Database","archived":false,"fork":false,"pushed_at":"2025-05-07T17:09:04.000Z","size":7016,"stargazers_count":28,"open_issues_count":8,"forks_count":26,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-09T00:04:15.300Z","etag":null,"topics":["cloud","database","java","nosql","nosql-database","oracle","oracle-cloud"],"latest_commit_sha":null,"homepage":"https://www.oracle.com/database/nosql/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"upl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oracle.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-27T00:05:54.000Z","updated_at":"2025-04-24T15:15:24.000Z","dependencies_parsed_at":"2024-03-25T22:31:47.903Z","dependency_job_id":"e25858ad-94cb-4297-badb-42747d1e4af1","html_url":"https://github.com/oracle/nosql-java-sdk","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fnosql-java-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fnosql-java-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fnosql-java-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fnosql-java-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle","download_url":"https://codeload.github.com/oracle/nosql-java-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166514,"owners_count":21864475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud","database","java","nosql","nosql-database","oracle","oracle-cloud"],"created_at":"2024-11-06T21:20:50.535Z","updated_at":"2025-05-09T00:04:23.618Z","avatar_url":"https://github.com/oracle.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oracle NoSQL SDK for Java\n\n## About\n\nThe Oracle NoSQL SDK for Java provides interfaces,\ndocumentation, and examples to help develop Java\napplications that connect to the Oracle NoSQL\nDatabase Cloud Service, Oracle NoSQL Database or to the Oracle NoSQL\nCloud Simulator (which runs on a local machine). In order to\nrun the Oracle NoSQL Cloud Simulator, a separate download is\nnecessary from the Oracle NoSQL OTN download page. The Oracle NoSQL\nDatabase Cloud Service and Cloud Simulator are referred to as the \"cloud\nservice\" while the Oracle NoSQL Database is referred to as \"on-premise.\"\n\nThe API for all environments is the same, with the exception of some\nenvironment-specific classes and methods, mostly related to authentication\nand authorization. The API documentation clearly notes environment-specific\ninformation.\n\n## Requirements\n\nJava versions 8 and higher are supported.\n\n## Installation\n\nThe Oracle NoSQL SDK for Java can be included in a project in 2 ways:\n\n1. Include a dependency in a Maven project\n2. Download from GitHub\n\n### Install as a Project Dependency\n\nThis dependency can be used to include the SDK and its dependencies in your\nproject. The version changes with each release.\n\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.oracle.nosql.sdk\u003c/groupId\u003e\n  \u003cartifactId\u003enosqldriver\u003c/artifactId\u003e\n  \u003cversion\u003e5.4.17\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Download from GitHub\n\nYou can download the Oracle NoSQL SDK for Java as an archive from\n[GitHub](https://github.com/oracle/nosql-java-sdk/releases). The archive\ncontains the runtime library and its dependencies, examples, and\nAPI documentation.\n\n## Documentation\n\nSee [Oracle NoSQL SDK for Java javadoc](https://oracle.github.io/nosql-java-sdk/) for the latest API documentation.\n\nGeneral documentation about the Oracle NoSQL Database and the Oracle NoSQL Database Cloud Service can be found in these locations:\n\n* [Oracle NoSQL Database Cloud Service](https://docs.oracle.com/en/cloud/paas/nosql-cloud/nosql_dev.html)\n* [Oracle NoSQL Database On Premise](https://docs.oracle.com/en/database/other-databases/nosql-database/)\n\n## Changes\n\nSee [CHANGELOG](./CHANGELOG.md) for changes in each release.\n\n## Connect to the Oracle NoSQL Database\n\nThere are 3 environments, or services that can be used by the Oracle NoSQL\nSDK for Java:\n\n1. Oracle NoSQL Database Cloud Service\n2. Oracle NoSQL Database On-premise\n3. Oracle NoSQL Database Cloud Simulator\n\nThe next sections describe how to connect to each and what information is\nrequired.\n\n### Connecting to the Oracle NoSQL Database Cloud Service\n\nThere are 3 ways to authorize an application using the Oracle NoSQL Database Cloud Service:\n\n1. As a cloud user, or *User Principal*\n2. As an *Instance Principal*, where an instance is a compute instance in the Oracle cloud\n3. As a *Resource Principal*, where the resource is a programmatic entity in the Oracle cloud such as an OCI Function\n\n#### Authorizing with a User Principal\n\nYou will need an Oracle Cloud account and credentials to use this SDK. With this\ninformation, you'll set up a client configuration to tell your application how to\nfind the cloud service, and how to properly authenticate.\nSee [Authentication to connect to Oracle NoSQL Database](https://docs.oracle.com/en/cloud/paas/nosql-cloud/dtddt/index.html) for details of credentials you will need to configure an application. This only needs to be done once for any user.\n\nYou should have the following information in hand:\n\n1. Tenancy OCID\n2. User OCID\n3. Public key fingerprint\n4. Private key file\n5. Optional private key pass phrase\n\nYou can supply your user credentials in 2 ways:\n\n1. Using a [Configuration File](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm)\n2. Directly in a [SignatureProvider](https://oracle.github.io/nosql-java-sdk/oracle/nosql/driver/iam/SignatureProvider.html) constructor\n\nSee the Quickstart example below for details on using a User Principal\n\n#### Authorizing with an Instance Principal\n\nInstance Principal is an IAM service feature that enables instances to be authorized actors (or principals) to perform actions on service resources. Each compute instance has its own identity, and it authenticates using the certificates that are added to it. See [Calling Services from an instance](https://docs.cloud.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm) for prerequisite steps to set up Instance Principal.\n\nSee the Quickstart example below for code details for using an Instance Principal.\n\n#### Authorizing with a Resource Principal\n\nResource Principal is an IAM service feature that enables the resources to be authorized actors (or principals) to perform actions on service resources. You may use Resource Principal when calling Oracle NoSQL Database Cloud Service from other Oracle Cloud service resource such as [Functions](https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Concepts/functionsoverview.htm). See [Accessing Other Oracle Cloud Infrastructure Resources from Running Functions](https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Tasks/functionsaccessingociresources.htm) for how to set up Resource Principal.\n\nSee the Quickstart example below for code details for using a Resource Principal.\n\n### Connecting to the Oracle NoSQL Database On-premise\n\nThe on-premises configuration requires a running instance of Oracle NoSQL\nDatabase. In addition, a running proxy service is required. See\n[Oracle NoSQL Database Downloads](https://www.oracle.com/database/technologies/nosql-database-server-downloads.html) for downloads, and see\n[Information about the proxy](https://docs.oracle.com/en/database/other-databases/nosql-database/24.3/admin/proxy.html)\nfor proxy configuration information.\n\nOn-premise authorization requires use of [StoreAccessTokenProvider](https://oracle.github.io/nosql-java-sdk/oracle/nosql/driver/kv/StoreAccessTokenProvider.html)\nSee the Quickstart example below for code details for connecting on-premise.\n\n### Connecting to the Oracle NoSQL Database Cloud Simulator\n\nWhen you develop an application, you may wish to start with\n[Oracle NoSQL Database Cloud Simulator](https://www.oracle.com/downloads/cloud/nosql-cloud-sdk-downloads.html).\n\nThe Cloud Simulator simulates the cloud service and lets you write and test\napplications locally without accessing the Oracle NoSQL Database Cloud Service.\nYou may run the Cloud Simulator on localhost.\n\n See the Quickstart example below for code details for connecting to the Cloud Simulator.\nAuthorization for the Cloud Simulator is a simple no-op class implemented directly\nin the Quickstart example.\n\n## Logging\n\nAdditional logging can be enabled using a java properties file. For full details, see\n\"Logging in the SDK\" at https://oracle.github.io/nosql-java-sdk/oracle/nosql/driver/package-summary.html\n\n## Quickstart\n\nThe following is a quick start tutorial to run a simple program in all supported\nenvironments. It requires access to the Oracle NoSQL Database Cloud Service,\na running on-premises Oracle NoSQL Database instance, or a running Oracle\nNoSQL Cloud Simulator instance. As a standalone program it will run most easily\nusing a download version of the Oracle NoSQL SDK for Java.\n\n1. Copy this example into a local file named Quickstart.java\n2. If using directly-supplied cloud service credentials edit the file, adding\ncredentials in the appropriate\n[SignatureProvider](https://oracle.github.io/nosql-java-sdk/oracle/nosql/driver/iam/SignatureProvider.html) constructor. The default cloud service behavior looks for credentials in $HOME/.oci/config.\n3. Compile\n```\n$ javac -cp \u003cpath-to-nosqldriver.jar\u003e Quickstart.java\n```\n4. Run\nUsing the cloud service on region us-ashburn-1\n```\n$ java -cp .:\u003cpath-to-nosqldriver.jar\u003e Quickstart -service cloud -endpoint us-ashburn-1\n```\nUsing a non-secure on-premises service on endpoint http://localhost:8090\n```\n$ java -cp .:\u003cpath-to-nosqldriver.jar\u003e Quickstart -service onprem -endpoint http://localhost:8090\n```\nUsing a Cloud Simulator instance on endpoint http://localhost:8080\n```\n$ java -cp .:\u003cpath-to-nosqldriver.jar\u003e Quickstart -service cloudsim -endpoint http://localhost:8080\n```\n\nThere is code in the example for using Instance Principal and Resource Principal authorization for the cloud\nservice, but it is not enabled via a command line option. There is an additional, optional argument to the\ncommand line that allows specification of a compartment to use, where the compartment is an OCID. This\nis required if using Instance Principal or Resource Principal authorization.\n\n```\n/*-\n * Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.\n *\n * Licensed under the Universal Permissive License v 1.0 as shown at\n *  https://oss.oracle.com/licenses/upl/\n */\n\nimport java.io.IOException;\nimport java.util.ArrayList;\n\nimport oracle.nosql.driver.AuthorizationProvider;\nimport oracle.nosql.driver.NoSQLHandle;\nimport oracle.nosql.driver.NoSQLHandleConfig;\nimport oracle.nosql.driver.NoSQLHandleFactory;\nimport oracle.nosql.driver.iam.SignatureProvider;\nimport oracle.nosql.driver.kv.StoreAccessTokenProvider;\nimport oracle.nosql.driver.ops.GetRequest;\nimport oracle.nosql.driver.ops.GetResult;\nimport oracle.nosql.driver.ops.QueryRequest;\nimport oracle.nosql.driver.ops.QueryResult;\nimport oracle.nosql.driver.ops.PutRequest;\nimport oracle.nosql.driver.ops.PutResult;\nimport oracle.nosql.driver.ops.QueryIterableResult;\nimport oracle.nosql.driver.ops.Request;\nimport oracle.nosql.driver.ops.TableLimits;\nimport oracle.nosql.driver.ops.TableRequest;\nimport oracle.nosql.driver.values.MapValue;\n\n/**\n * A simple quickstart program to demonstrate Oracle NoSQL Database.\n * It does these things:\n * - create a table\n * - put a row\n * - get a row\n * - run a query using iterable/iterator\n * - run a query using partial results\n * - drop the table\n *\n * See the examples for more interesting operations. This quickstart is\n * intended to illustrate connecting to a service and performing a few\n * operations.\n *\n * This program can be run against:\n *  1. the cloud service\n *  2. the on-premises proxy and Oracle NoSQL Database instance, secure or\n *  not secure.\n *  3. the cloud simulator (CloudSim)\n *\n * To run:\n *   java -cp .:../lib/nosqldriver.jar Quickstart \\\n *      -service \u003ccloud|onprem|cloudsim\u003e -endpoint \u003cendpoint-or-region\u003e \\\n *      [-compartment \u003cocid\u003e]\n *\n * The endpoint and arguments vary with the environment.\n *\n * This quick start does not directly support a secure on-premise\n * environment. See the examples for details on that environment.\n */\npublic class Quickstart {\n\n    private String endpoint;\n    private String service;\n\n    /* required for Instance/Resource Principal auth and OKE workload identity */\n    private String compartment = null; // an OCID\n\n    /* alternative cloud authorization mechanisms */\n    private final static boolean useUserPrincipal = true;\n    private final static boolean useInstancePrincipal = false;\n    private final static boolean useResourcePrincipal = false;\n    private final static boolean useSessionToken = false;\n    private final static boolean useOkeWorkloadIdentity = false;\n\n    private Quickstart(String[] args) {\n        /*\n         * parse arguments\n         */\n        for (int i = 0; i \u003c args.length; i++) {\n            if (args[i].equals(\"-service\")) {\n                service = args[++i];\n            } else if (args[i].equals(\"-endpoint\")) {\n                endpoint = args[++i];\n            } else if (args[i].equals(\"-compartment\")) {\n                compartment = args[++i];\n            } else {\n                System.err.println(\"Unknown argument: \" + args[i]);\n                usage();\n            }\n        }\n        if (service == null || endpoint == null) {\n            System.err.println(\"-service and -endpoint are required\");\n            usage();\n        }\n    }\n\n    private static void usage() {\n        System.err.println(\n            \"Usage: java -cp \u003cpath-to-nosqldriver.jar\u003e Quickstart \\\\ \\n\" +\n            \" -service \u003ccloud|onprem|cloudsim\u003e -endpoint \u003cendpoint-or-region\u003e\" +\n            \" \\\\ \\n[-compartment \u003cocid\u003e]\");\n        System.exit(1);\n    }\n\n    private NoSQLHandle getHandle() {\n        NoSQLHandleConfig config = new NoSQLHandleConfig(endpoint);\n        if (compartment != null) {\n            config.setDefaultCompartment(compartment);\n        }\n        /*\n         * By default the handle will log to the console at level INFO.\n         * The default logger can be configured using a logging properties\n         * file specified on the command line, e.g.:\n         *   -Djava.util.logging.config.file=logging.properties\n         * If a user-provided Logger is desired, create and set it here:\n         *  Logger logger = Logger.getLogger(\"...\");\n         *  config.setLogger(logger);\n         * NOTE: the referenced classes must be imported above\n         */\n        config.setRequestTimeout(5000);\n        configureAuth(config);\n        NoSQLHandle handle = NoSQLHandleFactory.createNoSQLHandle(config);\n        System.out.println(\"Acquired handle for service \" + service +\n                           \" at endpoint \" + endpoint);\n        return handle;\n    }\n\n    /*\n     * This method contains all service-specific code in this program\n     */\n    private void configureAuth(NoSQLHandleConfig config) {\n        if (service.equals(\"cloud\")) {\n            try {\n                SignatureProvider authProvider = null;\n                if (useUserPrincipal) {\n                    /*\n                     * Use User Principal authorization using a config\n                     * file in $HOME/.oci/config\n                     */\n                    authProvider = new SignatureProvider();\n\n                    /*\n                     * Credentials can be provided directly by editing the\n                     * appropriate information into the parameters below\n                       authProvider = new SignatureProvider(tenantId, // OCID\n                       userId,         // OCID\n                       fingerprint, // String\n                       privateKeyFile, // File\n                       passphrase);  // char[]\n                    */\n                } else if (useSessionToken) {\n                    /*\n                     * There are additional constructors for Session Token,\n                     * see the javadoc\n                     */\n                    authProvider = SignatureProvider.createWithSessionToken();\n                } else {\n                    if (compartment == null) {\n                        throw new IllegalArgumentException(\n                            \"Compartment is required for Instance/Resource \" +\n                            \"Principal authorization\");\n                    }\n                    /*\n                     * There are additional constructors for both Instance and\n                     * Resource Principal, see the javadoc\n                     */\n                    if (useInstancePrincipal) {\n                        authProvider =\n                            SignatureProvider.createWithInstancePrincipal();\n                    } else if (useResourcePrincipal) {\n                        authProvider =\n                            SignatureProvider.createWithResourcePrincipal();\n                    } else if (useOkeWorkloadIdentity) {\n                        authProvider =\n                            SignatureProvider.createWithOkeWorkloadIdentity();\n                    } else {\n                        throw new IllegalArgumentException(\n                            \"Authorization method is required\");\n                    }\n                }\n\n                config.setAuthorizationProvider(authProvider);\n            } catch (IOException ioe) {\n                System.err.println(\"Unable to configure authentication: \" +\n                                   ioe);\n                System.exit(1);\n            }\n        } else if (service.equals(\"onprem\")) {\n            config.setAuthorizationProvider(new StoreAccessTokenProvider());\n        } else if (service.equals(\"cloudsim\")) {\n            /* cloud simulator */\n            config.setAuthorizationProvider(new AuthorizationProvider() {\n                    @Override\n                    public String getAuthorizationString(Request request) {\n                        return \"Bearer cloudsim\";\n                    }\n\n                    @Override\n                    public void close() {\n                    }\n                });\n        } else {\n            System.err.println(\"Unknown service: \" + service);\n            usage();\n        }\n    }\n\n    public static void main(String[] args) {\n\n        final String tableName = \"JavaQuickstart\";\n\n        /*\n         * The Quickstart instance configures and acquires a handle\n         */\n        Quickstart qs = new Quickstart(args);\n\n        /*\n         * Configure and get a NoSQLHandle. All service specific configuration\n         * is handled here\n         */\n        try (NoSQLHandle handle = qs.getHandle()) {\n\n            /*\n             * Create a simple table with an integer key, string name and\n             * JSON data\n             */\n            final String createTableStatement =\n                \"create table if not exists \" + tableName +\n                \"(id integer, name string, data json, primary key(id))\";\n\n            TableRequest tableRequest = new TableRequest()\n                .setStatement(createTableStatement)\n                .setTableLimits(new TableLimits(10, 10, 10));\n            /* this call will succeed or throw an exception */\n            handle.doTableRequest(tableRequest,\n                                  20000, /* wait up to 20 sec */\n                                  1000); /* poll once per second */\n\n            System.out.println(\"Created table \" + tableName + \" ...\");\n\n            /*\n             * Construct a row to put\n             */\n            MapValue value = new MapValue()\n                .put(\"id\", 123)\n                .put(\"name\", \"joe\")\n                .putFromJson(\"data\", \"{\\\"a\\\": 1, \\\"b\\\": 2}\", null);\n\n            PutRequest putRequest = new PutRequest()\n                .setValue(value)\n                .setTableName(tableName);\n\n            PutResult putRes = handle.put(putRequest);\n\n            System.out.println(\"Put row, result \" + putRes);\n\n            /*\n             * Get a row using the primary key\n             */\n            MapValue key = new MapValue().put(\"id\", 123);\n            GetRequest getRequest = new GetRequest()\n                .setKey(key)\n                .setTableName(tableName);\n            GetResult getRes = handle.get(getRequest);\n\n            System.out.println(\"Got row, result \" + getRes);\n\n            /*\n             * Perform a query using iterable and iterator\n             *\n             * To ensure the query resources are closed properly, use\n             * try-with-resources statement.\n             */\n            try (\n                QueryRequest queryRequest = new QueryRequest()\n                    .setStatement(\"select * from \" + tableName);\n                QueryIterableResult results =\n                    handle.queryIterable(queryRequest)) {\n                System.out.println(\"Query results:\");\n                for (MapValue res : results) {\n                    System.out.println(\"\\t\" + res);\n                }\n            }\n\n            /*\n             * Perform a query using partial results\n             */\n            try (\n                QueryRequest queryRequest = new QueryRequest()\n                    .setStatement(\"select * from \" + tableName) ) {\n\n                /*\n                 * Because a query can return partial results execution must occur\n                 * in a loop, accumulating or processing results\n                 */\n                ArrayList\u003cMapValue\u003e results = new ArrayList\u003cMapValue\u003e();\n                do {\n                    QueryResult queryResult = handle.query(queryRequest);\n                    results.addAll(queryResult.getResults());\n                } while (!queryRequest.isDone());\n                System.out.println(\"Query results again:\");\n                for (MapValue res : results) {\n                    System.out.println(\"\\t\" + res);\n                }\n            }\n\n            /*\n             * Drop the table\n             */\n            tableRequest = new TableRequest()\n                .setStatement(\"drop table if exists \" + tableName);\n\n            handle.doTableRequest(tableRequest,\n                                  20000,\n                                  1000);\n            System.out.println(\"Dropped table \" + tableName + \", done...\");\n        }\n    }\n}\n```\n\n## Examples\n\nSeveral example programs are provided in the examples directory to\nillustrate the API. They can be found in the release download from GitHub or\ndirectly in [GitHub NoSQL Examples](https://github.com/oracle/nosql-java-sdk/tree/main/examples). These examples can be run\nagainst the Oracle NoSQL\nDatabase, the NoSQL Database Cloud Service or an instance of the Oracle\nNoSQL Cloud Simulator. The code that differentiates among the configurations\nis in the file Common.java and can be examined to understand the differences.\n\n### Running Examples from a Repository Clone\n\nExamples can be run directly from a clone of the [GitHub Repository](https://oracle.github.io/nosql-java-sdk/). Once the clone has been built (mvn compile) examples can\nbe run in this manner\n\nRun BasicTableExample using a cloud simulator instance on endpoint\nlocalhost:8080\n\n```\n$ mvn -pl examples exec:java -Dexec.mainClass=BasicTableExample \\\n  -Dexec.args=\"http://localhost:8080\"\n```\n\nRun BasicTableExample using an on-premises instance on endpoint\nlocalhost:8090\n\n```\n$ mvn -pl examples exec:java -Dexec.mainClass=BasicTableExample \\\n  -Dexec.args=\"http://localhost:8090 -useKVProxy\"\n```\n\nRun BasicTableExample using the cloud service on region us-ashburn-1\n\n```\n$ mvn -pl examples exec:java -Dexec.mainClass=BasicTableExample \\\n  -Dexec.args=\"us-ashburn-1\"\n```\n\n### Compile and Run Examples using a Downloaded Release\n\nCompile Examples:\n\n    $ cd examples\n    $ javac -cp ../lib/nosqldriver.jar *.java\n\n\n#### Run using the Oracle NoSQL Database Cloud Service\n\nThis requires Oracle Cloud credentials.  Credentials can be provided directly in\nAPI or in a configuration file. The default configuration in\nexamples/Common.java uses a configuration file in ~/.oci/config with the\nfollowing contents:\n\n    [DEFAULT]\n    tenancy=\u003cUser OCID\u003e\n    user=\u003cTenancy OCID\u003e\n    fingerprint=\u003cPublic key fingerprint\u003e\n    key_file=\u003cPEM private key file\u003e\n    pass_phrase=\u003cPrivate key passphrase\u003e\n\nRun the example using an Oracle Cloud region endpoint.\n\n    $ java -cp .:../lib/nosqldriver.jar BasicTableExample \u003cregion\u003e\n        e.g.\n    $ java -cp .:../lib/nosqldriver.jar BasicTableExample us-ashburn-1\n\nThe region argument will change depending on which region you use.\n\n#### Run using the Oracle NoSQL Database On-premise\n\nRunning against the on-premises Oracle NoSQL Database on-premises requires\na running instance of the database and running proxy service. See above.\n\nRun against a not-secure proxy and store, with the proxy running on port 80:\n\n    $ java -cp .:../lib/nosqldriver.jar BasicTableExample http://localhost:80 -useKVProxy\n\nWhen using a secure proxy and store the proxy will generally run on port 443 and\nrequires SSL configuration. In addition, the store requires a valid user and\npassword which must have been created via administrative procedures.\n\nAssumptions for this command:\n\n1. a driver.trust file in the current directory with the password \"123456\"\n2. user \"driver\" with password \"Driver.User@01\". This user must have been created\nin the store and must have permission to create and use tables.\n\nRun the command:\n\n    $ java -Djavax.net.ssl.trustStorePassword=123456 \\\n         -Djavax.net.ssl.trustStore=driver.trust -cp .:../lib/nosqldriver.jar \\\n         BasicTableExample https://localhost:443 -useKVProxy -user driver \\\n        -password Driver.User@01\n\n#### Run using the Oracle NoSQL Database Cloud Simulator\n\nRun against the Oracle NoSQL Cloud Simulator using its default endpoint\nof localhost:8080, assuming that the Cloud Simulator has been started. If\nstarted on a different host or port adjust the endpoint accordingly.\n\n    $ java -cp .:../lib/nosqldriver.jar BasicTableExample localhost:8080\n\n## License\n\nSee the [LICENSE](LICENSE.txt) file.\n\nThe [THIRD\\_PARTY\\_LICENSES](THIRD_PARTY_LICENSES.txt) file contains third\nparty notices and licenses.\n\n## Help\n\n* Open an issue in the [Issues](https://github.com/oracle/nosql-java-sdk/issues) page\n* Post your question on the [Oracle NoSQL Database Community](https://forums.oracle.com/ords/apexds/domain/dev-community/category/nosql_database).\n* [Email to nosql\\_sdk\\_help\\_grp@oracle.com](mailto:nosql_sdk_help_grp@oracle.com)\n\nWhen requesting help please be sure to include as much detail as possible,\nincluding version of the SDK and **simple**, standalone example code as needed.\n\n## Contributing\nSee [CONTRIBUTING](./CONTRIBUTING.md) for details.\n\n## Security\nSee [SECURITY](./SECURITY.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle%2Fnosql-java-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle%2Fnosql-java-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle%2Fnosql-java-sdk/lists"}