Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.LinkageError: loader constraint violation: when resolving method "com.atlassian.fugue.Opti

Katleen Thiele June 12, 2018

Hello,

i write an Confluence Plugin that uses the:

jira-rest-java-client-core

Confluence startet and my macro is enable but when i try to add my macro to a Page the following Error occured:

[INFO] [talledLocalContainer] 2018-06-12 10:35:38,167 ERROR [http-nio-1990-exec-18] [xhtml.view.macro.ViewMacroMarshaller] handleMacroExecutionException Error rendering macro: helloworld
[INFO] [talledLocalContainer]  -- referer: http://deberpww0055:1990/confluence/pages/resumedraft.action?draftId=786433&draftShareId=c421783d-6dfb-4367-9a7b-3f917c016bd2 | url: /confluence/rest/tinymce/1/macro/preview | traceId: 57b447f76cdd1e2a | userName: admi
n
[INFO] [talledLocalContainer] java.lang.LinkageError: loader constraint violation: when resolving method "com.atlassian.fugue.Option.fold(Lcom/google/common/base/Supplier;Lcom/google/common/base/Function;)Ljava/lang/Object;" the class loader (instance of org/ap
ache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) of the current class, com/atlassian/httpclient/apache/httpcomponents/proxy/ProxyConfigFactory, and the class loader (instance of org/apache/catalina/loader/WebappClassLoader) for the method's definin
g class, com/atlassian/fugue/Option, have different Class objects for the type com/google/common/base/Supplier used in the signature
[INFO] [talledLocalContainer]   at com.atlassian.httpclient.apache.httpcomponents.proxy.ProxyConfigFactory.getProxyHost(ProxyConfigFactory.java:16)
[INFO] [talledLocalContainer]   at com.atlassian.httpclient.apache.httpcomponents.ApacheAsyncHttpClient.<init>(ApacheAsyncHttpClient.java:215)
[INFO] [talledLocalContainer]   at com.atlassian.httpclient.apache.httpcomponents.ApacheAsyncHttpClient.<init>(ApacheAsyncHttpClient.java:126)
[INFO] [talledLocalContainer]   at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.doCreate(DefaultHttpClientFactory.java:73)
[INFO] [talledLocalContainer]   at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.create(DefaultHttpClientFactory.java:39)
[INFO] [talledLocalContainer]   at com.atlassian.jira.rest.client.internal.async.AsynchronousHttpClientFactory.createClient(AsynchronousHttpClientFactory.java:65)
[INFO] [talledLocalContainer]   at com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory.create(AsynchronousJiraRestClientFactory.java:36)

here are my pom dependencies with several <!-- --> what i have try out:

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<!--version>4.1.7.RELEASE</version-->
<version>5.0.4.RELEASE</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.atlassian.confluence</groupId>
<artifactId>confluence</artifactId>
<version>${confluence.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<!--exclusion>
<groupId>com.atlassian.fugue</groupId>
<artifactId>fugue</artifactId>
</exclusion-->
</exclusions>
</dependency>

<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-runtime</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>

<!-- WIRED TEST RUNNER DEPENDENCIES -->
<dependency>
<groupId>com.atlassian.plugins</groupId>
<artifactId>atlassian-plugins-osgi-testrunner</artifactId>
<version>${plugin.testrunner.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2-atlassian-1</version>
<scope>provided</scope>
</dependency>

<!--dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-api</artifactId>
<version>5.0.4</version>
<scope>provided</scope>
</dependency-->

<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>5.0.4</version>
<!--version>4.0.0</version-->
<scope>compile</scope>
<exclusions>
<!--exclusion>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-api</artifactId>
</exclusion-->
<exclusion>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</exclusion>
<exclusion>
<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.atlassian.event</groupId>
<artifactId>atlassian-event</artifactId>
</exclusion>
<exclusion>
<groupId>com.atlassian.util.concurrent</groupId>
<artifactId>atlassian-util-concurrent</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</exclusion>
<!--exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
</exclusion-->
<exclusion>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.atlassian.fugue</groupId>
<artifactId>fugue</artifactId>
<!--version>2.6.1</version-->
<version>3.0.0-m007</version>
<scope>provided</scope>
</dependency>
</dependencies>

 java snippet:

AsynchronousJiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
URI uri = new URI("http://localhost:2990/jira/");

AuthenticationHandler auth = new BasicHttpAuthenticationHandler("admin", "admin");

JiraRestClient client;
client = factory.create(uri, auth);

 

I hope someone can help me because I don't know what i can do to solve this Error.

Regards

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events