I'm still struggling quite a lot with packaging a library I need in my project as OSGi bundle. I've asked already about it here. The answer there is good enough for sure, but again, I have another problem I don't understand and can't break it down :(
I have the library finally packaged as OSGi bundle, I have identified all need dependencies and all that is now together in one complete jar archive.
Now if I try some function which uses the library, an exception is raised because this:
Caused by: java.lang.ClassFormatError: javax/ws/rs/core/UriBuilder
at com.atlassian.jira.rest.client.internal.jersey.JerseyJiraRestClient.<init>(JerseyJiraRestClient.java:61)
at com.atlassian.jira.rest.client.internal.jersey.JerseyJiraRestClientFactory.create(JerseyJiraRestClientFactory.java:34)
at com.atlassian.jira.rest.client.internal.jersey.JerseyJiraRestClientFactory.createWithBasicHttpAuthentication(JerseyJiraRestClientFactory.java:39)
at com.tieto.etb.esb.libs.jiraclient.JiraClient.getClient(JiraClient.java:28)[145:jiraclient.bundle:0.1.0.SNAPSHOT]
at com.tieto.etb.esb.jira.JiraBean.projectInfo(JiraBean.java:38)[142:jira.bundle:0.1.0.SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_35]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_35]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_35]
at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_35]
at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:341)[70:org.apache.camel.camel-core:2.10.1]
at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:238)[70:org.apache.camel.camel-core:2.10.1]
at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:166)[70:org.apache.camel.camel-core:2.10.1]
... 52 more
I'd like to ask you for a hint, what could be the problem there. I guess it is something wrong during building the bundle.
For example, I have another pom for this bundle, there I have as all from compile scope. This bundle is working...
I'll compare the MANIFEST files for both cases, there is maybe still some missing dependencies.