Which bigquery version is compatible with google-api-client 1.22.0? - maven

I must use google-api-client 1.22.0 but I couldn't find the bigquery version that works compatible with this google-api-client version. I specified the bigquery dependency as follows:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>8.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
</dependency>
</dependencies>
Then i got this error:
com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient$Builder.setBatchPath(Ljava/lang/String;)Lcom/google/api/client/googleapis/services/AbstractGoogleClient$Builder;
Which version of bigquery should I use? I'll be very glad if you can help.

Related

What are the required maven dependencies to upload files to oracle object storage from Spring Boot 3.0 and Java 17?

I am trying to upload files to oracle Object Storage using Spring Boot 3.0 and Java 17. I am getting the following exception
java.util.NoSuchElementException: No http provider available; add dependency on one of the oci-java-sdk-common-httpclient-* choices, e.g. oci-java-sdk-common-httpclient-jersey
The dependency I used:
<dependencies>
<dependency>
<groupId>com.oracle.oci.sd`your text`k</groupId>
<artifactId>oci-java-sdk-objectstorage</artifactId>
</dependency>
</dependencies>`
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-bom</artifactId>
<version>3.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
I was able to upload files to Object storage with Spring Boot 2.x.x and Java 11 with the above dependency.
Just add the dependency suggested in the exception's message:
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common-httpclient-jersey</artifactId>
<version>3.2.0</version>
</dependency>
to your pom.xml file
Thank you #devwebcl. oci-java-sdk-common-httpclient-jersey was required but it wasn't sufficient. I had to add following dependency additionally.
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-addons-resteasy-client-configurator</artifactId>
</dependency>
So if someone want to upload files to object storage from Spring Boot 3, include the three dependencies below.
<dependencies>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-addons-resteasy-client-configurator</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-objectstorage</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common-httpclient-jersey</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-bom</artifactId>
<version>3.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common-httpclient-jersey</artifactId>
<version>3.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
enter code here

Which dependencyManagement is setting my dependency version?

i have a pom that has a number of entries in its <dependencyManagement> section.
How can i figure out which dependencyManagement entry is managing the versions of my dependancies!?
To further clarify my question, sometimes it is obvious -
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>spring-cloud-gcp-dependencies</artifactId>
<version>${spring-cloud-gcp.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
, would manage this verion:
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-pubsub</artifactId>
</dependency>
</dependencies>
But what about dependencies that are declared (without a version) that dont match the groupId, etc.
Thanks

How to totally overwrite the version of spring boot starter?

The spring boot version in my parent module is v2.1.17.RELEASE
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.1.17.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
And then I introduced spring-boot-starter-security in the sub-module, and the specified version is 2.4.4, which overwrites the version in the parent module (v2.1.17.RELEASE).
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>2.4.4</version>
</dependency>
Then, I ran the mvn dependency:tree command and found that the version of spring-boot-starter-security in the sub-module was indeed 2.4.4, but the version of artifactId (such as spring-aop) referenced in spring-boot-starter-security was still the version 5.1.x, which correspond to v2.1.17.RELEASE version of spring-boot-starter-security instead of the version 5.3.x which correspond to v2.4.4 version of spring-boot-starter-security
Hi please check this example
<properties>
<dependencies.version>2.1.17.RELEASE</dependencies.version>
<security.version>2.4.4</security.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${dependencies.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>${security.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

aws-java sdk dependency issue with spring boot

I m getting "Failure to transfer com.amazonaws:aws-java-sdk-swf-libraries:jar:1.11.22 from https://repo.maven.apache.org/maven2 " error when I add dependency of aws-java skd in my pom file.
Below is the dependency I m adding.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.11.558</version>
Official Github page link;
Importing the BOM
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bom</artifactId>
<version>1.11.559</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Using the SDK Maven modules
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-ec2</artifactId>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-dynamodb</artifactId>
</dependency>
</dependencies>

Where is Wildfly 9.0.2.Final BOM?

This builds:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly.bom</groupId>
<artifactId>jboss-javaee-7.0-with-tools</artifactId>
<version>8.2.1.Final</version>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
But it doesn't:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly.bom</groupId>
<artifactId>jboss-javaee-7.0-with-hibernate</artifactId>
<version>9.0.2.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Cannot find org.wildfly.bom:jboss-javaee-7.0-with-hibernate:9.0.2.Final.
Where can I find BOM for Wildfly 9.0.2.Final?
Or if it doesn't exist, why if Wildfly 9 isn't so new? We have WildFly 10 already!
There does not appear to be a version for 9.0.2.Final.
You should be able to use:
<dependency>
<groupId>org.wildfly.bom</groupId>
<artifactId>jboss-javaee-7.0-wildfly-with-hibernate3</artifactId>
<version>9.0.1.Final</version>
</dependency>
without any problems though.
The Central Repository Search Engine is your friend when trying to resolve these kinds of questions.

Resources