Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315710 - headless build fails with java.lang.ClassCastException
Summary: headless build fails with java.lang.ClassCastException
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.6.1   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 316339
  Show dependency tree
 
Reported: 2010-06-03 21:58 EDT by Daniel Belina CLA
Modified: 2010-08-10 16:30 EDT (History)
4 users (show)

See Also:
darin.eclipse: review+


Attachments
patch v1 (978 bytes, patch)
2010-06-08 11:36 EDT, Andrew Niefer CLA
no flags Details | Diff
jar with fix v1 (504.58 KB, application/octet-stream)
2010-06-08 11:37 EDT, Andrew Niefer CLA
no flags Details
patch + test (6.67 KB, patch)
2010-06-09 12:01 EDT, Andrew Niefer CLA
no flags Details | Diff
patch v2 (7.01 KB, patch)
2010-06-09 14:41 EDT, Andrew Niefer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Belina CLA 2010-06-03 21:58:19 EDT
Build Identifier: I20100527-1700

I have a headless build that fails with the following exception:

[21:43:01+0000/wct/package.all/exec] /home/belina/sandbox/WASX/WSC/ws/code/wct/packager/package.xml:64: java.lang.ClassCastException: java.lang.String incompatible with org.eclipse.pde.internal.build.site.BuildTimeFeature

Caused by: java.lang.ClassCastException: java.lang.String incompatible with org.eclipse.pde.internal.build.site.BuildTimeFeature
	at org.eclipse.pde.internal.build.AssembleConfigScriptGenerator.generatePermissions(AssembleConfigScriptGenerator.java:984)
	at org.eclipse.pde.internal.build.AssembleConfigScriptGenerator.generateAntZipTarget(AssembleConfigScriptGenerator.java:960)
	at org.eclipse.pde.internal.build.AssembleConfigScriptGenerator.generateArchivingTarget(AssembleConfigScriptGenerator.java:377)
	at org.eclipse.pde.internal.build.packager.PackageConfigScriptGenerator.generateArchivingTarget(PackageConfigScriptGenerator.java:213)
	at org.eclipse.pde.internal.build.AssembleConfigScriptGenerator.generateEpilogue(AssembleConfigScriptGenerator.java:700)
	at org.eclipse.pde.internal.build.AssembleConfigScriptGenerator.generate(AssembleConfigScriptGenerator.java:135)
	at org.eclipse.pde.internal.build.packager.PackageScriptGenerator.basicGenerateAssembleConfigFileTargetCall(PackageScriptGenerator.java:63)
	at org.eclipse.pde.internal.build.AssembleScriptGenerator.generateMainTarget(AssembleScriptGenerator.java:124)
	at org.eclipse.pde.internal.build.AssembleScriptGenerator.generate(AssembleScriptGenerator.java:55)
	at org.eclipse.pde.internal.build.packager.PackagerGenerator.generatePackageScripts(PackagerGenerator.java:56)
	at org.eclipse.pde.internal.build.BuildScriptGenerator.generateFeatures(BuildScriptGenerator.java:253)
	at org.eclipse.pde.internal.build.BuildScriptGenerator.generate(BuildScriptGenerator.java:112)
	at org.eclipse.pde.internal.build.tasks.PackagerTask.execute(PackagerTask.java:90)
....

The packager.xml line in question is:
<eclipse.assembler featureList="${featureList}"
workingDirectory="${workingDirectory}" configInfo="${config}"
baseLocation="${tempDirectory}/${featurePaths}"
packagePropertyFile="${packagingPropertyFile}" deltaPack="${deltaPack}"/>

(Previously my headless build was failing due to bug 314550, and I just recently picked up I20100527-1700 to try out the fix)

Reproducible: Always

Steps to Reproduce:
This occurs in a local build environment for an IBM WebSphere tool, so I'm not
sure how to provide steps to reproduce.  I can provide any additional
information requested if the information in the Details section is not
sufficient.
Comment 1 Andrew Niefer CLA 2010-06-04 13:45:29 EDT
Sorry, I'm not going to be able to fix this for 3.6.  The RC4 candidate is already built.

This does not affect normal users of eclipse (ie export from workspace), this only affects old style package.xml builds.  Regular feature and product builds are not affected.

I would suggest such old builds can stay on 3.5.

While this particular problem appears to be a one line change, the code is complicated and not covered directly by unit tests.  And I'm not confident that there aren't more changes needed.

If required a fix can be delivered to IES post 3.6, similarly the releng basebuilder can be patched as well.
Comment 2 Daniel Belina CLA 2010-06-08 11:17:42 EDT
I'm OK with waiting until 3.6.1 (the current Target Milestone this bug is set for) as we need to move to 3.6 for the additional platform support.

In the meantime, could a patch in the form of a class file or jar be provided?  I'm willing to test this out, in the efforts to verify whether this does indeed fix the problem or if more changes are needed, to make some headway before 3.6.1.
Comment 3 Andrew Niefer CLA 2010-06-08 11:36:15 EDT
Created attachment 171422 [details]
patch v1

First patch
Comment 4 Andrew Niefer CLA 2010-06-08 11:37:59 EDT
Created attachment 171423 [details]
jar with fix v1
Comment 5 Andrew Niefer CLA 2010-06-09 12:01:04 EDT
Created attachment 171548 [details]
patch + test
Comment 6 Daniel Belina CLA 2010-06-09 12:40:10 EDT
Thanks for the patch.  I've tried this out and it looks to be working OK for me, not hitting any failures in the headless build any longer.
Comment 7 Andrew Niefer CLA 2010-06-09 13:21:01 EDT
I have released the patch & test to HEAD for 3.7 nightly builds. (bug 316339).

The 3.6.1 stream won't be open for a little bit yet.
Comment 8 Andrew Niefer CLA 2010-06-09 14:41:21 EDT
Created attachment 171567 [details]
patch v2

Previous patch broke permissions for bug 282260
Comment 9 Andrew Niefer CLA 2010-07-06 13:45:59 EDT
done in 3.6.1