Bug 569513 - Setting up platform-ui SDK environment fails.
Summary: Setting up platform-ui SDK environment fails.
Status: RESOLVED FIXED
Alias: None
Product: Oomph
Classification: Tools
Component: Setup (show other bugs)
Version: 1.20.0   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
: 570510 570515 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-12-06 14:13 EST by Dieter Mai CLA
Modified: 2021-03-13 08:53 EST (History)
6 users (show)

See Also:


Attachments
Updater Exception (62.12 KB, image/png)
2020-12-06 14:13 EST, Dieter Mai CLA
no flags Details
setup.log from eclipse\configuration\org.eclipse.oomph.setup (125.31 KB, application/octet-stream)
2020-12-31 03:48 EST, Dieter Mai CLA
no flags Details
log file from ws\.metadata\.plugins\org.eclipse.ui.workbench (15.12 KB, application/octet-stream)
2020-12-31 03:50 EST, Dieter Mai CLA
no flags Details
Used java Version (1.18 KB, application/octet-stream)
2020-12-31 03:53 EST, Dieter Mai CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dieter Mai CLA 2020-12-06 14:13:17 EST
Created attachment 284978 [details]
Updater Exception

I tried to execute the steps for for getting on platform-ui SDK like it is descriped at [1]. This fails at some point with the following exception.

########################
Targlet container profile update completed
java.nio.file.ProviderNotFoundException: Provider "jar" not found
  at java.base/java.nio.file.FileSystems.newFileSystem(Unknown Source)
  at java.base/java.nio.file.FileSystems.newFileSystem(Unknown Source)
  at org.eclipse.jdt.internal.compiler.util.CtSym.init(CtSym.java:137)
  at org.eclipse.jdt.internal.compiler.util.CtSym.<init>(CtSym.java:120)
  at org.eclipse.jdt.internal.compiler.util.JRTUtil.lambda$1(JRTUtil.java:136)
  at java.base/java.util.concurrent.ConcurrentHashMap.compute(Unknown Source)
  at org.eclipse.jdt.internal.compiler.util.JRTUtil.getCtSym(JRTUtil.java:133)
  at org.eclipse.jdt.internal.core.builder.ClasspathJrtWithReleaseOption.<init>(ClasspathJrtWithReleaseOption.java:77)
  at org.eclipse.jdt.internal.core.builder.ClasspathLocation.forJrtSystem(ClasspathLocation.java:147)
  at org.eclipse.pde.internal.core.TargetPlatformHelper.querySystemPackages(TargetPlatformHelper.java:427)
  at org.eclipse.pde.internal.core.TargetPlatformHelper.getPlatformProperties(TargetPlatformHelper.java:393)
  at org.eclipse.pde.internal.core.MinimalState.getProfilePlatformProperties(MinimalState.java:182)
  at org.eclipse.pde.internal.core.MinimalState.initializePlatformProperties(MinimalState.java:176)
  at org.eclipse.pde.internal.core.PDEState.<init>(PDEState.java:67)
  at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:602)
  at org.eclipse.pde.internal.core.PluginModelManager.targetReloaded(PluginModelManager.java:522)
  at org.eclipse.pde.core.target.LoadTargetDefinitionJob.resetPlatform(LoadTargetDefinitionJob.java:219)
  at org.eclipse.pde.core.target.LoadTargetDefinitionJob.runInWorkspace(LoadTargetDefinitionJob.java:146)
  at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
  at org.eclipse.oomph.util.pde.TargetPlatformUtil.activateTargetDefinition(TargetPlatformUtil.java:156)
  at org.eclipse.oomph.targlets.internal.core.TargletContainer.forceUpdate(TargletContainer.java:813)
  at org.eclipse.oomph.setup.targlets.impl.TargletTaskImpl$4.run(TargletTaskImpl.java:1174)
  at org.eclipse.oomph.util.pde.TargetPlatformUtil.runWithTargetPlatformService(TargetPlatformUtil.java:120)
  at org.eclipse.oomph.setup.targlets.impl.TargletTaskImpl.perform(TargletTaskImpl.java:1035)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:3828)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.access$1(SetupTaskPerformer.java:3771)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:5137)
  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:5131)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.access$0(SetupTaskPerformer.java:5129)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:3762)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:3737)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:3630)
  at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:593)
  at org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:720)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
########################

[1] https://wiki.eclipse.org/Platform_UI/How_to_Contribute/Oomph
Comment 1 Ed Merks CLA 2020-12-11 01:14:22 EST
I could not reproduce this.  It continues and imports the projects:

Sending ProfileUpdateSucceededEvent[source=Modular Target, profile=D__Users_test_platform-ui-master_ws-987fb0c7a1aa596d9a3819e8b8962b320fb98416] to PomArtifactUpdater
Sending ProfileUpdateSucceededEvent[source=Modular Target, profile=D__Users_test_platform-ui-master_ws-987fb0c7a1aa596d9a3819e8b8962b320fb98416] to PomModulesUpdater
Sending ProfileUpdateSucceededEvent[source=Modular Target, profile=D__Users_test_platform-ui-master_ws-987fb0c7a1aa596d9a3819e8b8962b320fb98416] to TargetDefinitionGenerator
Targlet container profile update completed
Importing project org.eclipse.e4.emf.xpath.test
Importing project org.eclipse.tests.urischeme
Importing project org.eclipse.ui.forms.examples
Importing project org.eclipse.core.databinding.observable
Importing project org.eclipse.ui.examples.undo

Does it fail the same way if you use Help -> Perform Setups Tasks... to run it again?
Comment 2 Ed Merks CLA 2020-12-11 01:33:20 EST
Looking at the source code:

https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/tree/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/CtSym.java#n137

It's clear that JDT is expecting to have a URI that starts with jar: scheme to be able to create a new file system.  But the call throws this exception not expected/handled by JDT:

     * @throws  ProviderNotFoundException
     *          if a provider supporting the URI scheme is not installed

This is likely related to your specific JDK.

But I cannot reproduce this and if there is something to fix, it's more likely something in JDT.
Comment 3 Andrey Loskutov CLA 2020-12-11 02:01:07 EST
Looks like a plroblem with your Java installation.
I see JDK 15 is used in setup, but which one and with which arguments used to run setup itself? Please attach full setup log. Please also try to check how many JDK's are installed and if you have used some broken one.
Comment 4 Dieter Mai CLA 2020-12-31 03:18:31 EST
just now saw the comment.

i will check this and report back
Comment 5 Dieter Mai CLA 2020-12-31 03:48:59 EST
Created attachment 285142 [details]
setup.log from eclipse\configuration\org.eclipse.oomph.setup
Comment 6 Dieter Mai CLA 2020-12-31 03:50:01 EST
Created attachment 285143 [details]
log file from ws\.metadata\.plugins\org.eclipse.ui.workbench
Comment 7 Dieter Mai CLA 2020-12-31 03:53:37 EST
Created attachment 285144 [details]
Used java Version

The release file from my OracleOpenJDK 15 installation
Comment 8 Dieter Mai CLA 2020-12-31 03:54:09 EST
Let me know if you need anything else
Comment 9 Ed Merks CLA 2020-12-31 03:59:44 EST
Note that that the log is showing:

[2020-12-31 09:27:38] Executing bootstrap tasks
[2020-12-31 09:27:38] OpenJDK Runtime Environment 14.0.2+12-46

[2020-12-31 09:27:48] Launching the installed product...
[2020-12-31 09:28:19] Executing startup tasks
[2020-12-31 09:28:19] OpenJDK Runtime Environment 14.0.2+12-46

So that's the JDK you are using in the installer and also in the launched IDE not the Java 15 one.

The installer lets you choose the JRE.  Try to choose Java 15 going back to first page (or editing the eclipse.ini of the installation you already have).
Comment 10 Dieter Mai CLA 2021-01-02 14:02:51 EST
I've selected my default jdk (OpenJDK 15) in the installer. This is not the issue.

The "OpenJDK Runtime Environment 14.0.2+12-46" is a justJ JDK that comes with the installer. This is hard coded in the "eclipse-inst.ini" of the installer.
The installer starts eclipse automatically with the same jdk. (Note that the newest version of the installer, comes with a JDK of version 15)

I tried today reproduce this with different settings like using different JDKs. This ultimately failed because the setup fails now earlier with message [1]. This seems like a different issue but it blocks me from further tests.



[1]
Cloning Git repo ssh://dmaio0a@git.eclipse.org:29418/platform/eclipse.platform.ui to C:\Users\Dieter\devel\eclipse\oomph\ui-master\git\eclipse.platform.ui
java.lang.Exception: org.eclipse.jgit.api.errors.TransportException: write(ChannelOutputStream[ChannelExec[id=0, recipient=0]-JGitClientSession[dmaio0a@git.eclipse.org/198.41.30.196:29418]] SSH_MSG_CHANNEL_DATA) len=4 - channel already closed
  at org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.perform(GitCloneTaskImpl.java:989)
Comment 11 Ed Merks CLA 2021-01-03 02:46:37 EST
The cloning problems sounds a bit like this thread:

https://www.eclipse.org/lists/jdt-dev/msg01700.html

Maybe it's a variation of a bug like this one:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=565854
Comment 12 Dieter Mai CLA 2021-01-06 13:35:58 EST
I was able to further analyze this.

My tests show
- when i select the default jdk in the installer, the installation fails. I tested this with OpenJDK 11/14/15
- when i select a different jdk then the default one, the installation runs with no issue.

It looks like the installer creates a -vm entry in the eclipse.ini only when the selected JDK is not the system default. If the default jdk is selected, the installer starts eclipse with the justj that comes with the installer. This justj is missing the module jdk.zipfs with the FileSystemProvider ZipFileSystemProvider. ZipFileSystemProvider provides support for "jar"

I assume the justj that comes with the installer is only meant for running the installer, not eclipse itself. So the issue seems to be that the installer does not start eclipse with the correct JDK.
Comment 13 Ed Merks CLA 2021-01-07 02:36:16 EST
Ah, that would well be!  And would be something I never tested/encountered because my default JVM is an old 1.8 so I always choose something that isn't the default and hence there is always a -vm option.  And it seems to me that the native launcher "mangles" the environment so I imagine it could well be the case that the installer's embedded JRE has been placed on the PATH which could cause it to be used then the IDE is launched by the installer without a -vm option (though that installation would use the default JRE when that IDE is directly launched at a later point in time).

So probably when we don't generate -vm option in the eclipse.ini we should launch with a -vm argument to the launched process...

That will require some changes to the installer...
Comment 14 Ed Merks CLA 2021-01-11 10:27:13 EST
Thanks again for investigating!  

The fix is committed to master:

https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/commit/?id=dda7c66e6fb4be55da622c3c91a2f1f12cbaf93d

If you care to try it out, it's available in a nightly build:

https://www.eclipse.org/downloads/download.php?file=/oomph/products/latest/eclipse-inst-jre-win64.exe
Comment 15 Dieter Mai CLA 2021-01-11 11:45:33 EST
Just tested it with the link you provided. It worked fine :)
Comment 16 Ed Merks CLA 2021-01-12 01:59:33 EST
(In reply to Dieter Mai from comment #15)
> Just tested it with the link you provided. It worked fine :)

Awesome. Thanks so much yet again for confirming the fix.  This fix will be in 2020-03 M1 build for this week.
Comment 17 Ed Merks CLA 2021-01-20 09:49:29 EST
*** Bug 570510 has been marked as a duplicate of this bug. ***
Comment 18 Ed Merks CLA 2021-01-20 10:10:01 EST
*** Bug 570515 has been marked as a duplicate of this bug. ***
Comment 19 Jonah Graham CLA 2021-01-21 12:15:48 EST
*** Bug 570515 has been marked as a duplicate of this bug. ***
Comment 20 Pierre-Yves Bigourdan CLA 2021-03-13 08:53:58 EST
(In reply to Ed Merks from comment #14)
> If you care to try it out, it's available in a nightly build:
> 
> https://www.eclipse.org/downloads/download.php?file=/oomph/products/latest/
> eclipse-inst-jre-win64.exe

Was facing the same issue and can also confirm that downloading the nightly solves the problem, thanks. :)