Failed to connect jira api: failed to access class org.apache.http.impl.client.cache.BasicHttpCache from class CachingHttpAsyncClient - httpclient

I faced an issue durring connecting to jira api by existing code on ear application using application server wildfly19.0.1.Final :
1- the added code :
AsynchronousJiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
IssueRestClient client= factory.createWithBasicHttpAuthentication(URI.create("https://jiralink.com"), "username", "password");
2- Pom xml file dendencies:
<dependency>
<groupId>com.atlassian.event</groupId>
<artifactId>atlassian-event</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>com.atlassian.httpclient</groupId>
<artifactId>atlassian-httpclient-api</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.atlassian.httpclient</groupId>
<artifactId>atlassian-httpclient-library</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-api</artifactId>
<version>5.2.0</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>5.2.0</version>
</dependency>
<dependency>
<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>io.atlassian.fugue</groupId>
<artifactId>fugue</artifactId>
<version>4.7.2</version>
</dependency>
<dependency>
<groupId>io.atlassian.util.concurrent</groupId>
<artifactId>atlassian-util-concurrent</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient-cache</artifactId>
<version>4.1.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-cache</artifactId>
<version>4.5.5</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient</artifactId>
<version>4.1.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-nio</artifactId>
<version>4.4.10</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
<version>1.1</version>
</dependency>
the issue:
Caused by: java.lang.IllegalAccessError: failed to access class org.apache.http.impl.client.cache.BasicHttpCache from class org.apache.http.impl.client.cache.CachingHttpAsyncClient (org.apache.http.impl.client.cache.BasicHttpCache is in unnamed module of loader 'deployment.MegaPack.ear.httpclient-cache-4.5.5.jar' #51bff63e; org.apache.http.impl.client.cache.CachingHttpAsyncClient is in unnamed module of loader 'deployment.MegaPack.ear.httpasyncclient-cache-4.1.4.jar' #1746dc55)
at org.apache.http.impl.client.cache.CachingHttpAsyncClient.(CachingHttpAsyncClient.java:174) ~[httpasyncclient-cache-4.1.4.jar:4.1.4]
at com.atlassian.httpclient.apache.httpcomponents.ApacheAsyncHttpClient.(ApacheAsyncHttpClient.java:214) ~[atlassian-httpclient-library-2.0.0.jar:?]
at com.atlassian.httpclient.apache.httpcomponents.ApacheAsyncHttpClient.(ApacheAsyncHttpClient.java:102) ~[atlassian-httpclient-library-2.0.0.jar:?]
at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.doCreate(DefaultHttpClientFactory.java:61) ~[atlassian-httpclient-library-2.0.0.jar:?]
at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.create(DefaultHttpClientFactory.java:36) ~[atlassian-httpclient-library-2.0.0.jar:?]
at com.atlassian.jira.rest.client.internal.async.AsynchronousHttpClientFactory.createClient(AsynchronousHttpClientFactory.java:65) ~[jira-rest-java-client-core-5.2.0.jar:?]
at com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory.create(AsynchronousJiraRestClientFactory.java:36) ~[jira-rest-java-client-core-5.2.0.jar:?]
at com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory.createWithBasicHttpAuthentication(AsynchronousJiraRestClientFactory.java:42) ~[jira-rest-java-client-core-5.2.0.jar:?]
it looks like i have an issue with jars compatibilities related to :
org.apache.httpcomponents.httpclient-cache: 4.5.5
any one have an idea by how to correct the issue ?
Thanks,

Related

Error while building NAR with mongo controller service api dependency

I have tried building NAR in apache NIFI. when debugging in local no dependency errors popped up while execution. Post that While building NAR to deploy in production facing the following error.
[ERROR] Failed to execute goal org.apache.nifi:nifi-nar-maven-plugin:1.3.1:nar (default-nar) on project nifi-porter-nar: Execution default-nar of goal org.apache.nifi:nifi-nar-maven-plugin:1.3.1:nar failed: A required class was missing while executing org.apache.nifi:nifi-nar-maven-plugin:1.3.1:nar: org/apache/nifi/mongodb/MongoDBClientService
Below is my NAR pom.xml
<parent>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-custom-processor-porter</artifactId>
<version>4.0.0</version>
</parent>
<artifactId>nifi-porter-nar</artifactId>
<version>4.0.0</version>
<packaging>nar</packaging>
<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
<source.skip>true</source.skip>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-porter-processors</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-standard-services-api-nar</artifactId>
<version>1.12.0</version>
<type>nar</type>
</dependency>
</dependencies>
Dependencies pom.xml
<dependencies>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-utils</artifactId>
<version>1.12.0</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-mock</artifactId>
<version>1.12.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-dbcp-service-api</artifactId>
<version>1.12.0</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-mongodb-client-service-api</artifactId>
<version>1.12.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>bson</artifactId>
<version>4.5.1</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-gcp-services-api</artifactId>
<version>1.12.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.8</version>
</dependency>
</dependencies>
Can anyone help me in building the NAR successfully?
Note: Tried this solution too, but couldn't resolve

Spring's ConstructorResolver#instantiateUsingFactoryMethod ignoring spring.mongodb.embedded.version for embedded mongodb

I'm trying to run a Spring Boot application with an embedded mongodb (not just for testing, but live). It was working fine until I decided to modernize to use latest available Spring jars, etc. Upgrading to Spring Boot 2.6.1 I now get an 'IllegalStateException: Set the spring.mongodb.embedded.version property or define your own MongodConfig bean to use embedded MongoDB' from EmbeddedMongoAutoConfiguration#determineVersion, where my application.properties entry for 'spring.mongodb.embedded.version=3.6.3' is being reported as null. Tracing back to ConstructorResolver#instantiateUsingFactoryMethod I see it passes in an EmbeddedMongoProperties with null 'version'. That method is way over my head but I believe it is the cause. I suspect it's somehow using the older MongoProperties which does not have version but I'm not sure. I've been debugging for hours and I'm not getting anywhere fast. Any help appreciated.
application.properties:
server.port=8090
spring.mongodb.embedded.version=3.6.3
spring.mongodb.embedded.features=SYNC_DELAY,NO_HTTP_INTERFACE_ARG
spring.datasource.driver-class-name=mongodb.jdbc.MongoDriver
#spring.data.mongodb.uri=mongodb://127.0.0.1:27017
spring.data.mongodb.database=jokes
spring.data.mongodb.host=127.0.0.1
spring.data.mongodb.port=27017
#spring.data.mongodb.username=craig
#spring.data.mongodb.password=***
#spring.data.mongodb.authentication-database=admin
spring.mongodb.embedded.storage.database-dir=/home/craig/.ca.footeware.web-mongodb/
pom.xml dependencies:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
</dependency>
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<!-- exclude junit 4 -->
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-imaging</artifactId>
<version>1.0-alpha2</version>
</dependency>
</dependencies>
Please add below lines to test class.
#DataMongoTest
#ImportAutoConfiguration(exclude = EmbeddedMongoAutoConfiguration.class)

Spring boot embedded kafka throws error BeanCreationException

I have a test case with following configured kafka properties:
#ExtendWith(SpringExtension.class)
#SpringBootTest(classes = {Application.class})
#ActiveProfiles("test")
#EnableConfigurationProperties
#EmbeddedKafka(controlledShutdown = true, topics = {"topic1", "topic2", "topic3"})
class Name {}
Here is the build error i get when running the test case above:
Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'embeddedKafka': Invocation of init method failed; nested exception is java.lang.NoSuchFieldError: DEFAULT_SASL_ENABLED_MECHANISMS
Caused by: java.lang.NoSuchFieldError: DEFAULT_SASL_ENABLED_MECHANISMS
at kafka.server.Defaults$.<clinit>(KafkaConfig.scala:242)
at kafka.server.KafkaConfig$.<clinit>(KafkaConfig.scala:961)
at kafka.server.KafkaConfig.LogDirProp(KafkaConfig.scala)
at org.springframework.kafka.test.EmbeddedKafkaBroker.afterPropertiesSet(EmbeddedKafkaBroker.java:322)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1853)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1790)
... 72 common frames omitted
Here is the POM file with spring kafka & kafka-client dependency which is likely causing the error:
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
<version>2.7.7</version>
<exclusions>
<exclusion>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka-test</artifactId>
<version>2.7.7</version>
<scope>test</scope>
</dependency>
Solution:
Please refer to this link:
https://docs.spring.io/spring-kafka/docs/current/reference/html/#update-deps
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
<version>2.7.7</version>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka-test</artifactId>
<version>2.7.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>2.8.1</version>
<classifier>test</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.13</artifactId>
<version>2.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.13</artifactId>
<version>2.8.1</version>
<classifier>test</classifier>
<scope>test</scope>
</dependency>
```
That spring-Kafka version is not compatible with Apache Kafka client 3.0. You need still coming 2.8 and Spring Boot 2.6.
On the other hand you don’t need newer client even if you use newer broker . Although the story is about embedded testing, so I fully doubt you need to worry about any client, unless it is something transitive from Spring for Apache Kafka…

Quarkus runtime does not inject EntityManager

I have tried #PersistenceContext, #PersistenceUnit, and #Inject combinations but nothing works. #Inject fails maven-quarkus-plugin build:
[ERROR] Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type javax.persistence.EntityManager and qualifiers [#Default]
I have tried with and without persistence.xml.
My datasource and application.properties work fine, as I can just inject a AgroalDataSource and do direct JDBC, but I want to port over my JPA Entity classes and use them.
my parent module pom
<!-- versions set by quarkus-bom, but they don't pass in, when changing quarkus version, update this from quarkus bom -->
<properties>
<quarkus.version>1.0.0.CR1</quarkus.version>
<agroal.version>1.7</agroal.version>
<jakarta.enterprise.cdi-api.version>2.0.2</jakarta.enterprise.cdi-api.version>
<jboss-jaxrs-api_2.1_spec.version>2.0.1.Final</jboss-jaxrs-api_2.1_spec.version>
<jboss-logging.version>3.3.2.Final</jboss-logging.version>
<jboss-threads.version>3.0.0.Final</jboss-threads.version>
<smallrye-config.version>1.3.9</smallrye-config.version>
<wildfly-common.version>1.5.0.Final-format-001</wildfly-common.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-universe-bom</artifactId>
<version>${quarkus.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
my pom
<dependencies>
<dependency>
<groupId>com.lmco.is3.cs</groupId>
<artifactId>datatypes</artifactId>
<exclusions>
<exclusion>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion>
</exclusions>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.lmco.is3.cs</groupId>
<artifactId>utils</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.lmco.is3.nc</groupId>
<artifactId>netcentric-if</artifactId>
<version>1.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.spec.javax.websocket</groupId>
<artifactId>jboss-websocket-api_1.1_spec</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>io.agroal</groupId>
<artifactId>agroal-api</artifactId>
<version>${agroal.version}</version>
</dependency>
<dependency>
<groupId>io.agroal</groupId>
<artifactId>agroal-narayana</artifactId>
<version>${agroal.version}</version>
</dependency>
<dependency>
<groupId>io.agroal</groupId>
<artifactId>agroal-pool</artifactId>
<version>${agroal.version}</version>
</dependency>
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-config</artifactId>
<version>${smallrye-config.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-agroal</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-artemis-jms</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-orm</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-jsonb</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>${jboss-logging.version}</version>
</dependency>
<dependency>
<groupId>org.wildfly.common</groupId>
<artifactId>wildfly-common</artifactId>
<version>${wildfly-common.version}</version>
</dependency>
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<version>${jakarta.enterprise.cdi-api.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.ws.rs</groupId>
<artifactId>jboss-jaxrs-api_2.1_spec</artifactId>
<version>${jboss-jaxrs-api_2.1_spec.version}</version>
</dependency>
application.properties
# Configures the Artemis properties.
quarkus.artemis.url=tcp://mq:61616?type=CF
quarkus.artemis.username=artemis
quarkus.artemis.password=simetraehcapa
quarkus.datasource.url=jdbc:postgresql://db:5432/stsdb
quarkus.datasource.driver=org.postgresql.Driver
quarkus.datasource.username=appuser
quarkus.datasource.password=appuser
quarkus.resteasy.gzip.enabled=true
quarkus.resteasy.gzip.max-input=10M
quarkus.log.category."com.lmco.is3.nc.micro.clock".level=INFO
I figured it out! Not real "intuitive", but I had not migrated over any Entity classes yet. All it took was to put one class in scope and everything started working. So much for simple prototyping. Maybe it should have warned "no entity classes found".
Friend, I had the same problem. Here's what I did that worked for me, I hope to help you:
added on application.properties
quarkus.hibernate-orm."db".packages = packages with their entities
example:
quarkus.hibernate-orm."db".packages=br.com.application.base.models
in my repositories:
#ApplicationScoped
#ActivateRequestContext
public class HeaderRepository {
#PersistenceUnit("db")
EntityManager entityManager;
I hope to help you
following documentation: https://quarkus.io/guides/hibernate-orm
thanks

How to enable Apache Ignite REST API on Springboot application?

I'm developing distributed computing application with Apache Ignite and Springboot and wanna use ignite REST API.
Below is my dev spec.
java 1.8
springboot 1.5.6
ignite 2.1.0
I added dependency ignite-rest-http(2.1.0 ver.) on my pom file.
But there is one problem at starting my springboot application.
Here is error log.
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ignite.Ignite]: Factory method 'igniteInstance' threw exception; nested exception is java.lang.NoSuchMethodError: org.eclipse.jetty.util.log.StdErrLog.setProperties(Ljava/util/Properties;)V
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
... 35 common frames omitted
Caused by: java.lang.NoSuchMethodError: org.eclipse.jetty.util.log.StdErrLog.setProperties(Ljava/util/Properties;)V
at org.apache.ignite.internal.processors.rest.protocols.http.jetty.GridJettyRestProtocol.<clinit>(GridJettyRestProtocol.java:72)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.ignite.internal.processors.rest.GridRestProcessor.startHttpProtocol(GridRestProcessor.java:864)
at org.apache.ignite.internal.processors.rest.GridRestProcessor.start(GridRestProcessor.java:477)
at org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1788)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:937)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1896)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1648)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1076)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:574)
at org.apache.ignite.IgniteSpring.start(IgniteSpring.java:66)
at com.ssg.framework.config.ignite.IgniteDefaultConfiguration.igniteInstance(IgniteDefaultConfiguration.java:59)
at com.ssg.framework.config.ignite.IgniteDataConfiguration$$EnhancerBySpringCGLIB$$84d5bde0.CGLIB$igniteInstance$7(<generated>)
at com.ssg.framework.config.ignite.IgniteDataConfiguration$$EnhancerBySpringCGLIB$$84d5bde0$$FastClassBySpringCGLIB$$a827740d.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
at com.ssg.framework.config.ignite.IgniteDataConfiguration$$EnhancerBySpringCGLIB$$84d5bde0.igniteInstance(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
... 36 common frames omitted
In StdErrLog class, there is not 'setProperties(Properties)' method, but is called in GridJettyRestProtocol class.
I can't understand how it was built without syntax error.
Anyway, is there anyone who has solution?
============================================================================
I added my pom file below.
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-spring</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-indexing</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-spring-data</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-urideploy</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
</dependency>
<dependency>
<groupId>org.lazyluke</groupId>
<artifactId>log4jdbc-remix</artifactId>
</dependency>
<dependency>
<groupId>org.bgee.log4jdbc-log4j2</groupId>
<artifactId>log4jdbc-log4j2-jdbc4.1</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
</dependency>
<dependency>
<groupId>net.openhft</groupId>
<artifactId>compiler</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
</dependency>
<dependency>
<groupId>com.esotericsoftware</groupId>
<artifactId>reflectasm</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-rest-http</artifactId>
<version>2.1.0</version>
</dependency>
</dependencies>
ignite-rest-http module depends on Jetty 9.2.11.v20150529. Your error most likely means that there is already another version of Jetty on classpath and they conflict with each other. You should check your Maven (or Gradle, etc.) project go get to the bottom of this.
If you use spring boot 2.0.0+ then it has a dependency on jetty-bom which is only available in maven central since v9.3.19...
Ignites 2.6.0 uses jetty 9.2.11...
A quick and dirty workaround is to setup jetty like this, where jetty.base.version is the version Ignite uses. ex Ignite v2.6.0 this = 9.2.11.v20150529.
This way the jetty-bom gets resolved but not used.
The correct jetty libs for Ignite are loaded.
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-bom</artifactId>
<version>9.4.12.v20180830</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-continuation</artifactId>
<version>${jetty.base.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
<version>${jetty.base.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-io</artifactId>
<version>${jetty.base.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty.base.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>${jetty.base.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-xml</artifactId>
<version>${jetty.base.version}</version>
<scope>compile</scope>
</dependency>