Community
Participate
Working Groups
Build Identifier: Eclipse 3.6.1 M20100909-0800 With an installation of eclipse 3.6.1 plaform-runtime, PDE runtime, and JDT runtime. 1. New a simple ANT file in some java project. 2. Try to "Run As"->"Ant Build" There will be log entry in log view says that "Error: Cannot set the property eclipse.pdebuild.home. It looks like PDE Build has been altered. ". Compare to the eclipse 3.6.1 SDK, i notice that pde build are in different format: In SDK, pdebuild is a directory while in runtime it's a jar. If i un-jar the pde.build jar as a folder under eclipse/plugin, the issue will disappear. Should this be a build problem. Reproducible: Always Steps to Reproduce: 1. New a simple ANT file in some java project. 2. Try to "Run As"->"Ant Build" There will be log entry in log view says that "Error: Cannot set the property eclipse.pdebuild.home. It looks like PDE Build has been altered. ".
Sounds quiet here. Is anybody here see this issue before? It looks like a common issue to run a ant file in eclipse. Do i make some wrong setting for this BZ?
!ENTRY org.eclipse.pde.build 4 25 2011-05-20 14:24:07.437 !MESSAGE Cannot set the property eclipse.pdebuild.home. It looks like PDE Build has been altered. !ENTRY org.eclipse.ant.core 4 1 2011-05-20 14:24:07.671 !MESSAGE BUILD FAILED !STACK 0 java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:394) at org.apache.tools.ant.PropertyHelper.setUserProperty(PropertyHelper.java:377) at org.apache.tools.ant.Project.setUserProperty(Project.java:543) at org.eclipse.ant.internal.core.ant.InternalAntRunner.setProperties(InternalAntRunner.java:233) at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:593) at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:495) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378) at org.eclipse.pde.internal.core.exports.FeatureExportOperation.runScript(FeatureExportOperation.java:424) at org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:262) at org.eclipse.pde.internal.core.exports.FeatureBasedExportOperation.run(FeatureBasedExportOperation.java:50) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Created attachment 196180 [details] eclipse.pdebuild.home empty eclipse.pdebuild.home is empty,but i can't change the value? And what is the default value? I don't know why it is empty.
Eclipse Release Build: 3.6.2 I install pde as a dropins, eclipse |--dropins |--|--pde |--|--jdt ... In this way, eclipse.pdebuild.home is empty. otherwise, when i intall pde using help->install/update, it's doesn't have this problem.
PDE/Build must be installed as a folder on the disk. This happens when it is used as a jar.
(In reply to comment #5) > PDE/Build must be installed as a folder on the disk. This happens when it is > used as a jar. It's true, i think this is the cause. But the clean installation of PDE runtime suffers this issue. It's there any plan to fix it? PDE SDK it's ok as it's installed as a folder.
I also occasionally get this error when exporting a plugin-project: java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:514) 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(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.ant.core.AntRunner.run(AntRunner.java:371) at org.eclipse.pde.internal.core.exports.FeatureExportOperation.runScript(FeatureExportOperation.java:423) at org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:261) at org.eclipse.pde.internal.core.exports.FeatureBasedExportOperation.run(FeatureBasedExportOperation.java:50)
I experience this bug during the following situation: 1) Open luna 2) Create a plugin project, osgi, standard 3) Use hello-world template 4) Export it to a folder somewhere (everything goes ok) 5) Run runtime-workbench 6) Create a plugin project, osgi, standard 7) Use hello-world template 8) Try to export project to a folder 9) FAIL, NPE as shown above.
This problem is still replicatable in Mars. Any idea what's going on here? I think the steps to reproduce are pretty easy to follow.
Here is a new stacktrace for Mars: java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:459) 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(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.eclipse.ant.core.AntRunner.run(AntRunner.java:371) at org.eclipse.pde.internal.core.exports.FeatureExportOperation.runScript(FeatureExportOperation.java:423) at org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:261) at org.eclipse.pde.internal.core.exports.FeatureBasedExportOperation.run(FeatureBasedExportOperation.java:50) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Looking at the code here: http://git.eclipse.org/c/platform/eclipse.platform.git/tree/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java#n1035 We can see that the variable userProperties is a HashMap, which permits the use of a null value. This means the method setProperties() which has the following code may be passing in a null value: private void setProperties(Project project) { setBuiltInProperties(project); if (userProperties != null) { for (Entry<String, String> entry : userProperties.entrySet()) { project.setUserProperty(entry.getKey(), entry.getValue()); } } } Following the stack, however, wee see that the internal implementation for project.setUserProperty(k,v) leads to PropertyHelper, which uses a HashTable as an internal implementation, which does not allow null values. InternalAntRunner should make sure there are no null values being passed in here!
Created attachment 250514 [details] A possible patch to fix the issue I'm attaching a patch to fix the issue. Unfortunately the affected class is in Ant and not PDE so I'm not sure if I should open a duplicate issue or not.
Sorry, my link to the source code was to the wrong InternalAntRunner. See http://git.eclipse.org/c/platform/eclipse.platform.git/tree/ant/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java#n268 instead. I'll attach a new patch momentarily that updates both files.
Created attachment 250515 [details] A fix for both files
I've opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=459188 in the ant component in case it gets more visibility there, since that's where the patch would be made anyway.
Sarika, there is a proposed fix in ant core. Do you have commit rights there?
(In reply to Vikas Chandra from comment #15) > Sarika, there is a proposed fix in ant core. Do you have commit rights there? I don't have commit rights. Mike can help. I could not reproduce the Error using Comment#9. Do I need to set some preference for PDE ? But I wonder why do we get eclipse.pdebuild.home as null ? If it is not set, it can come as empty string.
(In reply to Sarika Sinha from comment #16) > (In reply to Vikas Chandra from comment #15) > > Sarika, there is a proposed fix in ant core. Do you have commit rights there? > > I don't have commit rights. Mike can help. I have pushed the fix in Ant core.
Currently we are not actively enhancing PDE build anymore. Therefore, I close this bug as WONTFIX. Please reopen, if you plan to provide a fix.