Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » Cannot access Action in CSPEX(CSPEC created with own ResolutionBuilder)
Cannot access Action in CSPEX [message #725149] Wed, 14 September 2011 01:33 Go to next message
Jakob Braeuchi is currently offline Jakob Braeuchi
Messages: 69
Registered: July 2009
Location: Switzerland
Member
hi,

we have defined our own ComponentType for EAR-Files. To build the CSPEC of the EAR-Type there is a EarResolutionBuilder class extending from AbstractResolutionBuilder.
This solution works as expected: i can view the CSPEC of an EAR and i can also invoke the defined action "pack.ear".

The problems shows up as soon as i create a CSPEX for an EAR-Component. I want to define a new action "pack.ear.ext" which uses the "pack.ear" action as a prerequisite:

Problem during meta-data refresh: CSpec ch.rtc.zpv.application:osgi.bundle$1.0.0.qualifier has no  action, group, or local artifact named pack.ear


Do i have to add some "magic" to our EarResolutionBuilder to make it work or ist it a bug in Buckminster ?

thanks
jakob
Re: Cannot access Action in CSPEX [message #725162 is a reply to message #725149] Wed, 14 September 2011 02:24 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas Hallgren
Messages: 3208
Registered: July 2009
Senior Member
Hi Jacob,

The AbstractResolutionBuilder has a method named applyExtensions(). It should be called just right after the cspec has
been generated. Are you doing that?

HTH,
Thomas Hallgren


On 2011-09-14 07:33, Jakob Braeuchi wrote:
> hi,
>
> we have defined our own ComponentType for EAR-Files. To build the CSPEC of the EAR-Type there is a EarResolutionBuilder
> class extending from AbstractResolutionBuilder. This solution works as expected: i can view the CSPEC of an EAR and i
> can also invoke the defined action "pack.ear".
>
> The problems shows up as soon as i create a CSPEX for an EAR-Component. I want to define a new action "pack.ear.ext"
> which uses the "pack.ear" action as a prerequisite:
>
>
> Problem during meta-data refresh: CSpec ch.rtc.zpv.application:osgi.bundle$1.0.0.qualifier has no action, group, or
> local artifact named pack.ear
>
>
> Do i have to add some "magic" to our EarResolutionBuilder to make it work or ist it a bug in Buckminster ?
>
> thanks jakob
Re: Cannot access Action in CSPEX [message #725179 is a reply to message #725162] Wed, 14 September 2011 03:16 Go to previous messageGo to next message
Jakob Braeuchi is currently offline Jakob Braeuchi
Messages: 69
Registered: July 2009
Location: Switzerland
Member
hi thomas,

at the end of the method

public BOMNode build(IComponentReader[] readerHandle, boolean forResolutionAidOnly, IProgressMonitor monitor) throws CoreException


there already is a call to applyExtension();

...
applyExtensions(cspecBld, forResolutionAidOnly, reader, MonitorUtils.subMonitor(monitor, 1000));
return createNode(reader, cspecBld);


jakob
Re: Cannot access Action in CSPEX [givenCtypeId is null] [message #725550 is a reply to message #725179] Thu, 15 September 2011 02:56 Go to previous messageGo to next message
Jakob Braeuchi is currently offline Jakob Braeuchi
Messages: 69
Registered: July 2009
Location: Switzerland
Member
hi thomas,

after some debugging i found the cause for the problem.

in the method LocalResolver#fromPath
public static Resolution fromPath(IPath productPath, String name, String givenCtypeId, IProgressMonitor monitor) throws CoreException {

the parameter givenCtypeId is null, so Buckminster looks for the possible types. It finds two types for my component: our own EAR-Type and osgi.bundle.

further down in LocalResolver#fromPath the resolution is created for the type
BOMNode node = ctype.getResolution(pm, MonitorUtils.subMonitor(monitor, 100));

this works for the EAR-Type (our ResolutionBuilder is called), but it fails for the osgi.bundle with a MissingAttributeException.

how can i fix this problem ?

thanks
jakob

Re: Cannot access Action in CSPEX [givenCtypeId is null] [message #725563 is a reply to message #725550] Thu, 15 September 2011 04:17 Go to previous messageGo to next message
Jakob Braeuchi is currently offline Jakob Braeuchi
Messages: 69
Registered: July 2009
Location: Switzerland
Member
hi thomas,

i was thinking about the problem i have with the cspec of our own type. as i wrote in the forum the resolution of the ear type works but it fails for the osgi.bundle type.

there is a comment in the code of LocalResolver#fromPath:

// We might have more then one possible type. Select the one that
// produces the
// largest CSPEC (should be fast considering the IPath is local

in my case the resolution fails for one type but works for the other. this exception could be regarded as a hint pointing to the proper cspec.
what do you think about ?

jakob
Re: Cannot access Action in CSPEX [givenCtypeId is null] [message #725565 is a reply to message #725550] Thu, 15 September 2011 04:17 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas Hallgren
Messages: 3208
Registered: July 2009
Senior Member
On 2011-09-15 08:56, Jakob Braeuchi wrote:
> hi thomas,
>
> after some debugging i found the cause for the problem.
>
> in the method LocalResolver#fromPath
>
> public static Resolution fromPath(IPath productPath, String name, String givenCtypeId, IProgressMonitor monitor) throws
> CoreException {
>
> the parameter givenCtypeId is null, so Buckminster looks for the possible types. It finds two types for my component:
> our own EAR-Type and osgi.bundle.
>
> further down in LocalResolver#fromPath the resolution is created for the type
>
> BOMNode node = ctype.getResolution(pm, MonitorUtils.subMonitor(monitor, 100));
>
> this works for the EAR-Type (our ResolutionBuilder is called), but it fails for the osgi.bundle with a
> MissingAttributeException.
>
> how can i fix this problem ?
>
Sounds like a bug in Buckminster. It shouldn't fail unless all possible types fail. Please report this as a bug and I'll
see to that it gets fixed.

- thomas
Re: Cannot access Action in CSPEX [givenCtypeId is null] [message #725603 is a reply to message #725565] Thu, 15 September 2011 06:33 Go to previous messageGo to next message
Jakob Braeuchi is currently offline Jakob Braeuchi
Messages: 69
Registered: July 2009
Location: Switzerland
Member
hi thomas,

bug reported: https://bugs.eclipse.org/bugs/show_bug.cgi?id=357767

jakob

ps: could you please also check this one: https://bugs.eclipse.org/bugs/show_bug.cgi?id=340658
Re: Cannot access Action in CSPEX [givenCtypeId is null] [message #725624 is a reply to message #725603] Thu, 15 September 2011 07:12 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas Hallgren
Messages: 3208
Registered: July 2009
Senior Member
On 2011-09-15 12:33, Jakob Braeuchi wrote:
> hi thomas,
>
> bug reported: https://bugs.eclipse.org/bugs/show_bug.cgi?id=357767
>
Thanks. It was an easy fix. A new build is under way. Should be available within an hour.

> jakob
>
> ps: could you please also check this one: https://bugs.eclipse.org/bugs/show_bug.cgi?id=340658

Oh, I must have missed that one. The prebind behavior is per design. I made a comment on that bug.
Re: Cannot access Action in CSPEX [givenCtypeId is null] [message #768458 is a reply to message #725624] Tue, 20 December 2011 02:45 Go to previous message
Jakob Braeuchi is currently offline Jakob Braeuchi
Messages: 69
Registered: July 2009
Location: Switzerland
Member
sorry wrong thread

[Updated on: Tue, 20 December 2011 02:50]

Report message to a moderator

Previous Topic:How to update subset of p2 site content?
Next Topic:CSpec attributes are empty when bundle is resolved from P2
Goto Forum:
  


Current Time: Thu Apr 17 11:28:23 EDT 2014

Powered by FUDForum. Page generated in 0.02877 seconds