Bug 573991 - Export/Build of RCP feature product is not assembling correctly.
Summary: Export/Build of RCP feature product is not assembling correctly.
Status: NEW
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 4.19   Edit
Hardware: Macintosh Mac OS X
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-03 16:31 EDT by Ralph Bosson CLA
Modified: 2023-06-02 00:33 EDT (History)
3 users (show)

See Also:


Attachments
Example RCP Project (72.89 KB, application/zip)
2021-06-10 08:30 EDT, Ralph Bosson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Bosson CLA 2021-06-03 16:31:34 EDT
Environment
Eclipse 2021-03 (4.19.0), OS X  11.3.1, Java 11.0.10

Build Parameters
	Allow for binary cycles in target platform
	Export for Multi-platform (OS X, Windows)

The product export results in an incomplete build of the application. 
The OS X product package is not assembled resulting in a .app file the is marked as damaged.  The app icon is a dimmed circle X.  The resulting folder structure shows items that should have been placed in the Content folder of the package where instead left at the folder root level.  Moving the application executable to the package Content/MacOS folder and moving the Resource folder and info.plist to the package Content folder results in a working application. The application does not use the imbedded JRE instead uses the system JRE. The macosx.icns are not accessed. A !MESSAGE is provided in the .metadata/.log.


Error .metadata/.log
ENTRY org.eclipse.lsp4e 4 0 2021-06-03 14:27:00.830
!MESSAGE Marker id 282917 not found.
!STACK 1
org.eclipse.core.internal.resources.ResourceException: Marker id 282917 not found.
	at org.eclipse.core.internal.resources.Marker.checkInfo(Marker.java:83)
	at org.eclipse.core.internal.resources.Marker.getAttributes(Marker.java:183)
	at org.eclipse.lsp4e.operations.diagnostics.LSPDiagnosticsToMarkers.updateMarker(LSPDiagnosticsToMarkers.java:199)
	at org.eclipse.lsp4e.operations.diagnostics.LSPDiagnosticsToMarkers$1.run(LSPDiagnosticsToMarkers.java:150)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2312)
	at org.eclipse.lsp4e.operations.diagnostics.LSPDiagnosticsToMarkers.updateMarkers(LSPDiagnosticsToMarkers.java:162)
	at org.eclipse.lsp4e.operations.diagnostics.LSPDiagnosticsToMarkers.accept(LSPDiagnosticsToMarkers.java:83)
	at org.eclipse.lsp4e.LanguageClientImpl.publishDiagnostics(LanguageClientImpl.java:74)
	at jdk.internal.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$4(LanguageServerWrapper.java:260)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
!SUBENTRY 1 org.eclipse.core.resources 4 376 2021-06-03 14:27:00.832
!MESSAGE Marker id 282917 not found.

Resulting Application structures

OSX
Application Folder
	.eclipseproduct
	configuration
		config.ini
		org.eclipse.equinox.simpleconfgurator
			bundles.info
	Application.app (damaged)
		Contents
			MacOS
				application.ini		
	features
		...
	info.plist
	jre
	MacOS
		application (executable)		
	plugins
		...
	Resources
		macosx.icns


The Windows structure appears correct, however the window icons are also ignored and the JRE exported is unusable. Replacing the export JRE with a fresh java windows JRE enables launching the windows application which reports the following error.

!SESSION 2021-06-01 11:51:34.730 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.11
java.vendor=AdoptOpenJDK
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -clearPersistedState
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -clearPersistedState
 
!ENTRY org.eclipse.osgi 4 0 2021-06-01 11:53:16.457
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: org/eclipse/swt/graphics/ImageFileNameProvider
              at org.eclipse.jface.resource.ImageDescriptor.createFromURL(ImageDescriptor.java:182)
              at org.eclipse.ui.internal.BrandingProperties.getImages(BrandingProperties.java:115)
              at org.eclipse.ui.internal.ProductProperties.getWindowImages(ProductProperties.java:310)
              at org.eclipse.ui.internal.ProductInfo.getWindowImages(ProductInfo.java:100)
              at org.eclipse.ui.internal.WorkbenchPlugin.getWindowImages(WorkbenchPlugin.java:1031)
              at org.eclipse.ui.internal.Workbench.initializeImages(Workbench.java:1795)
              at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:753)
              at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:168)
              at com.corgroup.bmp.client.Application_su.start(Application_su.java:43)
              at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
              at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
              at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
              at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
              at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
              at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
              at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
              at org.eclipse.equinox.launcher.Main.run(Main.java:1461)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.graphics.ImageFileNameProvider cannot be found by org.eclipse.jface_3.22.100.v20210126-0831
              at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:519)
              at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
              at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
              ... 21 more

Windows
Application Folder
	.eclipseproduct
	configuration
		config.ini
		org.eclipse.equinox.simpleconfgurator
			bundles.info
	Application.exe
	Application.ini
	features
		...
	jre
	plugins
		...

Note
	From within the product.feature de-selecting "Bundle JRE for this environment with the product" does not change the result.

Be well
Comment 1 Ralph Bosson CLA 2021-06-09 11:50:04 EDT
In an attempt to find the problem I built a new minimal project using the "RCP 3.x application (minimal)" Exporting the project as a plugin product created the same result mentioned earlier.  Please respond this represents years of work and I am now dead in the water.
Comment 2 Alexander Fedorov CLA 2021-06-09 13:26:37 EDT
@Ralph I'm not sure that PDE Build is still supported, I think that building with Maven+Tycho is the better option at the moment. 

You can have a look here for example https://www.vogella.com/tutorials/EclipseTycho/article.html
Comment 3 Ralph Bosson CLA 2021-06-09 14:13:56 EDT
I see, thank you. Be well
Comment 4 Vikas Chandra CLA 2021-06-10 03:42:33 EDT
(In reply to Ralph Bosson from comment #1)
> In an attempt to find the problem I built a new minimal project using the
> "RCP 3.x application (minimal)" Exporting the project as a plugin product
> created the same result mentioned earlier.  Please respond this represents
> years of work and I am now dead in the water.

We tried with default "Eclipse RCP Application" on latest build and I was able to export as eclipse product. Can you attach a sample project? Sarika tried on a Mac OS and it worked for her

>>PDE Build is still supported

It is in maintenance mode for many years now. We still should push in patches that come in from contributors ( subject to testing).
Comment 5 Vikas Chandra CLA 2021-06-10 03:43:38 EDT
>>We still should push in patches

We still push in few patches
Comment 6 Ralph Bosson CLA 2021-06-10 08:30:25 EDT
Created attachment 286560 [details]
Example RCP Project

Thank you for your consideration. Be well
Comment 7 Sarika Sinha CLA 2021-06-10 09:12:02 EDT
(In reply to Ralph Bosson from comment #6)
> Created attachment 286560 [details]
> Example RCP Project
> 
> Thank you for your consideration. Be well

I was able to export the attached project successfully.
Comment 8 Ralph Bosson CLA 2021-06-11 10:21:17 EDT
To clarify, The project exports without error on my end.  However it does not create a useable application.
Comment 9 Eclipse Genie CLA 2023-06-02 00:33:20 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.