Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Unexpected "Installing a.jre.javase [17.0.0]" operation after import task
Unexpected "Installing a.jre.javase [17.0.0]" operation after import task [message #1842983] Thu, 08 July 2021 15:36 Go to next message
Andrey Loskutov is currently offline Andrey LoskutovFriend
Messages: 89
Registered: July 2009
Member
I'm trying to move our custom platform to Eclipse 4.21 from 4.15.

The changes in setup file are minimal (see below), and so far it works fine, except a nasty issue.

<version
name="415"
label="2020-03 (Latest Release)"
requiredJavaVersion="1.8">

=>

<version
name="421"
label="2021-09 (Latest Release)"
requiredJavaVersion="11">

If I try to import projects with Oomph import wizard (org.eclipse.oomph.setup.ui.ImportWizard), *during* import some unexpected "Installing a.jre.javase [17.0.0]" installation operation happens, which requires user to a restart *before* everything imported could be used.

With that, the workflow:

1) Run Installer to install IDE
2) Run import to import projects
3) Start working in imported projects immediately

changes to :

1) Run Installer to install IDE
2) Run import to import projects
3) Do not notice a tiny icon in status line asking for a restart
4) Try to import again
5) Eventually try to call admin or realize restart is needed
6) Start working after restart

That is not nice :-(

Here is the log after import:

Executing manual tasks
OpenJDK Runtime Environment 11.0.10+9-LTS
Product com.advantest.products.advantest_ide_RH7-421.421
Workspace /data/workspaces/e421_smoke
Project com.advantest.java.Java
Project com.advantest.java.ewc.EWC
Project com.advantest.java.dta.DTA
Project com.advantest.java.dsa.DSA
Bundle org.eclipse.oomph.setup 1.20.0.v20210618-0637, build=Advantest, branch=7475afc9e
Bundle org.eclipse.oomph.setup.core 1.20.0.v20210601-0619, build=Advantest, branch=7475afc9e
Bundle org.eclipse.oomph.setup.jdt 1.17.0.v20210221-1019, build=Advantest, branch=7475afc9e
Bundle org.eclipse.oomph.setup.p2 1.17.0.v20210601-0619, build=Advantest, branch=7475afc9e
Bundle org.eclipse.oomph.setup.projects 1.13.0.v20200624-1156, build=Advantest, branch=7475afc9e
Bundle org.eclipse.oomph.setup.workingsets 1.13.0.v20200815-0620, build=Advantest, branch=7475afc9e
Performing P2 Director
Offline = false
Mirrors = true
Resolving 3 requirements from 1 repositoryto /home/aloskuto/.eclipse_ide/advantest_ide_RH7-421/eclipse
Requirement org.eclipse.equinox.p2.iu:org.eclipse.oomph.setup.jdt.feature.group
Requirement org.eclipse.equinox.p2.iu:org.eclipse.oomph.setup.projects.feature.group
Requirement org.eclipse.equinox.p2.iu:org.eclipse.oomph.setup.workingsets.feature.group
Repository http://xxx/content/repositories/eclipse4sdk-update-site/421/composite/
Adding repository http://xxx/content/repositories/eclipse4sdk-update-site/421/composite/
Calculating requirements and dependencies.
Computing prerequisite plan
Installing a.jre.javase [17.0.0]
Preparing to commit the provisioning operation.
Committing the provisioning operation.
Took 2 seconds.
A restart is needed for the following reasons:
  - New software has been installed.
Press Finish to restart now or Cancel to restart later.


1) The question now: how do I can debug / analyze this to find out, *who* requires that "a.jre.javase [17.0.0]" thing?
2) Or is this known issue and there is a solution already?
3) Is there a way to show a *dialog* to user asking for a restart, instead of tiny blinking icon in the status line?

Regards,
Andrey
Re: Unexpected "Installing a.jre.javase [17.0.0]" operation after import task [message #1842985 is a reply to message #1842983] Thu, 08 July 2021 16:07 Go to previous messageGo to next message
Andrey Loskutov is currently offline Andrey LoskutovFriend
Messages: 89
Registered: July 2009
Member
After adding "a.jre.javase" to p2 installation setup via
<requirement
            name="a.jre.javase"/>

I don't see this appearing anymore in the log, but still *something* installed after import and a restart is required:
Executing manual tasks
OpenJDK Runtime Environment 11.0.10+9-LTS
Product com.advantest.products.advantest_ide_RH7-421.421
Workspace /tmp/wsp_oomph_test
Project com.advantest.java.Java
Project com.advantest.java.ewc.EWC
Project com.advantest.java.dta.DTA
Project com.advantest.java.dsa.DSA
Bundle org.eclipse.oomph.setup 1.20.0.v20210618-0637, build=Advantest, branch=7475afc9e
Bundle org.eclipse.oomph.setup.core 1.20.0.v20210601-0619, build=Advantest, branch=7475afc9e
Bundle org.eclipse.oomph.setup.jdt 1.17.0.v20210221-1019, build=Advantest, branch=7475afc9e
Bundle org.eclipse.oomph.setup.p2 1.17.0.v20210601-0619, build=Advantest, branch=7475afc9e
Bundle org.eclipse.oomph.setup.projects 1.13.0.v20200624-1156, build=Advantest, branch=7475afc9e
Bundle org.eclipse.oomph.setup.workingsets 1.13.0.v20200815-0620, build=Advantest, branch=7475afc9e
Performing P2 Director
Offline = false
Mirrors = true
Resolving 3 requirements from 1 repositoryto /tmp/.eclipse_ide/advantest_ide_RH7-421/eclipse
Requirement org.eclipse.equinox.p2.iu:org.eclipse.oomph.setup.jdt.feature.group
Requirement org.eclipse.equinox.p2.iu:org.eclipse.oomph.setup.projects.feature.group
Requirement org.eclipse.equinox.p2.iu:org.eclipse.oomph.setup.workingsets.feature.group
Repository http://xxx/content/repositories/eclipse4sdk-update-site/421/composite/
Adding repository http://xxxcontent/repositories/eclipse4sdk-update-site/421/composite/
Calculating requirements and dependencies.
Computing prerequisite plan
Preparing to commit the provisioning operation.
Committing the provisioning operation.
Took 3 seconds.
A restart is needed for the following reasons:
  - New software has been installed.
Press Finish to restart now or Cancel to restart later.
Re: Unexpected "Installing a.jre.javase [17.0.0]" operation after import task [message #1842986 is a reply to message #1842985] Thu, 08 July 2021 16:29 Go to previous messageGo to next message
Andrey Loskutov is currently offline Andrey LoskutovFriend
Messages: 89
Registered: July 2009
Member
Do I understand it right, following requirements are installed *during import*, and that is what is causing trouble?
Requirement org.eclipse.equinox.p2.iu:org.eclipse.oomph.setup.jdt.feature.group
Requirement org.eclipse.equinox.p2.iu:org.eclipse.oomph.setup.projects.feature.group
Requirement org.eclipse.equinox.p2.iu:org.eclipse.oomph.setup.workingsets.feature.group


Is this something new in recent Oomph version?
Is org.eclipse.oomph.setup.jdt.feature.group the one that requires a.jre.javase?
Re: Unexpected "Installing a.jre.javase [17.0.0]" operation after import task [message #1842987 is a reply to message #1842986] Thu, 08 July 2021 16:39 Go to previous messageGo to next message
Andrey Loskutov is currently offline Andrey LoskutovFriend
Messages: 89
Registered: July 2009
Member
Adding this below to the installation setup file doesn't change anything:
        <requirement
            name="a.jre.javase"/>
        <requirement
            name="org.eclipse.oomph.setup.jdt.feature.group"/>
        <requirement
            name="org.eclipse.oomph.setup.workingsets.feature.group"/>
        <requirement
            name="org.eclipse.oomph.setup.projects.feature.group"/>


Still same theater right after import wizard:

Performing P2 Director
Offline = false
Mirrors = true
Resolving 3 requirements from 1 repositoryto /tmp/.eclipse_ide/advantest_ide_RH7-421/eclipse
Requirement org.eclipse.equinox.p2.iu:org.eclipse.oomph.setup.jdt.feature.group
Requirement org.eclipse.equinox.p2.iu:org.eclipse.oomph.setup.projects.feature.group
Requirement org.eclipse.equinox.p2.iu:org.eclipse.oomph.setup.workingsets.feature.group
Repository http://xxx/content/repositories/eclipse4sdk-update-site/421/composite/
Adding repository http://xxx/content/repositories/eclipse4sdk-update-site/421/composite/
Calculating requirements and dependencies.
Computing prerequisite plan
Preparing to commit the provisioning operation.
Committing the provisioning operation.
Took 3 seconds.
A restart is needed for the following reasons:
  - New software has been installed.
Press Finish to restart now or Cancel to restart later.

Re: Unexpected "Installing a.jre.javase [17.0.0]" operation after import task [message #1843114 is a reply to message #1842987] Fri, 16 July 2021 06:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Sorry, I've been vacation; a real one without a computer.

It's hard to say anything definitive, but bundles can have package imports and it may be the case that one such package import can only satisfied by the fake a.jre.javase IUs because the no bundle is visible in any p2 repo that exports that package.

Debugging such problems challenging. If no a.jre.javase unit were present, then there would be an error saying which bundle needs it. Perhaps if you add a negative requirement (advanced mode in the properties view setting the max=0 property) for it you'd see such an error.

It is normal that if you add a project and it uses a task for which the corresponding implementation bundle is not already installed that it must be installed first. But I don't know why that's different now than before. More likely this is a side-effect of the a.jre.javase thing being installed.

As for the restart thing, the dialog itself does say that a restart is needed and if you clicked finish it will do exactly that...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Unexpected "Installing a.jre.javase [17.0.0]" operation after import task [message #1843117 is a reply to message #1843114] Fri, 16 July 2021 06:12 Go to previous messageGo to next message
Andrey Loskutov is currently offline Andrey LoskutovFriend
Messages: 89
Registered: July 2009
Member
Ed, I've now added everything to the installation setup (including javase) - and still the p2 tasks says it has to restart after I trigger "import wizard", see last log. Could it be, something enforces p2 install task to run even if nothing has to be installed now?
Re: Unexpected "Installing a.jre.javase [17.0.0]" operation after import task [message #1843122 is a reply to message #1843117] Fri, 16 July 2021 08:13 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
I do recall a bug similar to what you describe:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=573008

That took quite a bit of work to debug (and remote debugging) why the framework thought something was actually updated when it was actually not...

I.e., I think in this case the p2 task does always run because it's a MANUAL trigger, but the question is, why does the p2 task think something as actually updated...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Unexpected "Installing a.jre.javase [17.0.0]" operation after import task [message #1843133 is a reply to message #1843122] Fri, 16 July 2021 11:21 Go to previous messageGo to next message
Andrey Loskutov is currently offline Andrey LoskutovFriend
Messages: 89
Registered: July 2009
Member
Ed, I do not have any P2 task in my setup.
This is the main one:

<?xml version="1.0" encoding="UTF-8"?>
<setup:Project
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    name="java"
    label="Java Projects">
  <setupTask
      xsi:type="setup:CompoundTask"
      name="Global Settings"/>
  <project href="EWC.setup#/"/>
  <project href="DTA.setup#/"/>
  <project href="DSA.setup#/"/>
  <stream name="Java"
      label=""/>
  <logicalProjectContainer
      xsi:type="setup:ProjectCatalog"
      href="index:/org.eclipse.setup#//@projectCatalogs[name='com.advantest']"/>
  <description>Setups for all Java projects</description>
</setup:Project>


And the referenced project setup files only have projects import / working sets / text modify tasks.
P2Task is only in the products setup file, and that one installs already everything (I hope so).
Re: Unexpected "Installing a.jre.javase [17.0.0]" operation after import task [message #1843144 is a reply to message #1843133] Fri, 16 July 2021 13:16 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Well yes, there is always a p2 task, at least from the product, even if it is the "self product". You'll see the p2 task in the Confirmation page; because importing is a Manual trigger it will always perform too. The question is, why isn't determined to be a no-op update? But I can't guess why that is. I'd have to debug it, and for that I'd have to be able to reproduce it.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Unexpected "Installing a.jre.javase [17.0.0]" operation after import task [message #1843146 is a reply to message #1843144] Fri, 16 July 2021 13:32 Go to previous messageGo to next message
Andrey Loskutov is currently offline Andrey LoskutovFriend
Messages: 89
Registered: July 2009
Member
Ed, could you give pointers, where would you start debugging that? I can try to do that too. So the expectation is: even if there is a p2 task that has no updates, it should nor require restart? Can you give a hint, where this restart result is calculated by p2 and given to oomph?
Re: Unexpected "Installing a.jre.javase [17.0.0]" operation after import task [message #1843163 is a reply to message #1843146] Sat, 17 July 2021 07:19 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Here's typically what I do. Of course starting with an Oomph development environment:

https://www.eclipse.org/setups/installer/?url=http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/configurations/OomphConfiguration.setup&show=true

I run the Maven build from the External Tools configuration launchers; this way whatever installation I create will have exactly what I see in my current IDE.

Typically I copy the Setup (Installer Dialog) and modify some of the arguments, e.g., these so that the install is created completely independent in a folder that I can completely delete afterwards:
-Duser.home=D:/Users/test
-Doomph.setup.user.home.redirect=true

You can change -Doomph.setup.remote.debug=maybe from maybe to true so that VM options for remote debugging are added to the installation. Note that it uses -Doomph.update.url=${file_uri:${resource_loc:/org.eclipse.oomph.site}}/target/repository/ to install the Oomph version in your IDE.

There is a Remote Debug (Port 8123) launcher for attaching. At line 904 of P2TaskImpl you'll see this
        boolean profileChanged = transaction.commit(commitContext, context.getProgressMonitor(true));
        if (context.getTrigger() != Trigger.BOOTSTRAP)
This must be finding that there were updates installed. It determines that like this at line 555 of ProfileTransactionImpl:
            profileImpl.setDefinition(profileDefinition);
            return delegate.getTimestamp() != timestamp;
Last time the problem was here:

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


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Profile registry filling up
Next Topic:Eclipse Installation Error
Goto Forum:
  


Current Time: Fri Apr 26 05:23:10 GMT 2024

Powered by FUDForum. Page generated in 0.04094 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top