Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [justj-dev] JustJ and Java 11

Ed,

I misunderstood your initial suggestion. I removed the vm commands. Works as you expected.

Regards,
Alois


On Mon, 2020-06-15 at 22:20 +0200, Ed Merks wrote:
> Alois,
>
> I see  you have this in the product:
>
>        <programArgs>-vm
> plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_14.0.1.v20200611-1504/jre/bin
>
> This should not be needed, and moreover is inappropriate, i.e., wrong.
> The plugin itself has a touchpoint to add this instruction; that's what
> caused the null pointer exception in the older p2 version.
> Furthermore, this specific location is different for each platform
> (os/arch), and for each version of the JRE, so it's simply wrong to
> specify this in the *.product.  The product should only specify the
> feature/plugin that is required. The repository in which it's resolved
> determines the version and then the -vm option will be added
> automatically based on which version is resolved along with the os/arch
> of the product; generally one builds the product for all three os/arch
> combinations supported by the platform.
>
> Please try it without the -vm lines in the *.product
>
> Regards,
> Ed
>
> On 15.06.2020 21:03, Alois Zoitl wrote:
> > Ed,
> >
> > On Mon, 2020-06-15 at 19:33 +0200, Ed Merks wrote:
> > > Alois,
> > >
> > > Are you using Tycho 1.7.0?   I recall there was such an NPE with older
> > > versions of p2 so I'm quite sure you need to use Tycho 1.7.0 (with a
> > > newer p2) to avoid this specific NPE problem.  But it looks like you're
> > > on track otherwise...
> > Argh, I  missed the new Tycho version. We were on 1.6.0. Now it works like a charm.
> >
> > > I'll try to get this all better documented once you're successful as well.
> > I tuned a bit and this is the most minimal configuration I could make work for Eclipse 4diac: https://git.eclipse.org/r/#/c/164933/
> > The only thing which I currently don't like is the version number in the -vm argument.
> >
> > > Thanks for giving it a trial run!!
> > Happy to do that. It solves a long time feature request from our users. Therefore thanks for providing JustJ.
> >
> > BR,
> > Alois
> >
> > > Regards,
> > > Ed
> > >
> > > On 15.06.2020 14:37, Alois Zoitl wrote:
> > > > Ed,
> > > >
> > > > thanks for your explanation and tests. Eclipse Tycho is for me still trial, error, and google. I tried what you said however with several different settings I
> > > > always get the following error message:
> > > >
> > > >    Installing org.eclipse.justj.openjdk.hotspot.jre.full.stripped.feature.group 14.0.1.v20200611-1504.
> > > >    Installation failed.
> > > >    An error occurred while installing the items
> > > > 	session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null -->
> > > > [R]org.eclipse.justj.openjdk.hotspot.jre.full.stripped.linux.x86_64 14.0.1.v20200611-1504,
> > > > action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetJvmAction).
> > > >
> > > > 	Caused by:
> > > > 	java.lang.NullPointerException
> > > >     There were errors. See log file: /home/az/prog/4diac-ide_dev/org.eclipse.4diac.ide/plugins/org.eclipse.fordiac.ide.master/workspace/.metadata/.log
> > > >
> > > > Digging into the NPE I found that
> > > >      org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetJvmAction.adjustWorkbenchSystemProperties(SetJvmAction.java:82)
> > > > was causing the issue.
> > > >
> > > > There something about an eclipse.commands system property is handled. We are still on Eclipse 2020-03. Could this be the problem? Or did I add the vm param at
> > > > the wrong place. I did it in the product file in the launch configuration.
> > > >
> > > > BR,
> > > > Alois
> > > >
> > > >
> > > >
> > > > On Sat, 2020-06-13 at 12:00 +0200, Ed Merks wrote:
> > > > > Alois,
> > > > >
> > > > > These are not dumb question!
> > > > >
> > > > > In the sample, there is no < target> (well, there is an empty one) but I added the <profileProperties> to disable (filter out) the negative requirements:
> > > > >
> > > > >             <plugin>
> > > > >               <groupId>org.eclipse.tycho</groupId>
> > > > >               <artifactId>target-platform-configuration</artifactId>
> > > > >               <version>${tycho-version}</version>
> > > > >               <configuration>
> > > > >                 <target>
> > > > >                 </target>
> > > > >
> > > > >                 <!--executionEnvironmentDefault>JavaSE-${javaVersion}</executionEnvironmentDefault-->
> > > > >                 <includePackedArtifacts>true</includePackedArtifacts>
> > > > >                 <environments>
> > > > >                   <environment>
> > > > >                     <os>win32</os>
> > > > >                     <ws>win32</ws>
> > > > >                     <arch>x86_64</arch>
> > > > >                   </environment>
> > > > >                   <environment>
> > > > >                     <os>macosx</os>
> > > > >                     <ws>cocoa</ws>
> > > > >                     <arch>x86_64</arch>
> > > > >                   </environment>
> > > > >                   <environment>
> > > > >                     <os>linux</os>
> > > > >                     <ws>gtk</ws>
> > > > >                     <arch>x86_64</arch>
> > > > >                   </environment>
> > > > >                 </environments>
> > > > >                 <dependency-resolution>
> > > > >                   <extraRequirements>
> > > > >                     <requirement>
> > > > >                       <type>p2-installable-unit</type>
> > > > >                       <id>org.eclipse.license.feature.group</id>
> > > > >                       <versionRange>0.0.0</versionRange>
> > > > >                     </requirement>
> > > > >                   </extraRequirements>
> > > > >                   <profileProperties>
> > > > >                     <org.eclipse.justj.buildtime>true</org.eclipse.justj.buildtime>
> > > > >                   </profileProperties>
> > > > >                 </dependency-resolution>
> > > > >               </configuration>
> > > > >             </plugin>
> > > > >
> > > > > The above is in the parent POM. That works fine for the sample, but fails like this without that:
> > > > >
> > > > > [INFO] Resolving dependencies of MavenProject: org.eclipse.justj:org.eclipse.justj.tools.sample.product:0.1.0-SNAPSHOT @ D:\Users\merks\justj\git\justj.tools\products\org.eclipse.justj.tools.sample.product\pom.xml
> > > > > [INFO] {osgi.os=win32, osgi.ws=win32, org.eclipse.update.install.features=true, osgi.arch=x86_64}
> > > > > [ERROR] Cannot resolve project dependencies:
> > > > > [ERROR]   Software being installed: a.jre.javase 9.0.0
> > > > > [ERROR]   Software being installed: org.eclipse.justj.tools.sample.product 0.1.0.qualifier
> > > > > [ERROR]   Cannot satisfy dependency: org.eclipse.justj.openjdk.hotspot.jre.full 14.0.1.v20200611-1504 depends on: org.eclipse.equinox.p2.iu; a.jre.javase 0.0.0
> > > > > [ERROR]   Cannot satisfy dependency: org.eclipse.justj.openjdk.hotspot.jre.full.feature.group 14.0.1.v20200611-1504 depends on: org.eclipse.equinox.p2.iu; org.eclipse.justj.openjdk.hotspot.jre.full [14.0.1.v20200611-1504,14.0.1.v20200611-1504]
> > > > > [ERROR]   Cannot satisfy dependency: org.eclipse.justj.tools.sample.product 0.1.0.qualifier depends on: org.eclipse.equinox.p2.iu; org.eclipse.justj.openjdk.hotspot.jre.full.feature.group 0.0.0
> > > > >
> > > > > When I try the same thing with the Oomph installer product which has a non-empty target platform definition like this:
> > > > >
> > > > >             <plugin>
> > > > >               <groupId>org.eclipse.tycho</groupId>
> > > > >               <artifactId>target-platform-configuration</artifactId>
> > > > >               <version>${tycho-version}</version>
> > > > >               <configuration>
> > > > >                 <target>
> > > > >                   <artifact>
> > > > >                     <groupId>org.eclipse.oomph</groupId>
> > > > >                     <artifactId>org.eclipse.oomph.tp</artifactId>
> > > > >                     <version>1.0.0-SNAPSHOT</version>
> > > > >                   </artifact>
> > > > >                 </target>
> > > > >                 <resolveWithExecutionEnvironmentConstraints>false</resolveWithExecutionEnvironmentConstraints>
> > > > >                 <includePackedArtifacts>true</includePackedArtifacts>
> > > > >                 <environments>
> > > > >                   <environment>
> > > > >                     <os>win32</os>
> > > > >                     <ws>win32</ws>
> > > > >                     <arch>x86_64</arch>
> > > > >                   </environment>
> > > > >                   <environment>
> > > > >                     <os>macosx</os>
> > > > >                     <ws>cocoa</ws>
> > > > >                     <arch>x86_64</arch>
> > > > >                   </environment>
> > > > >                   <environment>
> > > > >                     <os>linux</os>
> > > > >                     <ws>gtk</ws>
> > > > >                     <arch>x86_64</arch>
> > > > >                   </environment>
> > > > >                 </environments>
> > > > >                 <dependency-resolution>
> > > > >                   <extraRequirements>
> > > > >                     <requirement>
> > > > >                       <type>p2-installable-unit</type>
> > > > >                       <id>org.eclipse.jdt.feature.group</id>
> > > > >                       <versionRange>0.0.0</versionRange>
> > > > >                     </requirement>
> > > > >                   </extraRequirements>
> > > > >                   <profileProperties>
> > > > >                     <org.eclipse.justj.buildtime>true</org.eclipse.justj.buildtime>
> > > > >                   </profileProperties>
> > > > >                 </dependency-resolution>
> > > > >               </configuration>
> > > > >
> > > > > Here the profile property doesn't seem to have an effect and I get a resolution failure like yours (and like the one above).  The only thing that seems to work is to add the <resolveWithExecutionEnvironmentConstraints> to set it to false.  I found out about that here:
> > > > >
> > > > >     https://wiki.eclipse.org/Tycho/Execution_Environments
> > > > >
> > > > > Of course it's not clear why the profileProperties approach doesn't work with a real <target>  (a bug?) nor what are all the implications of resolveWithExecutionEnvironmentConstraints set to false (might there be problems that go undetected?).   The latter seems to make resolution horribly slow.   I don't have enough Tycho expertise to answer those things.
> > > > >
> > > > > In any case, with this I can build the installer product with this in the <product>.ini:j
> > > > > > -vm
> > > > > > plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_14.0.1.v20200611-1504/jre/bin
> > > > > And that actually launches so likely you can get it to work using this approach.
> > > > >
> > > > > Regards,
> > > > > Ed
> > > > >
> > > > >
> > > > > On 12.06.2020 22:04, Alois Zoitl wrote:
> > > > > > On Fri, 2020-06-12 at 21:20 +0200, Ed Merks wrote:
> > > > > > > Does something explicitly require a.jre.javase?
> > > > > > AFAIK no. 4diac IDE is an Eclipse workbench based RCP. I searched and in no place found an explicit reference to a.jre.javase or a.jre.
> > > > > >
> > > > > > Any tips what could pull it in?
> > > > > >
> > > > > > grepping over our code base I found in the product file:
> > > > > >      <vm>
> > > > > >         <linux include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11</linux>
> > > > > >         <macos include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11</macos>
> > > > > >         <windows include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11</windows>
> > > > > >      </vm>
> > > > > >
> > > > > > and our plugins have a .classpath file:
> > > > > >      <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
> > > > > >
> > > > > >
> > > > > > I hope these are not too dumb questions but I see that you don't have these in the sample product. Do we have these wrongly?
> > > > > >
> > > > > > Thanks a lot for you help,
> > > > > > Alois
> > > > > >
> > > > > >
> > > > > >
> > > > > > > The JustJ JRE IUs have
> > > > > > > a negative requirement on a.jre.javase and on a.jre, so you can't
> > > > > > > explicitly require both.  In general I would expect nothing explicitly
> > > > > > > references either a.jre.javase nor a.jre. These are "fake/synthetic" IUs
> > > > > > > whose only purpose is to satisfy BREE requirements and package imports
> > > > > > > at p2 resolution time that are satisfied by a real JRE at runtime via
> > > > > > > OSGi.  The JustJ JRE IUs will also satisfy BREE and package imports so
> > > > > > > definitely no explicit use of a.jre.javase should be present.
> > > > > > >
> > > > > > > On 12.06.2020 17:31, Alois Zoitl wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > we recently updated Eclipse 4diac to Java 11 and as next step we wanted to bundle JustJ with it. However following the documentation and add the update site to
> > > > > > > > our target platform and the product file, Eclipse Tycho can not resolve the dependencies. See Maven output below.
> > > > > > > >
> > > > > > > > As I'm not that good with maven I firstly wanted to check if the problem is more likely on our side or on the JustJ side.
> > > > > > > >
> > > > > > > > Thanks in advance,
> > > > > > > > Alois
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > [INFO] Adding repository https://download.eclipse.org/justj/sandbox/jres/14/updates/nightly/latest
> > > > > > > > [INFO] Fetching p2.index from https://download.eclipse.org/justj/sandbox/jres/14/updates/nightly/N202006111504/
> > > > > > > > [ERROR] Cannot resolve target definition:
> > > > > > > > [ERROR]   Software being installed: a.jre.javase 11.0.0
> > > > > > > > [ERROR]   Software being installed: org.eclipse.justj.openjdk.hotspot.jre.full.stripped.feature.group 14.0.1.v20200611-1504
> > > > > > > > [ERROR]   Cannot satisfy dependency: org.eclipse.justj.openjdk.hotspot.jre.full.stripped 14.0.1.v20200611-1504 depends on: org.eclipse.equinox.p2.iu;
> > > > > > > > a.jre.javase 0.0.0
> > > > > > > > [ERROR]   Cannot satisfy dependency: org.eclipse.justj.openjdk.hotspot.jre.full.stripped.feature.group 14.0.1.v20200611-1504 depends on:
> > > > > > > > org.eclipse.equinox.p2.iu; org.eclipse.justj.openjdk.hotspot.jre.full.stripped [14.0.1.v20200611-1504,14.0.1.v20200611-1504]
> > > > > > > > [ERROR]
> > > > > > > > [ERROR] Failed to resolve target definition /home/az/prog/4diac-
> > > > > > > > ide_dev/org.eclipse.4diac.ide/plugins/org.eclipse.fordiac.ide.product/org.eclipse.fordiac.ide.product.target: See log for details -> [Help 1]
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > justj-dev mailing list
> > > > > > > > justj-dev@xxxxxxxxxxx
> > > > > > > > To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> > > > > > > > https://dev.eclipse.org/mailman/listinfo/justj-dev
> > > > > > > _______________________________________________
> > > > > > > justj-dev mailing list
> > > > > > > justj-dev@xxxxxxxxxxx
> > > > > > > To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> > > > > > > https://dev.eclipse.org/mailman/listinfo/justj-dev
> > > > > > _______________________________________________
> > > > > > justj-dev mailing list
> > > > > > justj-dev@xxxxxxxxxxx
> > > > > > To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> > > > > > https://dev.eclipse.org/mailman/listinfo/justj-dev
> > > > > _______________________________________________
> > > > > justj-dev mailing list
> > > > > justj-dev@xxxxxxxxxxx
> > > > > To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> > > > > https://dev.eclipse.org/mailman/listinfo/justj-dev
> > > > _______________________________________________
> > > > justj-dev mailing list
> > > > justj-dev@xxxxxxxxxxx
> > > > To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> > > > https://dev.eclipse.org/mailman/listinfo/justj-dev
> > > _______________________________________________
> > > justj-dev mailing list
> > > justj-dev@xxxxxxxxxxx
> > > To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> > > https://dev.eclipse.org/mailman/listinfo/justj-dev
> > _______________________________________________
> > justj-dev mailing list
> > justj-dev@xxxxxxxxxxx
> > To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> > https://dev.eclipse.org/mailman/listinfo/justj-dev
> _______________________________________________
> justj-dev mailing list
> justj-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/justj-dev



Back to the top