Tycho doesn’t modify the Require-Bundle and Import/Export-Package headers. So if classes can’t be loaded at runtime, you seem to have an error
in these headers.
Note that “it works in the PDE” doesn’t show that your headers are correct. There may be multiple wiring solutions, and the OSGi runtime may happen
to pick a working one by coincidence when the bundles have been exported from the PDE.
It seems your project setup is fairly complicated. I would recommend that you try to reproduce the problem you are seeing in a minimal example,
i.e. with fake bundles that are mostly empty. If this doesn’t help finding the root cause, you may still post the minimal example here – and it will be easier for others to help.
Regards
Tobias
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx]
On Behalf Of Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
Sent: Dienstag, 5. Februar 2013 15:33
To: Tycho user list
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application
Sorry, that comment was wrong — the manifest file was not missing, and it is included for reference below along with the one from a PDE build.
I'm wondering if it has something to do with the fact that it's 2 plugins downstream that reexport the plugin that has the missing class, and they all use Require-Bundle
instead of Import-Package.
Plugin A has the class I want
Plugin B includes and reexports plugin A
Plugin C is trying to find the class from plugin A, and it includes plugin B and cannot find the class in plugin A.
Could that setup be the cause of the issues?
The fact that the manifest.mf is missing from the META-INF directory is wrong. You should focus on that. check the build.properties.
On Tue, Feb 5, 2013 at 1:08 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)] <tamar.e.cohen@xxxxxxxx>
wrote:
Sorry strike the previous comment.
My MANIFEST.MF file for the plugin that is providing the missing class files looks like this:
Export-Package: gov.nasa.rapid.v2,gov.nasa.rapid.v2.agent,gov.nasa.rap
id.v2.exception,gov.nasa.rapid.v2.message,gov.nasa.rapid.v2.message.c
ollector,gov.nasa.rapid.v2.message.command,gov.nasa.rapid.v2.message.
helpers,gov.nasa.rapid.v2.message.holders,gov.nasa.rapid.v2.message.p
ublisher,gov.nasa.rapid.v2.preferences,gov.nasa.rapid.v2.system,gov.n
asa.rapid.v2.system.builtin,gov.nasa.rapid.v2.util
Bundle-ActivationPolicy: lazy
Bundle-Name: RAPID Java Bindings v2
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.core.runtime,gov.nasa.dds.rti;visibility:=
reexport,gov.nasa.rapid.idl.dds;visibility:=reexport,gov.nasa.util;vi
Bundle-Version: 1.0.0.201302042334
Bundle-ManifestVersion: 2
Bundle-Activator: gov.nasa.rapid.v2.RapidV2Activator
Bundle-SymbolicName: gov.nasa.rapid.v2
Archiver-Version: Plexus Archiver
The PDE generated similar MANIFEST.MF file looks like this:
Export-Package: gov.nasa.rapid.v2,gov.nasa.rapid.v2.agent,gov.nasa.rap
id.v2.exception,gov.nasa.rapid.v2.message,gov.nasa.rapid.v2.message.c
ollector,gov.nasa.rapid.v2.message.command,gov.nasa.rapid.v2.message.
helpers,gov.nasa.rapid.v2.message.holders,gov.nasa.rapid.v2.message.p
ublisher,gov.nasa.rapid.v2.preferences,gov.nasa.rapid.v2.system,gov.n
asa.rapid.v2.system.builtin,gov.nasa.rapid.v2.util
Require-Bundle: org.eclipse.core.runtime,gov.nasa.dds.rti;visibility:=
reexport,gov.nasa.rapid.idl.dds;visibility:=reexport,gov.nasa.util;vi
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.0.0.201302041435
Bundle-Name: RAPID Java Bindings v2
Bundle-Activator: gov.nasa.rapid.v2.RapidV2Activator
Bundle-ManifestVersion: 2
Bundle-SymbolicName: gov.nasa.rapid.v2
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
There may also be differences in the generated config.ini file.
Thanks for the suggestion. I have done so with the plugin that cannot seem to provide the required Java class, and indeed it contains the expected class files
in the correct directory.
Interestingly enough I note there is a MANIFEST.MF file at the root, but in META-INF there is a maven directory and a maven.mf file.
Check every exported jar. If the size is low (e.g. 1K) then open it to see if it has the expected content. If not then check your build.properties to see if you
have exported everything.
On Tue, Feb 5, 2013 at 12:19 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)] <tamar.e.cohen@xxxxxxxx>
wrote:
I'm new to Tycho and Maven and trying to set up a build for our RCP application, for various platforms.
It APPEARS to have worked; I have followed Lars Vogella's tutorials and I have as a result some lovely jar files and platform specific RCP applications.
When I try to run these, some of the dependencies that are reexported from plugin to plugin are not found by the downstream plugins. When I run with the osgi
console, it does show the plugin that has the classes that are not found as being active.
When I do a comparison export via PDE, everything runs perfectly.
My MANIFEST.MF files are still using Require-Bundle and Export-Package; within the Require-Bundle are some visibility=reexport.
For example the line in the MANIFEST might look like:
my.plugin.basename;visibility=reexport
This line IS included in the output MANIFEST.MF file.
My master pom.xml file uses tycho-maven-plugin and target-platform-configuration.
Any insight would be HUGELY appreciated.
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
|