Giter VIP home page Giter VIP logo

azure-cosmos-db-sql-api-async-java-getting-started's Introduction

page_type languages products description urlFragment
sample
java
azure
Azure Cosmos DB is a globally distributed multi-model database.
azure-cosmos-db-sql-api-async-java-getting-started

Developing a Java app using Azure Cosmos DB Async Java SDK

Azure Cosmos DB is a globally distributed multi-model database. One of the supported APIs is the SQL API, which provides a JSON document model with SQL querying and JavaScript procedural logic. This sample shows you how to use the Azure Cosmos DB with the SQL API to store and access data from a Java application.

Getting Started

Prerequisites

  • Before you can run this sample, you must have the following prerequisites:

    • An active Azure account. If you don't have one, you can sign up for a free account. Alternatively, you can use the Azure Cosmos DB Emulator for this tutorial. As emulator https certificate is self signed, you need to import its certificate to java trusted cert store as explained here.

    • JDK 1.8+

    • Maven

Quickstart

  • Then, clone this repository using
git clone https://github.com/Azure-Samples/azure-cosmos-java-getting-started.git

About the code

The code included in this sample is intended to get you quickly started with a Java application that connects to Azure Cosmos DB with the SQL API.

More information

azure-cosmos-db-sql-api-async-java-getting-started's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

azure-cosmos-db-sql-api-async-java-getting-started's Issues

[Action Needed] This repo is inactive

This GitHub repository has been identified as a candidate for archival

This repository has had no activity in more than [x amount of time]. Long periods of inactivity present security and code hygiene risks. Archiving will not prevent users from viewing or forking the code. A banner will appear on the repository alerting users that the repository is archived.

Please see https://aka.ms/sunsetting-faq to learn more about this process.

Action

✍️

❗**If this repository is still actively maintained, please simply close this issue. Closing an issue on a repository is considered activity and the repository will not be archived.🔒

If you take no action, this repository is still inactive 30 days from today it will be automatically archived..

Need more help? 🖐️

NoClassDefFoundError RxDocumentClientImpl Running on databricks cluster

stacktrace :
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.microsoft.azure.cosmosdb.rx.internal.RxDocumentClientImpl
at com.microsoft.azure.cosmosdb.rx.AsyncDocumentClient$Builder.build(AsyncDocumentClient.java:196)
at com.bfl.datalakeToCosmosIngestion.CosmosConn.(CosmosConn.scala:11)
at com.bfl.datalakeToCosmosIngestion.CosmosOperations$$anonfun$startDemographicsCosmosLoad$1.apply(CosmosOperations.scala:30)
at com.bfl.datalakeToCosmosIngestion.CosmosOperations$$anonfun$startDemographicsCosmosLoad$1.apply(CosmosOperations.scala:28)
at org.apache.spark.rdd.RDD$$anonfun$foreachPartition$1$$anonfun$apply$28.apply(RDD.scala:951)
at org.apache.spark.rdd.RDD$$anonfun$foreachPartition$1$$anonfun$apply$28.apply(RDD.scala:951)
at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:2284)
at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:2284)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
at org.apache.spark.scheduler.Task.doRunTask(Task.scala:139)
at org.apache.spark.scheduler.Task.run(Task.scala:112)
at org.apache.spark.executor.Executor$TaskRunner$$anonfun$13.apply(Executor.scala:497)
at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1526)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:503)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
OS and Version : Running jar on Databricks Cluster
Versions:

com.microsoft.azure
azure-cosmosdb
2.2.0

Other Details :
1.Running in local i was getting belwo issue
java.lang.NoSuchFieldError: ALLOW_TRAILING_COMMA
2.To resolve this i have overwritten jackson-databind therefore issue got resolve
3.Its working in local.
4.But when i run the jar on databricks cluster than it gives exception that i have mentioned above.

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.