# \#dgraph4j

**URL:** https://discuss.dgraph.io/tag/dgraph4j/93.md

[Latest](https://discuss.dgraph.io/latest.md) · [Categories](https://discuss.dgraph.io/categories.md) · [Tags](https://discuss.dgraph.io/tags.md)

---

## [How to compress the query result in dgraph4j?](https://discuss.dgraph.io/t/how-to-compress-the-query-result-in-dgraph4j/19608)

<div class="topic-metadata">

**Author:** [@jianbin](https://discuss.dgraph.io/u/jianbin)\
**Replies:** 0\
**Last updated:** [November 20, 2024, 12:30pm UTC](https://discuss.dgraph.io/t/how-to-compress-the-query-result-in-dgraph4j/19608 "2024-11-20T12:30:36Z")

</div>

I executed a query in java(using dgraph4j), and the result is about 3MB. it takes about 1.5 second to get the result. is there a compress option in dgraph4j?

---

## [Shade grpc dependency](https://discuss.dgraph.io/t/shade-grpc-dependency/7749)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 2\
**Last updated:** [September 23, 2024, 9:12am UTC](https://discuss.dgraph.io/t/shade-grpc-dependency/7749 "2024-09-23T09:12:09Z")

</div>

Posted by mangalaman93: If we shade the grpc dependency of Java client, it would avoid conflicts with a different version of grpc dependency that user code might have. I have faced these issues with Spark (or MapR), spa…

---

## [Request for Publishing latest version of Java Client to Maven Central](https://discuss.dgraph.io/t/request-for-publishing-latest-version-of-java-client-to-maven-central/19501)

<div class="topic-metadata">

**Author:** [@e1sordo](https://discuss.dgraph.io/u/e1sordo)\
**Replies:** 3\
**Last updated:** [August 9, 2024, 7:42pm UTC](https://discuss.dgraph.io/t/request-for-publishing-latest-version-of-java-client-to-maven-central/19501 "2024-08-09T19:42:31Z")

</div>

Dear GitHub - dgraph-io/dgraph4j: Official Dgraph Java client maintainers, We kindly request you to build and publish the latest version of the client to Maven Central (the current one was on Dec 25, 2021). This request…

---

## [Dgraph4j Not found extra exception log](https://discuss.dgraph.io/t/dgraph4j-not-found-extra-exception-log/18858)

<div class="topic-metadata">

**Author:** [@Arano](https://discuss.dgraph.io/u/Arano)\
**Replies:** 1\
**Last updated:** [September 11, 2023, 11:40am UTC](https://discuss.dgraph.io/t/dgraph4j-not-found-extra-exception-log/18858 "2023-09-11T11:40:34Z")

</div>

I got the follow log , but there is no extra detail for exception reason , the detail was lost java.lang.RuntimeException: java.util.concurrent.CompletionException: java.lang.RuntimeException: The doRequest encountered …

---

## [Mutation Performance！](https://discuss.dgraph.io/t/mutation-performance/18507)

<div class="topic-metadata">

**Author:** [@zhaojiangkun](https://discuss.dgraph.io/u/zhaojiangkun)\
**Replies:** 9\
**Last updated:** [April 21, 2023, 2:06am UTC](https://discuss.dgraph.io/t/mutation-performance/18507 "2023-04-21T02:06:00Z")

</div>

I wonder if there is a performance bottleneck about mutation with dgraph4j。 And in dgraph4j，the batch mutation is different from “dgraph bulk" or “graph live”?

---

## [Does Dgraph java client support gRPC retry?](https://discuss.dgraph.io/t/does-dgraph-java-client-support-grpc-retry/16950)

<div class="topic-metadata">

**Author:** [@itsjay](https://discuss.dgraph.io/u/itsjay)\
**Replies:** 2\
**Last updated:** [March 7, 2022, 6:38pm UTC](https://discuss.dgraph.io/t/does-dgraph-java-client-support-grpc-retry/16950 "2022-03-07T18:38:29Z")

</div>

Let’s say I setup the client like this (there are separate instances of Dgraph running on ports 9080 and 9083) ManagedChannel channel1 = ManagedChannelBuilder .forAddress("localhost", 9080) .defaultLoadBalancing…

---

## [Dgraph4J under GraalVM native image segfault](https://discuss.dgraph.io/t/dgraph4j-under-graalvm-native-image-segfault/13658)

<div class="topic-metadata">

**Author:** [@denis111](https://discuss.dgraph.io/u/denis111)\
**Replies:** 2\
**Last updated:** [April 20, 2021, 9:04am UTC](https://discuss.dgraph.io/t/dgraph4j-under-graalvm-native-image-segfault/13658 "2021-04-20T09:04:07Z")

</div>

Report a Dgraph Client Bug What Dgraph client (and version) are you using? (put “x” in the box to select) Dgo PyDgraph Dgraph4J Dgraph-js Dgraph-js-http Dgraph.NET Version: v21.03.0 What version of Dgr…

---

## [Dgraph4j support for custom executor](https://discuss.dgraph.io/t/dgraph4j-support-for-custom-executor/11530)

<div class="topic-metadata">

**Author:** [@lhr0909](https://discuss.dgraph.io/u/lhr0909)\
**Replies:** 5\
**Last updated:** [November 25, 2020, 7:45am UTC](https://discuss.dgraph.io/t/dgraph4j-support-for-custom-executor/11530 "2020-11-25T07:45:16Z")

</div>

Hi, We are running into issues where CompletableFutures are using too many resources due to the fact that the default ForkJoinPool#commonPool() is used. I would like to make the AsyncClient accept an Executor class upon…

---

## [Connecting to Slash GraphQL using Dgraph4j](https://discuss.dgraph.io/t/connecting-to-slash-graphql-using-dgraph4j/10813)

<div class="topic-metadata">

**Author:** [@wiradikusuma](https://discuss.dgraph.io/u/wiradikusuma)\
**Replies:** 4\
**Last updated:** [October 7, 2020, 4:58pm UTC](https://discuss.dgraph.io/t/connecting-to-slash-graphql-using-dgraph4j/10813 "2020-10-07T16:58:24Z")

</div>

Thanks, since @gja 's approach is the simplest I’ve used that and it works. Next question: How do I pass the API Key in Dgraph Client for Java? private val client = { val channel = ManagedChannelBuilder.forAddress(DG…

---

## [Connection health check when creating client](https://discuss.dgraph.io/t/connection-health-check-when-creating-client/7770)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 2\
**Last updated:** [August 20, 2020, 4:21am UTC](https://discuss.dgraph.io/t/connection-health-check-when-creating-client/7770 "2020-08-20T04:21:04Z")

</div>

Posted by damienburke: Hi, I was wondering if there was a way to check if a connection to a Dgraph instance is available immediately after the dgraph4j client is setup. This way, I can check before hand if my first quer…

---

## [DGraph4J ClientInterceptor deadline parameter takes into account connection alpha](https://discuss.dgraph.io/t/dgraph4j-clientinterceptor-deadline-parameter-takes-into-account-connection-alpha/9141)

<div class="topic-metadata">

**Author:** [@TarekSaid](https://discuss.dgraph.io/u/TarekSaid)\
**Replies:** 3\
**Last updated:** [August 14, 2020, 4:28am UTC](https://discuss.dgraph.io/t/dgraph4j-clientinterceptor-deadline-parameter-takes-into-account-connection-alpha/9141 "2020-08-14T04:28:39Z")

</div>

java version: 1.8 spring version: 5.0.6.RELEASE dgraph4j version: 20.03.0 I have the following configuration for the DGraph client: @Configuration public class DGraphConfig { @Value("${dgraph.url}") private S…

---

## [Dgraph4j 20.03.0 is incompatible with dgraph 20.03.0 (and likely other 20.x.x versions)](https://discuss.dgraph.io/t/dgraph4j-20-03-0-is-incompatible-with-dgraph-20-03-0-and-likely-other-20-x-x-versions/9246)

<div class="topic-metadata">

**Author:** [@KTannenberg](https://discuss.dgraph.io/u/KTannenberg)\
**Replies:** 4\
**Last updated:** [August 7, 2020, 5:36am UTC](https://discuss.dgraph.io/t/dgraph4j-20-03-0-is-incompatible-with-dgraph-20-03-0-and-likely-other-20-x-x-versions/9246 "2020-08-07T05:36:34Z")

</div>

I have an issue with setting value to UID predicate with NQuads using dgraph4j 20.03.0 Caused by: io.grpc.StatusRuntimeException: UNKNOWN: Input for predicate "Sector.parent" of type uid is scalar. Edge: entity:368 attr…

---

## [I got an No Auth Token error when alter the schema with dgraph4j client](https://discuss.dgraph.io/t/i-got-an-no-auth-token-error-when-alter-the-schema-with-dgraph4j-client/9113)

<div class="topic-metadata">

**Author:** [@Valdanito](https://discuss.dgraph.io/u/Valdanito)\
**Replies:** 2\
**Last updated:** [July 30, 2020, 9:11am UTC](https://discuss.dgraph.io/t/i-got-an-no-auth-token-error-when-alter-the-schema-with-dgraph4j-client/9113 "2020-07-30T09:11:25Z")

</div>

my dgraph verison is v20.07.0 and dgraph4j version is v20.03.0. I added a “–auth\_token hello” option to alpha. I added a header for my grpc request according to this document like this: //add alpha auth token. Metada…

---

## [Retry InterruptedException](https://discuss.dgraph.io/t/retry-interruptedexception/7772)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 1\
**Last updated:** [July 7, 2020, 4:38pm UTC](https://discuss.dgraph.io/t/retry-interruptedexception/7772 "2020-07-07T16:38:41Z")

</div>

Posted by martinmr: I am running the Jepsen tests and some of the tests are failing with this error: ERROR \[2020-07-01 22:11:46,650\] ForkJoinPool.commonPool-worker-4 - io.dgraph.DgraphAsyncClient The doRequest got inte…

---

## [Configuring TLS With DGraph](https://discuss.dgraph.io/t/configuring-tls-with-dgraph/7771)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 3\
**Last updated:** [May 21, 2020, 9:43am UTC](https://discuss.dgraph.io/t/configuring-tls-with-dgraph/7771 "2020-05-21T09:43:26Z")

</div>

Posted by damogallagher: Hi I have a spring boot project (version 2.3.0.RELEASE) using Java 11. I am trying to setup the code base to use TLS when communicating with DGraph. I have followed all the steps for creating …

---

## [Supporting gRPC with TLS on Java 8](https://discuss.dgraph.io/t/supporting-grpc-with-tls-on-java-8/7769)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 1\
**Last updated:** [May 14, 2020, 3:57pm UTC](https://discuss.dgraph.io/t/supporting-grpc-with-tls-on-java-8/7769 "2020-05-14T15:57:30Z")

</div>

Posted by danielmai: By default, TLS over gRPC is only supported on Java 9 and later. Java 9 is no longer supported. According to grpc-java, we can include grpc-netty-shaded as part of dgraph4j so that the necessary SS…

---

## [Dgraph4j and TLS - Unable to get demo working](https://discuss.dgraph.io/t/dgraph4j-and-tls-unable-to-get-demo-working/7768)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 4\
**Last updated:** [May 14, 2020, 8:54am UTC](https://discuss.dgraph.io/t/dgraph4j-and-tls-unable-to-get-demo-working/7768 "2020-05-14T08:54:15Z")

</div>

Posted by damogallagher: Hi I am trying to setup dgraph4j to use TLS. I have developed a simple maven java project to test this out My pom contents are simple and are as follows \<?xml version="1.0" encoding="UTF-8"?\>…

---

## [Set mutation returns two uids for one entity - can't tell which is correct one](https://discuss.dgraph.io/t/set-mutation-returns-two-uids-for-one-entity-cant-tell-which-is-correct-one/7767)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 2\
**Last updated:** [April 13, 2020, 6:43am UTC](https://discuss.dgraph.io/t/set-mutation-returns-two-uids-for-one-entity-cant-tell-which-is-correct-one/7767 "2020-04-13T06:43:30Z")

</div>

Posted by shanekingston: I’m sending a set mutation containing a single test object (in the form of JSON) and I’m getting two uids returned in the uid map. However, (as far as I can tell) only a single node has been sav…

---

## [Client should support close method](https://discuss.dgraph.io/t/client-should-support-close-method/7761)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 1\
**Last updated:** [March 25, 2020, 4:46pm UTC](https://discuss.dgraph.io/t/client-should-support-close-method/7761 "2020-03-25T16:46:59Z")

</div>

Posted by Willem520: now,the close method is not convenient it means we should save channel by myself,maybe we should provide client close methd like public void close(){ channels.stream().forEach(item -\> {…

---

## [Tests are failing](https://discuss.dgraph.io/t/tests-are-failing/7765)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 1\
**Last updated:** [March 25, 2020, 4:43pm UTC](https://discuss.dgraph.io/t/tests-are-failing/7765 "2020-03-25T16:43:47Z")

</div>

Posted by martinmr: Most likely due to recent changes to ACL. Link to example failure: https://teamcity.dgraph.io/viewLog.html?buildId=45148&buildTypeId=Dgraph4j\_Integration&tab=buildLog

---

## [startTs mismatch when running multiple upserts within one transaction](https://discuss.dgraph.io/t/startts-mismatch-when-running-multiple-upserts-within-one-transaction/7766)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 0\
**Last updated:** [March 23, 2020, 12:06pm UTC](https://discuss.dgraph.io/t/startts-mismatch-when-running-multiple-upserts-within-one-transaction/7766 "2020-03-23T12:06:44Z")

</div>

Posted by Grandys: Dgraph4j version: v2.1.0 Dgraph version: v1.2.0 I got following error when running multiple upserts within single transaction: java.lang.RuntimeException: java.util.concurrent.CompletionException: …

---

## [Add example of creating client with TLS](https://discuss.dgraph.io/t/add-example-of-creating-client-with-tls/7762)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 1\
**Last updated:** [February 17, 2020, 5:46pm UTC](https://discuss.dgraph.io/t/add-example-of-creating-client-with-tls/7762 "2020-02-17T17:46:32Z")

</div>

Posted by hubie: I’m having difficulty in successfully configuring the client to connect to Dgraph using TLS. Could you provide/document an example of how this would be set up? Thanks!

---

## [Org.slf4j/slf4j-simple as a compile-time dependency is incorrect](https://discuss.dgraph.io/t/org-slf4j-slf4j-simple-as-a-compile-time-dependency-is-incorrect/7764)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 0\
**Last updated:** [February 15, 2020, 9:53am UTC](https://discuss.dgraph.io/t/org-slf4j-slf4j-simple-as-a-compile-time-dependency-is-incorrect/7764 "2020-02-15T09:53:14Z")

</div>

Posted by vxe: Hello dgraph maintainers, it seems that slf4j gets propagated to projects which pull in dgraph4j as a maven dependency, see below This is a bug in dgraph4j, which lists org.slf4j/slf4j-simple as a compi…

---

## [Need to upgrade the related gRPC dependencies](https://discuss.dgraph.io/t/need-to-upgrade-the-related-grpc-dependencies/7763)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 0\
**Last updated:** [January 14, 2020, 7:37am UTC](https://discuss.dgraph.io/t/need-to-upgrade-the-related-grpc-dependencies/7763 "2020-01-14T07:37:43Z")

</div>

Posted by zxh: Hi, I have met some grpc errors when I using dgraph4j: 2.0.2 and protobuf-java: 3.7.1. The error: Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Connection closed while performing protocol nego…

---

## [Delete all syntax does not work in the java client](https://discuss.dgraph.io/t/delete-all-syntax-does-not-work-in-the-java-client/7752)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 5\
**Last updated:** [December 29, 2019, 11:30am UTC](https://discuss.dgraph.io/t/delete-all-syntax-does-not-work-in-the-java-client/7752 "2019-12-29T11:30:32Z")

</div>

Posted by hherman1: Currently the only way to issue deletes for triples like “uid \* \* .” is through the JSON syntax. If I try to use NQuads its first of all not clear whether I should be setting a target object id or st…

---

## [Dgraph4j java client first connect alpha is too slow](https://discuss.dgraph.io/t/dgraph4j-java-client-first-connect-alpha-is-too-slow/7757)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 12\
**Last updated:** [December 9, 2019, 1:27pm UTC](https://discuss.dgraph.io/t/dgraph4j-java-client-first-connect-alpha-is-too-slow/7757 "2019-12-09T13:27:43Z")

</div>

Posted by Willem520: every time, when I used dgraph4j to connect alpha, it take too much time to get result in first time,but then ,it was normal, there is any problem in dgraph4j? I used java client

---

## [Sample production configuration for Java grpc client](https://discuss.dgraph.io/t/sample-production-configuration-for-java-grpc-client/7758)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 7\
**Last updated:** [October 2, 2019, 7:21am UTC](https://discuss.dgraph.io/t/sample-production-configuration-for-java-grpc-client/7758 "2019-10-02T07:21:27Z")

</div>

Posted by ajaydivakaran: The below link talks about a single connection. Could you please elaborate what a typical production configuration would look like? How do I create more than 1 connection, pool configuration? …

---

## [queryWithVars -- how to specify multiple uids?](https://discuss.dgraph.io/t/querywithvars-how-to-specify-multiple-uids/7753)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 6\
**Last updated:** [October 1, 2019, 3:55pm UTC](https://discuss.dgraph.io/t/querywithvars-how-to-specify-multiple-uids/7753 "2019-10-01T15:55:14Z")

</div>

Posted by wiradikusuma: Given this signature: public Response queryWithVars(final String query, final Map\<String, String\> vars) How do I pass multiple value (uids) with the same key?

---

## [TestCase AcctUpsertTest and DgraphAsyncClientTest Failed](https://discuss.dgraph.io/t/testcase-acctupserttest-and-dgraphasyncclienttest-failed/7760)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 3\
**Last updated:** [October 1, 2019, 3:02pm UTC](https://discuss.dgraph.io/t/testcase-acctupserttest-and-dgraphasyncclienttest-failed/7760 "2019-10-01T15:02:37Z")

</div>

Posted by darionyaphet: io.dgraph.AcctUpsertTest.beforeClass FAILED java.lang.AssertionError io.dgraph.DgraphAsyncClientTest.beforeClass FAILED java.util.concurrent.CompletionException Caused by: io.grp…

---

## [New transaction does not pick random stub when connected to more then one alpha node](https://discuss.dgraph.io/t/new-transaction-does-not-pick-random-stub-when-connected-to-more-then-one-alpha-node/7759)

<div class="topic-metadata">

**Author:** [@diggy](https://discuss.dgraph.io/u/diggy)\
**Replies:** 1\
**Last updated:** [October 1, 2019, 1:41pm UTC](https://discuss.dgraph.io/t/new-transaction-does-not-pick-random-stub-when-connected-to-more-then-one-alpha-node/7759 "2019-10-01T13:41:07Z")

</div>

Posted by igormiletic: Version 2.0.1 When create client that connects to more then one stub, it does not pick random nodes for new transaction. It always talk to one node. E.g. Alpha-1 =\> IP 123.1.1.0 Alpha-2 =\> IP…

[Next page](https://discuss.dgraph.io/tag/dgraph4j/93.md?match_all_tags=true&page=1&tags%5B%5D=dgraph4j)
