Discussion:
Problem resolving dependencies with tycho-built RCP application
(too old to reply)
Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
2013-02-04 23:19:36 UTC
Permalink
Hi all

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.

HOWEVER.
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.
Thanks much

Tamar Cohen
Wim Jongman
2013-02-04 23:28:16 UTC
Permalink
HI Tamar,

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.

Regards,

Wim


On Tue, Feb 5, 2013 at 12:19 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian
Post by Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
Hi all
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.
HOWEVER.
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.
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.
Thanks much
Tamar Cohen
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
2013-02-04 23:32:07 UTC
Permalink
Hi Wim
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.
Tamar

From: Wim Jongman <***@gmail.com<mailto:***@gmail.com>>
Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Mon, 4 Feb 2013 17:28:16 -0600
To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

HI Tamar,

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.

Regards,

Wim


On Tue, Feb 5, 2013 at 12:19 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)] <***@nasa.gov<mailto:***@nasa.gov>> wrote:


Hi all

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.

HOWEVER.
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.
Thanks much

Tamar Cohen
Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
2013-02-05 00:08:26 UTC
Permalink
Sorry strike the previous comment.

My MANIFEST.MF file for the plugin that is providing the missing class files looks like this:

Manifest-Version: 1.0
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
Built-By: tecohen
Bundle-Name: RAPID Java Bindings v2
Created-By: Apache Maven
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
sibility:=reexport
Build-Jdk: 1.6.0_33
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:
Manifest-Version: 1.0
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
sibility:=reexport
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.
Any more tips?
Thanks!
Tamar


From: Tamar Cohen <***@nasa.gov<mailto:***@nasa.gov>>
Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Mon, 4 Feb 2013 17:32:07 -0600
To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

Hi Wim
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.
Tamar

From: Wim Jongman <***@gmail.com<mailto:***@gmail.com>>
Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Mon, 4 Feb 2013 17:28:16 -0600
To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

HI Tamar,

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.

Regards,

Wim


On Tue, Feb 5, 2013 at 12:19 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)] <***@nasa.gov<mailto:***@nasa.gov>> wrote:


Hi all

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.

HOWEVER.
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.
Thanks much

Tamar Cohen
Wim Jongman
2013-02-05 13:14:19 UTC
Permalink
The fact that the manifest.mf is missing from the META-INF directory is
wrong. You should focus on that. check the build.properties.

Best regards,

Wim


On Tue, Feb 5, 2013 at 1:08 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian
Post by Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
Sorry strike the previous comment.
My MANIFEST.MF file for the plugin that is providing the missing class
Manifest-Version: 1.0
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
Built-By: tecohen
Bundle-Name: RAPID Java Bindings v2
Created-By: Apache Maven
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
sibility:=reexport
Build-Jdk: 1.6.0_33
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
Manifest-Version: 1.0
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
sibility:=reexport
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.
Any more tips?
Thanks!
Tamar
Date: Mon, 4 Feb 2013 17:32:07 -0600
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application
Hi Wim
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.
Tamar
Date: Mon, 4 Feb 2013 17:28:16 -0600
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application
HI Tamar,
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.
Regards,
Wim
On Tue, Feb 5, 2013 at 12:19 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian
Post by Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
Hi all
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.
HOWEVER.
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.
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.
Thanks much
Tamar Cohen
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
2013-02-05 14:33:05 UTC
Permalink
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.

For example:
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?

Thanks
Tamar

From: Wim Jongman <***@gmail.com<mailto:***@gmail.com>>
Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Tue, 5 Feb 2013 07:14:19 -0600
To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

The fact that the manifest.mf is missing from the META-INF directory is wrong. You should focus on that. check the build.properties.

Best regards,

Wim


On Tue, Feb 5, 2013 at 1:08 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)] <***@nasa.gov<mailto:***@nasa.gov>> wrote:
Sorry strike the previous comment.

My MANIFEST.MF file for the plugin that is providing the missing class files looks like this:

Manifest-Version: 1.0
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
Built-By: tecohen
Bundle-Name: RAPID Java Bindings v2
Created-By: Apache Maven
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
sibility:=reexport
Build-Jdk: 1.6.0_33
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:
Manifest-Version: 1.0
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
sibility:=reexport
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.
Any more tips?
Thanks!
Tamar


From: Tamar Cohen <***@nasa.gov<mailto:***@nasa.gov>>

Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Mon, 4 Feb 2013 17:32:07 -0600

To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

Hi Wim
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.
Tamar

From: Wim Jongman <***@gmail.com<mailto:***@gmail.com>>
Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Mon, 4 Feb 2013 17:28:16 -0600
To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

HI Tamar,

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.

Regards,

Wim


On Tue, Feb 5, 2013 at 12:19 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)] <***@nasa.gov<mailto:***@nasa.gov>> wrote:


Hi all

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.

HOWEVER.
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.
Thanks much

Tamar Cohen
Oberlies, Tobias
2013-02-06 09:26:28 UTC
Permalink
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-***@eclipse.org [mailto:tycho-user-***@eclipse.org] 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.

For example:
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?

Thanks
Tamar

From: Wim Jongman <***@gmail.com<mailto:***@gmail.com>>
Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Tue, 5 Feb 2013 07:14:19 -0600
To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

The fact that the manifest.mf is missing from the META-INF directory is wrong. You should focus on that. check the build.properties.

Best regards,

Wim

On Tue, Feb 5, 2013 at 1:08 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)] <***@nasa.gov<mailto:***@nasa.gov>> wrote:
Sorry strike the previous comment.

My MANIFEST.MF file for the plugin that is providing the missing class files looks like this:

Manifest-Version: 1.0
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
Built-By: tecohen
Bundle-Name: RAPID Java Bindings v2
Created-By: Apache Maven
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
sibility:=reexport
Build-Jdk: 1.6.0_33
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:
Manifest-Version: 1.0
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
sibility:=reexport
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.
Any more tips?
Thanks!
Tamar


From: Tamar Cohen <***@nasa.gov<mailto:***@nasa.gov>>

Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Mon, 4 Feb 2013 17:32:07 -0600

To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

Hi Wim
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.
Tamar

From: Wim Jongman <***@gmail.com<mailto:***@gmail.com>>
Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Mon, 4 Feb 2013 17:28:16 -0600
To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

HI Tamar,

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.

Regards,

Wim

On Tue, Feb 5, 2013 at 12:19 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)] <***@nasa.gov<mailto:***@nasa.gov>> wrote:


Hi all

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.

HOWEVER.
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.
Thanks much

Tamar Cohen
Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
2013-02-07 23:41:15 UTC
Permalink
Hi Tobias

Thanks for the feedback. I have solved my issue, tracing it to a plugin that had a faulty build.properties file that was trying to include bin/ within bin.includes — because that plugin was not constructed properly, the class (in another plugin) that included classes in it could not be instantiated.

I did confirm for myself that what you wrote is true, Tycho did not change anything and simple plugins that export and reexport work perfectly.

I would very much like to understand why and how the PDE export could get this to work, perhaps it ignores things in the bin.includes if it cannot find them? Would Tycho have generated an error or warning here that I should have seen? I was building with mvn install –X and storing the output to a file, and did not see any, though it's possible that I just missed it given my exceedingly complex application that I'm building.

Thanks much for your input.

Tamar


From: "Oberlies, Tobias" <***@sap.com<mailto:***@sap.com>>
Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Wed, 6 Feb 2013 03:26:28 -0600
To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

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-***@eclipse.org<mailto:tycho-user-***@eclipse.org> [mailto:tycho-user-***@eclipse.org] 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.

For example:
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?

Thanks
Tamar

From: Wim Jongman <***@gmail.com<mailto:***@gmail.com>>
Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Tue, 5 Feb 2013 07:14:19 -0600
To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

The fact that the manifest.mf is missing from the META-INF directory is wrong. You should focus on that. check the build.properties.

Best regards,

Wim

On Tue, Feb 5, 2013 at 1:08 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)] <***@nasa.gov<mailto:***@nasa.gov>> wrote:
Sorry strike the previous comment.

My MANIFEST.MF file for the plugin that is providing the missing class files looks like this:

Manifest-Version: 1.0
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
Built-By: tecohen
Bundle-Name: RAPID Java Bindings v2
Created-By: Apache Maven
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
sibility:=reexport
Build-Jdk: 1.6.0_33
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:
Manifest-Version: 1.0
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
sibility:=reexport
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.
Any more tips?
Thanks!
Tamar


From: Tamar Cohen <***@nasa.gov<mailto:***@nasa.gov>>

Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Mon, 4 Feb 2013 17:32:07 -0600

To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

Hi Wim
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.
Tamar

From: Wim Jongman <***@gmail.com<mailto:***@gmail.com>>
Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Mon, 4 Feb 2013 17:28:16 -0600
To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

HI Tamar,

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.

Regards,

Wim

On Tue, Feb 5, 2013 at 12:19 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)] <***@nasa.gov<mailto:***@nasa.gov>> wrote:


Hi all

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.

HOWEVER.
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.
Thanks much

Tamar Cohen
Oberlies, Tobias
2013-02-08 09:58:20 UTC
Permalink
AFAIK, PDE export ignores the bin.includes property. This have been repeatedly causing confusion.

This is the reason why Tycho fails if it detects an error in the bin.includes, e.g. if an included file does not exist. However this doesn't seem to have helped in your case.

Could Tycho have detected your problem (and maybe at least have issued a warning)? If yes, you could open an enhancement request<https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Tycho> for this with a minimal example project that demonstrates the problem, and we'll have a look.

Regards
Tobias


From: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] On Behalf Of Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)]
Sent: Freitag, 8. Februar 2013 00:41
To: Tycho user list
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

Hi Tobias

Thanks for the feedback. I have solved my issue, tracing it to a plugin that had a faulty build.properties file that was trying to include bin/ within bin.includes - because that plugin was not constructed properly, the class (in another plugin) that included classes in it could not be instantiated.

I did confirm for myself that what you wrote is true, Tycho did not change anything and simple plugins that export and reexport work perfectly.

I would very much like to understand why and how the PDE export could get this to work, perhaps it ignores things in the bin.includes if it cannot find them? Would Tycho have generated an error or warning here that I should have seen? I was building with mvn install -X and storing the output to a file, and did not see any, though it's possible that I just missed it given my exceedingly complex application that I'm building.

Thanks much for your input.

Tamar


From: "Oberlies, Tobias" <***@sap.com<mailto:***@sap.com>>
Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Wed, 6 Feb 2013 03:26:28 -0600
To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

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-***@eclipse.org<mailto:tycho-user-***@eclipse.org> [mailto:tycho-user-***@eclipse.org] 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.

For example:
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?

Thanks
Tamar

From: Wim Jongman <***@gmail.com<mailto:***@gmail.com>>
Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Tue, 5 Feb 2013 07:14:19 -0600
To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

The fact that the manifest.mf is missing from the META-INF directory is wrong. You should focus on that. check the build.properties.

Best regards,

Wim

On Tue, Feb 5, 2013 at 1:08 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)] <***@nasa.gov<mailto:***@nasa.gov>> wrote:
Sorry strike the previous comment.

My MANIFEST.MF file for the plugin that is providing the missing class files looks like this:

Manifest-Version: 1.0
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
Built-By: tecohen
Bundle-Name: RAPID Java Bindings v2
Created-By: Apache Maven
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
sibility:=reexport
Build-Jdk: 1.6.0_33
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:
Manifest-Version: 1.0
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
sibility:=reexport
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.
Any more tips?
Thanks!
Tamar


From: Tamar Cohen <***@nasa.gov<mailto:***@nasa.gov>>

Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Mon, 4 Feb 2013 17:32:07 -0600

To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

Hi Wim
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.
Tamar

From: Wim Jongman <***@gmail.com<mailto:***@gmail.com>>
Reply-To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Date: Mon, 4 Feb 2013 17:28:16 -0600
To: Tycho user list <tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>>
Subject: Re: [tycho-user] Problem resolving dependencies with tycho-built RCP application

HI Tamar,

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.

Regards,

Wim

On Tue, Feb 5, 2013 at 12:19 AM, Cohen, Tamar (ARC-TI)[Stinger Ghaffarian Technologies Inc. (SGT Inc.)] <***@nasa.gov<mailto:***@nasa.gov>> wrote:


Hi all

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.

HOWEVER.
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.
Thanks much

Tamar Cohen

Continue reading on narkive:
Loading...