Spark (1.5.2) & Cassandra (2.2.5) Java Connector exception - java

I'm using spark 1.5.2 & cassandra 2.2.5. So based on the recommendation, I used cassandra connector 1.5.0. While running my application (save operation), it's throwing this exception:
Exception in thread "main" java.lang.IllegalArgumentException: Failed to get converter for field "getCompanyid" of type java.lang.String in SampleDBOperation$Employee mapped to column "companyid" of "test.employee"
at com.datastax.spark.connector.writer.MappedToGettableDataConverter$$anon$1$$anonfun$5.apply(MappedToGettableDataConverter.scala:157)
at com.datastax.spark.connector.writer.MappedToGettableDataConverter$$anon$1$$anonfun$5.apply(MappedToGettableDataConverter.scala:150)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.immutable.Range.foreach(Range.scala:141)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at com.datastax.spark.connector.writer.MappedToGettableDataConverter$$anon$1.<init>(MappedToGettableDataConverter.scala:150)
at com.datastax.spark.connector.writer.MappedToGettableDataConverter$.apply(MappedToGettableDataConverter.scala:20)
at com.datastax.spark.connector.writer.DefaultRowWriter.<init>(DefaultRowWriter.scala:17)
at com.datastax.spark.connector.writer.DefaultRowWriter$$anon$1.rowWriter(DefaultRowWriter.scala:31)
at com.datastax.spark.connector.writer.DefaultRowWriter$$anon$1.rowWriter(DefaultRowWriter.scala:29)
at com.datastax.spark.connector.writer.TableWriter$.apply(TableWriter.scala:269)
at com.datastax.spark.connector.RDDFunctions.saveToCassandra(RDDFunctions.scala:36)
at com.datastax.spark.connector.japi.RDDJavaFunctions.saveToCassandra(RDDJavaFunctions.java:61)
at com.datastax.spark.connector.japi.RDDAndDStreamCommonJavaFunctions$WriterBuilder.saveToCassandra(RDDAndDStreamCommonJavaFunctions.java:443)
Not sure, what's going wrong. Please find my pom.xml details:
<project>
<groupId>edu.berkeley</groupId>
<artifactId>sampledboperation</artifactId>
<modelVersion>4.0.0</modelVersion>
<name>Simple Project for Connecting to Cassandra and doing operations</name>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency> <!-- Spark dependency -->
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.5.2</version>
</dependency>
<!--Spark Cassandra Connector-->
<dependency>
<groupId>com.datastax.spark</groupId>
<artifactId>spark-cassandra-connector_2.10</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>com.datastax.spark</groupId>
<artifactId>spark-cassandra-connector-java_2.10</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming_2.10</artifactId>
<version>1.5.2</version>
</dependency>
</dependencies>
</project>

Related

ConfigFileApplicationListener is deprecated and can only be used as an EnvironmentPostProcessor

I am trying to create a gateway service integrated with auth service.
api-gateway/pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.16.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.project</groupId>
<artifactId>api-gateway</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>api-gateway</name>
<description>Zuul Gateway</description>
<properties>
<java.version>11</java.version>
<spring-cloud.version>Hoxton.SR9</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
To this project i have added a application called "Common" in the build path.
Had 3 files in common application.
JwtAuthenticationConfig
JwtTokenAuthenticationFilter
JwtUsernamePasswordAuthenticationFilter
Source for my work is this.
After running my gateway application i am facing following error.
19:09:27.281 [main] DEBUG org.springframework.boot.context.logging.ClasspathLoggingApplicationListener - Application failed to start with classpath: [file:/F:/eclipse-jee-2018-09-win32-x86_64/eclipse-workspace/Project/api-gateway/api-gateway/target/classes/, file:/F:/eclipse-jee-2018-09-win32-x86_64/eclipse-workspace/Project/common/common/target/classes/, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-security/2.4.0/spring-boot-starter-security-2.4.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter/2.4.0/spring-boot-starter-2.4.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot/2.4.0/spring-boot-2.4.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.4.0/spring-boot-autoconfigure-2.4.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.4.0/spring-boot-starter-logging-2.4.0.jar, file:/C:/Users/Sreenivas/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar, file:/C:/Users/Sreenivas/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar, file:/C:/Users/Sreenivas/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.13.3/log4j-to-slf4j-2.13.3.jar, file:/C:/Users/Sreenivas/.m2/repository/org/apache/logging/log4j/log4j-api/2.13.3/log4j-api-2.13.3.jar, file:/C:/Users/Sreenivas/.m2/repository/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30.jar, file:/C:/Users/Sreenivas/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar, file:/C:/Users/Sreenivas/.m2/repository/org/yaml/snakeyaml/1.27/snakeyaml-1.27.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-aop/5.3.1/spring-aop-5.3.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-beans/5.3.1/spring-beans-5.3.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/security/spring-security-config/5.4.1/spring-security-config-5.4.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-context/5.3.1/spring-context-5.3.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/security/spring-security-web/5.4.1/spring-security-web-5.4.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-expression/5.3.1/spring-expression-5.3.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.4.0/spring-boot-starter-web-2.4.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.4.0/spring-boot-starter-json-2.4.0.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.11.3/jackson-datatype-jdk8-2.11.3.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.11.3/jackson-datatype-jsr310-2.11.3.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.11.3/jackson-module-parameter-names-2.11.3.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.4.0/spring-boot-starter-tomcat-2.4.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.39/tomcat-embed-core-9.0.39.jar, file:/C:/Users/Sreenivas/.m2/repository/org/glassfish/jakarta.el/3.0.3/jakarta.el-3.0.3.jar, file:/C:/Users/Sreenivas/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.39/tomcat-embed-websocket-9.0.39.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-web/5.3.1/spring-web-5.3.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-webmvc/5.3.1/spring-webmvc-5.3.1.jar, file:/C:/Users/Sreenivas/.m2/repository/io/jsonwebtoken/jjwt/0.9.1/jjwt-0.9.1.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.11.3/jackson-databind-2.11.3.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.11.3/jackson-annotations-2.11.3.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.11.3/jackson-core-2.11.3.jar, file:/C:/Users/Sreenivas/.m2/repository/org/projectlombok/lombok/1.18.16/lombok-1.18.16.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-test/2.4.0/spring-boot-starter-test-2.4.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-test/2.4.0/spring-boot-test-2.4.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-test-autoconfigure/2.4.0/spring-boot-test-autoconfigure-2.4.0.jar, file:/C:/Users/Sreenivas/.m2/repository/com/jayway/jsonpath/json-path/2.4.0/json-path-2.4.0.jar, file:/C:/Users/Sreenivas/.m2/repository/net/minidev/json-smart/2.3/json-smart-2.3.jar, file:/C:/Users/Sreenivas/.m2/repository/net/minidev/accessors-smart/1.2/accessors-smart-1.2.jar, file:/C:/Users/Sreenivas/.m2/repository/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar, file:/C:/Users/Sreenivas/.m2/repository/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar, file:/C:/Users/Sreenivas/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3.jar, file:/C:/Users/Sreenivas/.m2/repository/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2.jar, file:/C:/Users/Sreenivas/.m2/repository/org/assertj/assertj-core/3.18.1/assertj-core-3.18.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/hamcrest/hamcrest/2.2/hamcrest-2.2.jar, file:/C:/Users/Sreenivas/.m2/repository/org/junit/jupiter/junit-jupiter/5.7.0/junit-jupiter-5.7.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.7.0/junit-jupiter-api-5.7.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/junit/platform/junit-platform-commons/1.7.0/junit-platform-commons-1.7.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.7.0/junit-jupiter-params-5.7.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.7.0/junit-jupiter-engine-5.7.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/junit/platform/junit-platform-engine/1.7.0/junit-platform-engine-1.7.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/mockito/mockito-core/3.6.0/mockito-core-3.6.0.jar, file:/C:/Users/Sreenivas/.m2/repository/net/bytebuddy/byte-buddy/1.10.18/byte-buddy-1.10.18.jar, file:/C:/Users/Sreenivas/.m2/repository/net/bytebuddy/byte-buddy-agent/1.10.18/byte-buddy-agent-1.10.18.jar, file:/C:/Users/Sreenivas/.m2/repository/org/objenesis/objenesis/3.1/objenesis-3.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/mockito/mockito-junit-jupiter/3.6.0/mockito-junit-jupiter-3.6.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/skyscreamer/jsonassert/1.5.0/jsonassert-1.5.0.jar, file:/C:/Users/Sreenivas/.m2/repository/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-core/5.3.1/spring-core-5.3.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-jcl/5.3.1/spring-jcl-5.3.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-test/5.3.1/spring-test-5.3.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/xmlunit/xmlunit-core/2.7.0/xmlunit-core-2.7.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/security/spring-security-test/5.4.1/spring-security-test-5.4.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/security/spring-security-core/5.4.1/spring-security-core-5.4.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-security/2.1.16.RELEASE/spring-boot-starter-security-2.1.16.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter/2.1.16.RELEASE/spring-boot-starter-2.1.16.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot/2.1.16.RELEASE/spring-boot-2.1.16.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.1.16.RELEASE/spring-boot-autoconfigure-2.1.16.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.1.16.RELEASE/spring-boot-starter-logging-2.1.16.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.11.2/log4j-to-slf4j-2.11.2.jar, file:/C:/Users/Sreenivas/.m2/repository/org/apache/logging/log4j/log4j-api/2.11.2/log4j-api-2.11.2.jar, file:/C:/Users/Sreenivas/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar, file:/C:/Users/Sreenivas/.m2/repository/org/yaml/snakeyaml/1.23/snakeyaml-1.23.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-aop/5.1.17.RELEASE/spring-aop-5.1.17.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-beans/5.1.17.RELEASE/spring-beans-5.1.17.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/security/spring-security-config/5.1.11.RELEASE/spring-security-config-5.1.11.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-context/5.1.17.RELEASE/spring-context-5.1.17.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/security/spring-security-web/5.1.11.RELEASE/spring-security-web-5.1.11.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-expression/5.1.17.RELEASE/spring-expression-5.1.17.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-web/5.1.17.RELEASE/spring-web-5.1.17.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-starter-netflix-eureka-client/2.2.6.RELEASE/spring-cloud-starter-netflix-eureka-client-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-starter/2.2.6.RELEASE/spring-cloud-starter-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-context/2.2.6.RELEASE/spring-cloud-context-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/security/spring-security-crypto/5.1.11.RELEASE/spring-security-crypto-5.1.11.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-commons/2.2.6.RELEASE/spring-cloud-commons-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/security/spring-security-rsa/1.0.9.RELEASE/spring-security-rsa-1.0.9.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.64/bcpkix-jdk15on-1.64.jar, file:/C:/Users/Sreenivas/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.64/bcprov-jdk15on-1.64.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-netflix-hystrix/2.2.6.RELEASE/spring-cloud-netflix-hystrix-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-aop/2.1.16.RELEASE/spring-boot-starter-aop-2.1.16.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/aspectj/aspectjweaver/1.9.6/aspectjweaver-1.9.6.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-netflix-eureka-client/2.2.6.RELEASE/spring-cloud-netflix-eureka-client-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/eureka/eureka-client/1.10.7/eureka-client-1.10.7.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/netflix-commons/netflix-eventbus/0.3.0/netflix-eventbus-0.3.0.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/netflix-commons/netflix-infix/0.3.0/netflix-infix-0.3.0.jar, file:/C:/Users/Sreenivas/.m2/repository/commons-jxpath/commons-jxpath/1.3/commons-jxpath-1.3.jar, file:/C:/Users/Sreenivas/.m2/repository/joda-time/joda-time/2.10.6/joda-time-2.10.6.jar, file:/C:/Users/Sreenivas/.m2/repository/org/antlr/antlr-runtime/3.4/antlr-runtime-3.4.jar, file:/C:/Users/Sreenivas/.m2/repository/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.jar, file:/C:/Users/Sreenivas/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar, file:/C:/Users/Sreenivas/.m2/repository/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar, file:/C:/Users/Sreenivas/.m2/repository/org/apache/commons/commons-math/2.2/commons-math-2.2.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/archaius/archaius-core/0.7.6/archaius-core-0.7.6.jar, file:/C:/Users/Sreenivas/.m2/repository/com/google/guava/guava/29.0-jre/guava-29.0-jre.jar, file:/C:/Users/Sreenivas/.m2/repository/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar, file:/C:/Users/Sreenivas/.m2/repository/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar, file:/C:/Users/Sreenivas/.m2/repository/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1.jar, file:/C:/Users/Sreenivas/.m2/repository/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.jar, file:/C:/Users/Sreenivas/.m2/repository/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar, file:/C:/Users/Sreenivas/.m2/repository/javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/servo/servo-core/0.12.21/servo-core-0.12.21.jar, file:/C:/Users/Sreenivas/.m2/repository/com/sun/jersey/jersey-core/1.19.1/jersey-core-1.19.1.jar, file:/C:/Users/Sreenivas/.m2/repository/com/sun/jersey/jersey-client/1.19.1/jersey-client-1.19.1.jar, file:/C:/Users/Sreenivas/.m2/repository/com/sun/jersey/contribs/jersey-apache-client4/1.19.1/jersey-apache-client4-1.19.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/apache/httpcomponents/httpclient/4.5.12/httpclient-4.5.12.jar, file:/C:/Users/Sreenivas/.m2/repository/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.jar, file:/C:/Users/Sreenivas/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar, file:/C:/Users/Sreenivas/.m2/repository/commons-configuration/commons-configuration/1.10/commons-configuration-1.10.jar, file:/C:/Users/Sreenivas/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar, file:/C:/Users/Sreenivas/.m2/repository/com/google/inject/guice/4.1.0/guice-4.1.0.jar, file:/C:/Users/Sreenivas/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar, file:/C:/Users/Sreenivas/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.10/jackson-annotations-2.9.10.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.10/jackson-core-2.9.10.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.10.5/jackson-databind-2.9.10.5.jar, file:/C:/Users/Sreenivas/.m2/repository/org/codehaus/jettison/jettison/1.3.7/jettison-1.3.7.jar, file:/C:/Users/Sreenivas/.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/eureka/eureka-core/1.10.7/eureka-core-1.10.7.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/woodstox/woodstox-core/5.0.3/woodstox-core-5.0.3.jar, file:/C:/Users/Sreenivas/.m2/repository/org/codehaus/woodstox/stax2-api/3.1.4/stax2-api-3.1.4.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-starter-netflix-archaius/2.2.6.RELEASE/spring-cloud-starter-netflix-archaius-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-netflix-ribbon/2.2.6.RELEASE/spring-cloud-netflix-ribbon-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-netflix-archaius/2.2.6.RELEASE/spring-cloud-netflix-archaius-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-starter-netflix-ribbon/2.2.6.RELEASE/spring-cloud-starter-netflix-ribbon-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/ribbon/ribbon/2.3.0/ribbon-2.3.0.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/ribbon/ribbon-transport/2.3.0/ribbon-transport-2.3.0.jar, file:/C:/Users/Sreenivas/.m2/repository/io/reactivex/rxnetty-contexts/0.4.9/rxnetty-contexts-0.4.9.jar, file:/C:/Users/Sreenivas/.m2/repository/io/reactivex/rxnetty-servo/0.4.9/rxnetty-servo-0.4.9.jar, file:/C:/Users/Sreenivas/.m2/repository/io/reactivex/rxnetty/0.4.9/rxnetty-0.4.9.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/ribbon/ribbon-core/2.3.0/ribbon-core-2.3.0.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/ribbon/ribbon-httpclient/2.3.0/ribbon-httpclient-2.3.0.jar, file:/C:/Users/Sreenivas/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/ribbon/ribbon-loadbalancer/2.3.0/ribbon-loadbalancer-2.3.0.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/netflix-commons/netflix-statistics/0.1.1/netflix-statistics-0.1.1.jar, file:/C:/Users/Sreenivas/.m2/repository/io/reactivex/rxjava/1.3.8/rxjava-1.3.8.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-starter-loadbalancer/2.2.6.RELEASE/spring-cloud-starter-loadbalancer-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-loadbalancer/2.2.6.RELEASE/spring-cloud-loadbalancer-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-validation/2.1.16.RELEASE/spring-boot-starter-validation-2.1.16.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/io/projectreactor/reactor-core/3.2.19.RELEASE/reactor-core-3.2.19.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/io/projectreactor/addons/reactor-extra/3.2.4.RELEASE/reactor-extra-3.2.4.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-cache/2.1.16.RELEASE/spring-boot-starter-cache-2.1.16.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-context-support/5.1.17.RELEASE/spring-context-support-5.1.17.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/com/stoyanr/evictor/1.0.0/evictor-1.0.0.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/ribbon/ribbon-eureka/2.3.0/ribbon-eureka-2.3.0.jar, file:/C:/Users/Sreenivas/.m2/repository/com/thoughtworks/xstream/xstream/1.4.13/xstream-1.4.13.jar, file:/C:/Users/Sreenivas/.m2/repository/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar, file:/C:/Users/Sreenivas/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-starter-netflix-zuul/2.2.6.RELEASE/spring-cloud-starter-netflix-zuul-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-netflix-zuul/2.2.6.RELEASE/spring-cloud-netflix-zuul-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/netflix-commons/netflix-commons-util/0.3.0/netflix-commons-util-0.3.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.1.16.RELEASE/spring-boot-starter-web-2.1.16.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.1.16.RELEASE/spring-boot-starter-json-2.1.16.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.9.10/jackson-datatype-jdk8-2.9.10.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.10/jackson-datatype-jsr310-2.9.10.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.10/jackson-module-parameter-names-2.9.10.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.1.16.RELEASE/spring-boot-starter-tomcat-2.1.16.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.37/tomcat-embed-core-9.0.37.jar, file:/C:/Users/Sreenivas/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/9.0.37/tomcat-embed-el-9.0.37.jar, file:/C:/Users/Sreenivas/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.37/tomcat-embed-websocket-9.0.37.jar, file:/C:/Users/Sreenivas/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.20.Final/hibernate-validator-6.0.20.Final.jar, file:/C:/Users/Sreenivas/.m2/repository/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar, file:/C:/Users/Sreenivas/.m2/repository/org/jboss/logging/jboss-logging/3.3.3.Final/jboss-logging-3.3.3.Final.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/classmate/1.4.0/classmate-1.4.0.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-webmvc/5.1.17.RELEASE/spring-webmvc-5.1.17.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-starter-actuator/2.1.16.RELEASE/spring-boot-starter-actuator-2.1.16.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-actuator-autoconfigure/2.1.16.RELEASE/spring-boot-actuator-autoconfigure-2.1.16.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/boot/spring-boot-actuator/2.1.16.RELEASE/spring-boot-actuator-2.1.16.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/io/micrometer/micrometer-core/1.1.16/micrometer-core-1.1.16.jar, file:/C:/Users/Sreenivas/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.9/HdrHistogram-2.1.9.jar, file:/C:/Users/Sreenivas/.m2/repository/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/cloud/spring-cloud-starter-netflix-hystrix/2.2.6.RELEASE/spring-cloud-starter-netflix-hystrix-2.2.6.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/hystrix/hystrix-core/1.5.18/hystrix-core-1.5.18.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/hystrix/hystrix-serialization/1.5.18/hystrix-serialization-1.5.18.jar, file:/C:/Users/Sreenivas/.m2/repository/com/fasterxml/jackson/module/jackson-module-afterburner/2.9.10/jackson-module-afterburner-2.9.10.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/hystrix/hystrix-metrics-event-stream/1.5.18/hystrix-metrics-event-stream-1.5.18.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/hystrix/hystrix-javanica/1.5.18/hystrix-javanica-1.5.18.jar, file:/C:/Users/Sreenivas/.m2/repository/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar, file:/C:/Users/Sreenivas/.m2/repository/io/reactivex/rxjava-reactive-streams/1.2.1/rxjava-reactive-streams-1.2.1.jar, file:/C:/Users/Sreenivas/.m2/repository/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.jar, file:/C:/Users/Sreenivas/.m2/repository/com/netflix/zuul/zuul-core/1.3.1/zuul-core-1.3.1.jar, file:/C:/Users/Sreenivas/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-core/5.1.17.RELEASE/spring-core-5.1.17.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/spring-jcl/5.1.17.RELEASE/spring-jcl-5.1.17.RELEASE.jar, file:/C:/Users/Sreenivas/.m2/repository/org/springframework/security/spring-security-core/5.1.11.RELEASE/spring-security-core-5.1.11.RELEASE.jar]
19:09:27.297 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
java.lang.IllegalStateException: ConfigFileApplicationListener [org.springframework.boot.context.config.ConfigFileApplicationListener] is deprecated and can only be used as an EnvironmentPostProcessor
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:198)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:203)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:196)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:170)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:148)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:82)
at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:63)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:62)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:362)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:144)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:212)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:117)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:74)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:203)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:196)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:170)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:148)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:82)
at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:63)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:362)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1309)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1298)
at com.project.apigateway.ApiGatewayApplication.main(ApiGatewayApplication.java:12)
Help me in solving this.
Problem Resolved.
Actually common application and Api-gateway application are in different spring versions.
After changing version of common and correctly including it in api-gateway application solved my issue.
Thanks.

GAE - Class not found: Caused by: java.lang.ClassNotFoundExceptionAppIdentityCredential$AppEngineCredentialWrapper

I'm trying to launch a simple Java (Maven) Spring Boot application on GAE that communicates with an PostrgreSql server (also on the Cloud Platform) however I keep running into missing dependencies.
I had these dependencies in my pom:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter</artifactId>
<version>1.1.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-sql-postgresql</artifactId>
<version>1.1.3.RELEASE</version>
</dependency>
But whenever I deployed the app to GAE and the FlyWay the following was thrown:
java.lang.ClassNotFoundException: com.google.appengine.api.ThreadManager
I mainly followed the Baeldung tutorial here: https://www.baeldung.com/spring-boot-google-app-engine.
Then I found this answer: AppEngine ClassNotFoundException: com.google.appengine.api.datastore.DatastoreServiceFactory
Which led me to adding the appengine dependency:
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.9.77</version>
</dependency>
Which then throws:
ClassNotFoundException: com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential$AppEngineCredentialWrapper
Which then led me to adding the client dependency.. and so on.. and so on..
My complete set of dependencies is now:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud</artifactId>
<version>0.47.0-alpha</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.9.77</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter</artifactId>
<version>1.1.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-sql-postgresql</artifactId>
<version>1.1.3.RELEASE</version>
</dependency>
And that.. leads back to the exception above:
ClassNotFoundException: com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential$AppEngineCredentialWrapper
So it is probably a dependency problem but I cannot for the life of my find any documentation about which dependencies you need to add to get a simple Spring Boot application running to a PostgreSQL server.
I'm about to throw in the towel...
It might be a lack of sleep though
You are missing the App Engine plugin in your pom.xml :
<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.3.2</version>
</plugin>
</plugins>
</build>
And for the exception you get, I do not know exactly where are you using this but you can add the dependency :
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-oauth2-http</artifactId>
<version>0.18.0</version>
</dependency>

Spring Boot & Elastic client - NoSuchMethodError: org.elasticsearch.action.support.IndicesOptions.ignoreThrottled()Z

We created a Spring Boot 2.1.7.RELEASE app with an ElasticSearch 7.3.0 client.
When trying to run the Elastic client we get the following error for this line:
SearchResponse searchResponse = client.search(searchRequest, RequestOptions.DEFAULT);
Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.elasticsearch.action.support.IndicesOptions.ignoreThrottled()Z] with root cause
java.lang.NoSuchMethodError: org.elasticsearch.action.support.IndicesOptions.ignoreThrottled()Z
at org.elasticsearch.client.RequestConverters$Params.withIndicesOptions(RequestConverters.java:966)
at org.elasticsearch.client.RequestConverters.addSearchRequestParams(RequestConverters.java:417)
at org.elasticsearch.client.RequestConverters.search(RequestConverters.java:404)
at org.elasticsearch.client.RestHighLevelClient.lambda$search$2(RestHighLevelClient.java:932)
at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1450)
at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1424)
at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1394)
at org.elasticsearch.client.RestHighLevelClient.search(RestHighLevelClient.java:930)
We are using these dependencies:
<properties>
<spring-boot-version>2.1.7.RELEASE</spring-boot-version>
<elasticsearch.version>7.0.0</elasticsearch.version>
</properties>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring-boot-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>${spring-boot-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<version>${spring-boot-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring-boot-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>7.3.0</version>
</dependency>
We found this post that caused us to add the elasticsearch.version property, but it didn't help.
We also run mvn dependency:tree -Dverbose to see if there is a conjunction of Elastic dependencies, but it seems that only the Elastic Client has Elastic related jar.
UPDATE
Following this post we tried to downgrade the Elastic client version to 7.1.1 but it didn't help
Following this answer here, we discovered that the Elastic server has a 6.5.4 version.
Changing the dependency to
<elasticsearch.version>6.5.4</elasticsearch.version>
Or
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>${elasticsearch.version}</version>
</dependency>
Solved the issue.

Spark Cassandra connector base simple program getting spark logging error

I was trying a very basic hello world program for java+spark+cassandra.
Initially I had some mixed versions of libraries which caused the NoSuchMethodError (#5). When I got the versions right, I get the noclassdefound error for spark logging (#4). This is from the cassandra connector code. I have built it from the b2.3 branch of github which is only couple of commits behind the master(using sbt).
All solutions for spark logging issue point to moving to older versions. This is not a practical solution for us as we need to figure this out for future development.
Wonder why the latest stable build of cassandra connector refers to spark logging which is no longer available now??.
Any help is appreciated.
Spark version: 2.3.0
Cassandra: 3.9.0
The relevant code snippet is pasted below.
#1 SparkConf sparkConf = new SparkConf().setAppName("appname")
.setMaster("local");
#2 sparkConf.set("spark.cassandra.connection.host", "127.0.0.1");
#3 JavaSparkContext ctx = new JavaSparkContext(sparkConf);
#4 CassandraConnector connector = CassandraConnector.apply(ctx.getConf()); <<<< org/apache/spark/logging noclassdeffound error
#5 try (Session session = connector.openSession()) { <<< nosuchmethoderror: scala.runtime.objectref.zero()lscala/runtime/objectref
The POM is below
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.mygroup
apache-spark
1.0-SNAPSHOT
jar
apache-spark
http://maven.apache.org
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.11</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.11</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming_2.11</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>com.datastax.spark</groupId>
<artifactId>spark-cassandra-connector-java_2.11</artifactId>
<version>1.6.0-M1</version>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.11.0</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<org.apache.spark.spark-core.version>2.2.1</org.apache.spark.spark-core.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
First thing to fix is
<dependency>
<groupId>com.datastax.spark</groupId>
<artifactId>spark-cassandra-connector-java_2.11</artifactId>
<version>1.6.0-M1</version>
</dependency>
Which does not match any of your other build versions. The Java module was merged into the main artifact. You also shouldn't include the java driver module on it's own since this will most likely have issue with guava inclusions.
Take a look at
https://github.com/datastax/SparkBuildExamples/blob/master/scala/maven/oss/pom.xml for example pom files.

Vertx2: org.vertx.java.platform.impl.cli.Starter

I'm writing a "Hello-World" application in Vertx2.
I have the following dependencies in pom.xml:
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-platform</artifactId>
<version>2.0.0-beta1</version>
</dependency>
and run it as IntelliJ application with the following configuration:
I get the error:
Exception in thread "main" java.lang.NoSuchMethodError:
org.vertx.java.core.impl.VertxInternal.getOrAssignContext()Lorg/vertx/java/core/impl/DefaultContext;
Do you know what is the problem here?
Edit:
This project is for Vertx version 2 (not version 3). This is why the solution in this IntelliJ and Vertx: How to run org.vertx.java.deploy.impl.cli.Starter ? doesn't resolve the issue.
I found a solution to this problem. I just changed the version numbers for vertx-core and vertx-platform, and now it works.
The new dependencies in pom.xml are:
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>2.1RC3</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-platform</artifactId>
<version>2.1.5</version>
</dependency>

Categories

Resources