Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 445963 - Buckminster is not compatible with Luna SR1
Summary: Buckminster is not compatible with Luna SR1
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Buckminster (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: buckminster.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 448478 (view as bug list)
Depends on: 445122 446173
Blocks:
  Show dependency tree
 
Reported: 2014-10-05 06:36 EDT by Bernard Sarter CLA
Modified: 2019-02-25 14:40 EST (History)
6 users (show)

See Also:


Attachments
Error Log in debug mode (66.30 KB, image/png)
2014-10-05 16:09 EDT, Bernard Sarter CLA
no flags Details
sample projects (114.91 KB, application/zip)
2015-01-09 04:21 EST, Adrian Gaberell CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernard Sarter CLA 2014-10-05 06:36:07 EDT
When I install the latest Buckminster (core + pde) from http://download.eclipse.org/tools/buckminster/updates-4.4 on top of Luna 'R', all works fine, I can build my project (from IDE).

When I install the same Buckminster on top of Luna 'SR1', all build attempts fail instantly with following error:

BUILD FAILED: java.lang.NullPointerException
org.eclipse.core.runtime.CoreException: BUILD FAILED
	at org.eclipse.buckminster.ant.AntRunner.handleInvocationTargetException(AntRunner.java:167)
	at org.eclipse.buckminster.ant.AntRunner.run(AntRunner.java:322)
	at org.eclipse.buckminster.ant.actor.AntActor.internalPerform(AntActor.java:254)
	at org.eclipse.buckminster.core.actor.AbstractActor.perform(AbstractActor.java:195)
	at org.eclipse.buckminster.core.internal.actor.PerformManager$DirectActionInvocation.execute(PerformManager.java:143)
	at org.eclipse.buckminster.core.internal.actor.PerformManager.internalPerform(PerformManager.java:454)
	at org.eclipse.buckminster.core.internal.actor.PerformManager.perform(PerformManager.java:293)
	at org.eclipse.buckminster.core.internal.actor.PerformManager.perform(PerformManager.java:305)
	at org.eclipse.buckminster.ui.InvokeActionJob.runInWorkspace(InvokeActionJob.java:67)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.NullPointerException
	at java.util.Hashtable.put(Unknown Source)
	at org.apache.tools.ant.PropertyHelper.setUserProperty(PropertyHelper.java:750)
	at org.apache.tools.ant.Project.setUserProperty(Project.java:563)
	at org.eclipse.ant.internal.core.ant.InternalAntRunner.setProperties(InternalAntRunner.java:267)
	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:632)
	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:525)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.buckminster.ant.AntRunner.run(AntRunner.java:318)
	... 9 more

Tested on Windows 7 & 8.1, java 8u20.
Comment 1 Thomas Hallgren CLA 2014-10-05 06:46:44 EDT
I'm using Buckminster on a daily basis on top of Luna SR1 so I don't think that the upgrade in itself is the cause of the NPE. The top of the second trace:

Caused by: java.lang.NullPointerException
	at java.util.Hashtable.put(Unknown Source)
	at org.apache.tools.ant.PropertyHelper.setUserProperty(PropertyHelper.java:750)
	at org.apache.tools.ant.Project.setUserProperty(Project.java:563)

Suggest that a property key is null. The only way to tell where that null key stems from is probably to run it in a debug session.
Comment 2 Bernard Sarter CLA 2014-10-05 16:09:44 EDT
Created attachment 247632 [details]
Error Log in debug mode
Comment 3 Bernard Sarter CLA 2014-10-05 16:15:25 EDT
(In reply to Thomas Hallgren from comment #1)
> I'm using Buckminster on a daily basis on top of Luna SR1 so I don't think
> that the upgrade in itself is the cause of the NPE. The top of the second
> trace:
> 
> Caused by: java.lang.NullPointerException
> 	at java.util.Hashtable.put(Unknown Source)
> 	at
> org.apache.tools.ant.PropertyHelper.setUserProperty(PropertyHelper.java:750)
> 	at org.apache.tools.ant.Project.setUserProperty(Project.java:563)
> 
> Suggest that a property key is null. The only way to tell where that null
> key stems from is probably to run it in a debug session.

Hi,

Thanks for your quick reply.

I double-checked on two computers (Win 7 & 8.1) that the same project builds fine on Luna 'R' + Buckminster and fails on Luna 'SR1' + Buckminster, (and then by switching back to 'R' it works again), so I have the clear feeling that in my case the problem is somehow linked to the Luna version.

I switched on verbose/debug flags (see attachment), not sure that this really helps; Do you see an other way to get more debug information about the null property key ? (without installing all the source code ...) 

Regards,
Bernard.
Comment 4 Thomas Hallgren CLA 2014-10-05 16:23:23 EDT
(In reply to Bernard SARTER from comment #3)
> I double-checked on two computers (Win 7 & 8.1) that the same project builds
> fine on Luna 'R' + Buckminster and fails on Luna 'SR1' + Buckminster, (and
> then by switching back to 'R' it works again), so I have the clear feeling
> that in my case the problem is somehow linked to the Luna version.
>
The error might well be something that you see in SR1 but not in previous versions. Nevertheless, I still think it's something in your configuration that triggers it. As I said, I have several Buckminster builds running fine on SR1.

> I switched on verbose/debug flags (see attachment), not sure that this
> really helps; Do you see an other way to get more debug information about
> the null property key ? (without installing all the source code ...) 
> 
I don't think logs will help much (for some reason I'm not able to view the attachment). When I wrote "run it in a debug session" I meant running the build under debugger control, set a breakpoint on the NPE and then check the stack.
Comment 5 Thomas Hallgren CLA 2014-10-07 11:02:52 EDT
I managed to provoke the same error. It stems from an attempt to fix a regression in the Equinox framework. Unfortunately it introduced another regression. See bug 446173 for more detail.

A work around that seems to work is to set these three properties before invoking a Buckminster action:

osgi.user.area=/your/user/home
osgi.user.area.default=/your/user/home
osgi.configuration.area.default=/your/config/area (normally eclipse install location)
Comment 6 Thomas Hallgren CLA 2014-10-23 10:39:47 EDT
*** Bug 448478 has been marked as a duplicate of this bug. ***
Comment 7 David Williams CLA 2014-10-30 18:02:52 EDT
FYI, there is a "feature patch" available for the bug in SR1 that was causing this issue, see bug 445122 comment 42. 

It is at a "temporary" location so far, while we are asking those effected by it to confirm that it solves the problem they were having. 

I particularly wanted to hear from "Buckminster" since I thought maybe Buckminster might need something other than the "RCP App Feature patch" (perhaps one of those more more related to p2-only?). 

But, in either case, if, in the next few days, "you" can confirm it is "good to go" then I will move the feature patch to its permanent home, on downloads server, with the rest of the 4.4 repository. And ... if you can not get to it in the next few days, I would appreciate knowing that too, and in that case would probably just go ahead and "promote" it. 

Thanks,
Comment 8 Thomas Hallgren CLA 2014-10-31 04:49:17 EDT
I tested with Buckminster and the new patch. Unfortunately it still fails when using the 3.10.1.v20140909-1633 version of org.eclipse.osgi:

Caused by: java.lang.NullPointerException
  at java.util.Hashtable.put(Hashtable.java:394)
  at org.apache.tools.ant.PropertyHelper.setUserProperty(PropertyHelper.java:750)
  at org.apache.tools.ant.Project.setUserProperty(Project.java:563)
  at org.eclipse.ant.internal.core.ant.InternalAntRunner.setProperties(InternalAntRunner.java:267)
  at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:632)
  at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:525)
Comment 9 Thomas Hallgren CLA 2014-10-31 07:55:41 EDT
Hmm. And then I realized that the 3.10.1.v20140909-1633 isn't correct. I fixed the build to instead use 3.10.2.v20141020-1740 and the problem is sovled. Thanks!
Comment 10 Thomas Hallgren CLA 2014-10-31 07:56:13 EDT
New build published to our update sites.
Comment 11 David Williams CLA 2014-10-31 09:36:02 EDT
(In reply to Thomas Hallgren from comment #9)
> Hmm. And then I realized that the 3.10.1.v20140909-1633 isn't correct. I
> fixed the build to instead use 3.10.2.v20141020-1740 and the problem is
> sovled. Thanks!

Ok, whew, had me worried there for a minute :) [That the "update site" was delivering the wrong bundle, since I knew it should be providing 3.10.2 ... but, suspect you have a "bundle based" build? (for Buckminster itself)]. 

In any case, thanks for confirming. Sorry for the churn.
Comment 12 Vlad Dumitrescu CLA 2014-11-11 05:48:41 EST
Sorry if this is a stupid question, but I am still seeing version 1.6.0.v20140801-0035 on the update site -- where was the patched version published?
Comment 13 Thomas Hallgren CLA 2014-11-13 13:21:24 EST
There's no patch version of the Buckminster feature since it doesn't have a specific requirement on the failing bundle. The failing bundle has been updated though, so a new headless install will contain it.
Comment 14 Adrian Gaberell CLA 2015-01-07 02:11:13 EST
is there any plan to publish a new director_latest.zip that allready includes the new osgi version 3.10.2.v20141020-1740?
Comment 15 Thomas Hallgren CLA 2015-01-07 07:40:12 EST
I wasn't aware that the director was affected by the bug. Is it?
Comment 16 Adrian Gaberell CLA 2015-01-07 09:44:15 EST
if i create a new product with the director, then the wrong plugin-version 3.10.0.v20140606-1445 is allready in this product.
Comment 17 Thomas Hallgren CLA 2015-01-07 17:10:31 EST
That might well be, but the director does not use itself as a bundle resource so my guess is that either you don't appoint the correct repository to get the patch or your your product is incorrectly configured.
Comment 18 Adrian Gaberell CLA 2015-01-09 04:21:43 EST
Created attachment 249813 [details]
sample projects
Comment 19 Adrian Gaberell CLA 2015-01-09 04:25:05 EST
sorry, after adding the attachement, the original comment was gone...
here it is:

i have tested the following steps on osx  and win8 with java 1.7:

- create new eclipse with director_latest.zip:

- director -r http://download.eclipse.org/eclipse/updates/4.4 
       -profileproperties "org.eclipse.update.install.features=true" 
       -d <destdir>-i org.eclipse.sdk.ide -p2.nl DE_CH 
       -p2.os win32 -p2.arch x86_64 -p2.ws win32
	   
- start eclipse from <destdir>

- install org.eclipse.e4.rcp.R441patch from 
  http://download.eclipse.org/eclipse/updates/4.4
  
- install Buckminster Core and Buckminster PDE support from 
  http://download.eclipse.org/tools/buckminster/updates-4.4
  
- create an rcp application with the rcp mail-template

- create a feature with a product definition with a dependency to this feature

- create a feature project for the update-site with an target.definition

- include the following entries in the target definition:
  <unit id="org.eclipse.e4.rcp.R441patch.feature.group" version="1.0.0"/>
  <unit id="org.eclipse.emf.ecore.feature.group" version="2.10.1.v20140901-1043"/>
  <unit id="org.eclipse.emf.common.feature.group" version="2.10.1.v20140901-1043"/>
  <unit id="org.eclipse.rcp.sdk.id" version="4.4.1.M20140925-0400"/>
  <unit id="org.eclipse.equinox.executable" version="3.6.100.v20140819-1617"/>
  <repository location="http://download.eclipse.org/eclipse/updates/4.4"/>
  
- set this target definition as the target-platform

- add the following to the buckminster.cspex file of the update-site feature
  <actions>
    <public name="create.product" actor="ant">
      <actorProperties>
        <property key="buildFile" value="build/product.ant" />
          <property key="targets" value="create.product" />
        </actorProperties>
        <properties> 
          <property key="profile" value="BuckyRcpMailProfile" />
          <property key="iu" value="org.eclipse.buckminster.examples.rcp.mail.product" />
        </properties>
        <prerequisites alias="repositories">
           <attribute name="site.p2" />
        </prerequisites>
        <products alias="destination" base="${buckminster.output}">
          <path path="BuckyRcpMail.${target.ws}.${target.os}.${target.arch}/" />
        </products>
    </public>
    <public name="create.product.zip" actor="ant">
        <actorProperties>
          <property key="buildFileId" value="buckminster.pdetasks" />
          <property key="targets" value="create.zip" />
        </actorProperties>
        <prerequisites alias="action.requirements">
          <attribute name="create.product" />
        </prerequisites>
        <products alias="action.output" base="${buckminster.output}">
          <path path="BuckyRcpMail.${target.ws}.${target.os}.${target.arch}.zip" />
        </products>
    </public>
  </actions>
  
- create an ant buildfile build/product.ant with the following code:
  <?xml version="1.0" encoding="UTF-8"?>
  <project name="Product packaging">
    <target name="create.product">
      <property name="product.install.directory" location="${sp:destination}" />
      <delete dir="${product.install.directory}" includeemptydirs="true" failonerror="false"/>
      <mkdir dir="${product.install.directory}" />
      buckminster.valuepath value="${fs:repositories}" id="repositories.valuepath" />
      <pathconvert
         pathsep=","
         targetos="unix"
         property="product.repositories"
         refid="repositories.valuepath">
         <map from="" to="file:/" />
       </pathconvert>
       <echoproperties />
       <echo message="Repositories: ${product.repositories}" />
       <echo message="Install Dir : ${product.install.directory}" />
  
       <p2.director
         destination="${product.install.directory}"
         metadataRepository="${product.repositories}"
         artifactRepository="${product.repositories}"
         profile="${profile}"
         arch="${target.arch}"
         os="${target.os}"
         ws="${target.ws}"
         roaming="true"
         extraarguments="-profileProperties org.eclipse.update.install.features=true">
         <iu id="${iu}" />
      </p2.director>
    </target>
  </project>
  
- run Buckminster/Invoke Action…/create.product.zip

- on win8 i get the following error:
  Action tst.rcp.site:eclipse.feature$1.0.0.qualifier#create.product using 'up to date' 
   policy DEFAULT: Rebuild needed: Product has folders
  [start tst.rcp.site:eclipse.feature$1.0.0.qualifier#create.product]
   Prerequisite alias = repositories
   Product alias = destination
   Product base = ${buckminster.output}\
   target.arch=x86_64
   buckminster.component=tst.rcp.site
   qualifier.replacement.*=generator:lastRevision
   workspace.root=C:/dev/director_test/4.4.1_eclipse/rcp
   buckminster.temp=C:/Users/xxxxx/tmp/buildtmp/tst.rcp.site_1.0.0-eclipse.feature/temp
   buckminster.home=C:\dev\director_test\4.4.1_eclipse\rcp\tst.rcp.site\
   buckminster.output=C:/Users/xxxxx/tmp/tst.rcp/tst.rcp.site_1.0.0-eclipse.feature
   buckminster.temp.root=C:\Users\xxxx/tmp/buildtmp
   localhost=xxxxx
   generator.buildTimestamp.format=2015-01-09T08:48:46.320+0000
   buckminster.component.type=eclipse.feature
   buckminster.version=1.0.0.qualifier
   target.nl=en_GB
   target.ws=win32
   eclipse.home=C:\dev\director_test\4.4.1_eclipse
   profile=BuckyRcpMailProfile
   iu=org.eclipse.buckminster.examples.rcp.mail.product
   buckminster.output.root=C:\Users\xxxx/tmp/tst.rcp
   target.os=win32
  [ant] Repositories: file:/C:/Users/xxxx/tmp/tst.rcp/tst.rcp.site_1.0.0-eclipse.feature/site.p2
  [ant] Install Dir : C:\Users\xxxx\tmp\tst.rcp\tst.rcp.site_1.0.0-eclipse.feature\BuckyRcpMail.win32.win32.x86_64
  [ant] The installable unit org.eclipse.buckminster.examples.rcp.mail.product has not been found.
  [ant] The installable unit org.eclipse.buckminster.examples.rcp.mail.product has not been found.
  [ant] A problem occured while invoking the director.
    org.eclipse.core.runtime.CoreException: C:\dev\director_test\4.4.1_eclipse\rcp\tst.rcp.site\
	build\product.ant:32: A problem occured while invoking the director.
    org.eclipse.core.runtime.CoreException: C:\dev\director_test\4.4.1_eclipse\rcp\tst.rcp.site\
	build\product.ant:32: A problem occured while invoking the director.
    at org.eclipse.buckminster.ant.AntRunner.handleInvocationTargetException(AntRunner.java:167)
    at org.eclipse.buckminster.ant.AntRunner.run(AntRunner.java:322)
	
- on osx i get this error:
  Platform install location: /Users/xxxx/dev/director_4.4.1/eclipse_20150109_0900
  Target platform provided by class org.eclipse.buckminster.pde.internal.PDETargetPlatform
  Project tst.rcp.mail.feature now has dynamic dependencies to tst.rcp.mail
  Project tst.rcp.site now has dynamic dependencies to tst.rcp.mail.feature
  No component named org.eclipse.osgi:osgi.bundle/[3.10.1.v20140909-1633,3.10.1.v20140909-1633] is known to Buckminster
  
- I can see a difference explaining the two behaviors:
  on win8 I can see both osgi-plugins (3.10.1 and 3.10.2) in the target-platform (runtime & custom)
  on osx I can only see the new version (3.10.2) in the target-platform (runtime & custom)
  
- I also tested the version with the releng target-platform described by Lorenzo Bettini and had similar problems…

so where i'm wrong? thanks for you help!

regards, adrian
Comment 20 Thomas Hallgren CLA 2015-01-09 06:04:12 EST
I don't know what's wrong but I'm pretty sure it's not the director. Perhaps you could try to install everything into the IDE with one director call? Then check what osgi bundle the IDE gets.

After that, perhaps you should let Buckminster populate the target platform rather than using a target definition.
Comment 21 Thomas Hallgren CLA 2015-01-09 06:05:02 EST
All beyond the scope of this issue though. Discussions are better conducted on the Buckminster mailing list.