Re: [equinox-dev] Eclipse won't work on JDK9b61 unless default classloader hiearchy is changed

2015-05-12 Thread Daniel Megert
As of http://download.eclipse.org/eclipse/downloads/drops4/I20150511-2130/ 
Eclipse starts again using the latest JRE 9.

Dani



From:   Tom Schindl tom.schi...@bestsolution.at
To: equinox-dev@eclipse.org
Date:   07.05.2015 22:23
Subject:Re: [equinox-dev] Eclipse won't work on  JDK9b61 unless 
default classloader hiearchy is changed
Sent by:equinox-dev-boun...@eclipse.org



Hi,

[...]
 But you mention that using the boot class loader as the parent class
 loader for bundle class loaders causes problems for Nashorn.  I fail to
 see why that is. 


I don't know the inner details but if you run this app

 package samplenashornosgi;
 
 import javax.script.ScriptEngine;
 import javax.script.ScriptEngineManager;
 
 import org.eclipse.equinox.app.IApplication;
 import org.eclipse.equinox.app.IApplicationContext;
 
 public class Application implements IApplication {
public static class SampleObject {
public SampleObject() {
System.err.println(I am: 
 + this);
}
}
public Object start(IApplicationContext context) throws 
Exception {
System.out.println(Hello RCP World!);
 
ScriptEngineManager mgr = new 
ScriptEngineManager();
ScriptEngine engine = 
mgr.getEngineByName(nashorn);
engine.eval(var SimpleObject = 
Java.type('samplenashornosgi.Application.SampleObject'); new 
SimpleObject(););
engine.eval(var SimpleObject = 
Java.type('samplenashornosgi.Application.SampleObject'); var 
SimpleSubClass = Java.extend(SimpleObject); new SimpleSubClass() {};);
 
return IApplication.EXIT_OK;
}
 
public void stop() {
// nothing to do
}
 }

With the default setting you get:

 Hello RCP World!
 I am: samplenashornosgi.Application$SampleObject@2f8dad04
 !SESSION 2015-05-07 22:13:46.840 
---
 eclipse.buildId=unknown
 java.version=1.8.0_60-ea
 java.vendor=Oracle Corporation
 BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE
 Framework arguments:  -application SampleNashornOSGi.application
 Command-line arguments:  -application SampleNashornOSGi.application 
-data 
/Users/tomschindl/Documents/e-workspaces/efxclipse-ide/../runtime-SampleNashornOSGi.application
 
-dev 
file:/Users/tomschindl/Documents/e-workspaces/efxclipse-ide/.metadata/.plugins/org.eclipse.pde.core/SampleNashornOSGi.application/dev.properties
 
-os macosx -ws cocoa -arch x86_64 -consoleLog
 
 !ENTRY org.eclipse.osgi 4 0 2015-05-07 22:13:47.804
 !MESSAGE Application error
 !STACK 1
 javax.script.ScriptException: TypeError: Can not find a common class 
loader for ScriptObject and samplenashornosgi.Application.SampleObject. in 
eval at line number 1
at 
jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:458)
at 
jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:442)
at 
jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:404)
at 
jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:400)
at 
jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
at 
javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at 
samplenashornosgi.Application.start(Application.java:24)
at 
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:380)
at 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at 
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at 
org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
 Caused by: eval:1 TypeError: Can not find a common class 

Re: [equinox-dev] Bundles remaining in life cyle Starting.

2015-05-12 Thread Neil Bartlett
No sorry this is not right. Alex and Tom’s answer was correct. Please refer to 
section 4.4.6.2 of the OSGi Core R6 specification for details of the Lazy 
Activation Policy and its impact on bundle lifecycle.

Unsatisfied imports such as in your example would cause a failure of 
resolution, leaving the bundle in INSTALLED state.

Regards,
Neil


 On 12 May 2015, at 11:29, Pablo Beltran pbeltr...@gmail.com wrote:
 
 Hmm, I would say they remain on such state due a missing class (or any other 
 problem while loading B in memory)
 
 For instance, plugin A imports class B which imports class C. If C is not 
 available A will remain in the Starting state for ever. 
 El 12/5/2015 11:49, Lars Vogel lars.vo...@vogella.com 
 mailto:lars.vo...@vogella.com escribió:
 Thanks Alex and Tom for the clarification.
 
 Best regards, Lars
 
 On Fri, May 8, 2015 at 3:14 PM, Thomas Watson tjwat...@us.ibm.com 
 mailto:tjwat...@us.ibm.com wrote:
 Alex is correct.  Things in the STARTING state are waiting to be lazily 
 activated on first class define.
 
 Tom
 
 -equinox-dev-boun...@eclipse.org mailto:equinox-dev-boun...@eclipse.org 
 wrote: -
 To: Equinox development mailing list equinox-dev@eclipse.org 
 mailto:equinox-dev@eclipse.org
 From: Alex Blewitt 
 Sent by: equinox-dev-boun...@eclipse.org 
 mailto:equinox-dev-boun...@eclipse.org
 Date: 05/07/2015 04:40PM
 Subject: Re: [equinox-dev] Bundles remaining in life cyle Starting.
 
 
 I think they’re placed into that state if they are lazily started, i.e. they 
 have a BundleActivationPolicy of ‘lazy’. 
 
 http://www.osgi.org/Design/LazyStart http://www.osgi.org/Design/LazyStart
 http://wiki.osgi.org/wiki/Bundle-ActivationPolicy 
 http://wiki.osgi.org/wiki/Bundle-ActivationPolicy
 
 I think it goes from ‘starting’ to ‘started’ when classes have been loaded 
 from the bundle.
 
 Alex
 
 On 7 May 2015, at 22:31, Lars Vogel lars.vo...@vogella.com 
 mailto:lars.vo...@vogella.com wrote:
 
 Hi,
 
 I frequently see lots of bundles remaining in the life cyle status 
 Starting. Is this expected? I would assume that Starting is a temporary 
 status and that once a bundle has finished starting, it becomes Active.
 
 Best regards, Lars
 
 -- 
 
 Eclipse Platform and e4 project co-lead
 vogella GmbH CEO
 
 Haindaalwisch 17a, 22395 Hamburg
 Amtsgericht Hamburg: HRB 127058
 Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
 USt-IdNr.: DE284122352
 Fax (032) 221739404 tel:%28032%29%20221739404, Email: 
 lars.vo...@vogella.com mailto:lars.vo...@vogella.com, Web: 
 http://www.vogella.com http://www.vogella.com/
 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org mailto:equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe from 
 this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev 
 https://dev.eclipse.org/mailman/listinfo/equinox-dev
 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org mailto:equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe from 
 this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev 
 https://dev.eclipse.org/mailman/listinfo/equinox-dev
 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org mailto:equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe from 
 this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev 
 https://dev.eclipse.org/mailman/listinfo/equinox-dev
 
 
 
 -- 
 Geschäftsführer
 
 vogella GmbH
 
 Haindaalwisch 17a, 22395 Hamburg
 Amtsgericht Hamburg: HRB 127058
 Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
 USt-IdNr.: DE284122352
 Fax (032) 221739404, Email: lars.vo...@vogella.com 
 mailto:lars.vo...@vogella.com, Web: http://www.vogella.com 
 http://www.vogella.com/
 
 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org mailto:equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe from 
 this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev 
 https://dev.eclipse.org/mailman/listinfo/equinox-dev
 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe from 
 this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev

___
equinox-dev mailing list
equinox-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Re: [equinox-dev] Bundles remaining in life cyle Starting.

2015-05-12 Thread Pablo Beltran
Hmm, I would say they remain on such state due a missing class (or any
other problem while loading B in memory)

For instance, plugin A imports class B which imports class C. If C is not
available A will remain in the Starting state for ever.
 El 12/5/2015 11:49, Lars Vogel lars.vo...@vogella.com escribió:

 Thanks Alex and Tom for the clarification.

 Best regards, Lars

 On Fri, May 8, 2015 at 3:14 PM, Thomas Watson tjwat...@us.ibm.com wrote:

 Alex is correct.  Things in the STARTING state are waiting to be lazily
 activated on first class define.

 Tom

 -equinox-dev-boun...@eclipse.org wrote: -
 To: Equinox development mailing list equinox-dev@eclipse.org
 From: Alex Blewitt
 Sent by: equinox-dev-boun...@eclipse.org
 Date: 05/07/2015 04:40PM
 Subject: Re: [equinox-dev] Bundles remaining in life cyle Starting.


 I think they’re placed into that state if they are lazily started, i.e.
 they have a BundleActivationPolicy of ‘lazy’.

 http://www.osgi.org/Design/LazyStart
 http://wiki.osgi.org/wiki/Bundle-ActivationPolicy

 I think it goes from ‘starting’ to ‘started’ when classes have been
 loaded from the bundle.

 Alex

 On 7 May 2015, at 22:31, Lars Vogel lars.vo...@vogella.com wrote:

 Hi,

 I frequently see lots of bundles remaining in the life cyle status
 Starting. Is this expected? I would assume that Starting is a temporary
 status and that once a bundle has finished starting, it becomes Active.

 Best regards, Lars

 --

 Eclipse Platform and e4 project co-lead
 vogella GmbH CEO

 Haindaalwisch 17a, 22395 Hamburg
 Amtsgericht Hamburg: HRB 127058
 Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
 USt-IdNr.: DE284122352
 Fax (032) 221739404, Email: lars.vo...@vogella.com, Web:
 http://www.vogella.com
  ___
 equinox-dev mailing list
 equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe
 from this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev


 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe
 from this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev

 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe
 from this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev




 --
 Geschäftsführer

 vogella GmbH

 Haindaalwisch 17a, 22395 Hamburg
 Amtsgericht Hamburg: HRB 127058
 Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
 USt-IdNr.: DE284122352
 Fax (032) 221739404, Email: lars.vo...@vogella.com, Web:
 http://www.vogella.com

 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe
 from this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev

___
equinox-dev mailing list
equinox-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Re: [equinox-dev] Bundles remaining in life cyle Starting.

2015-05-12 Thread Pablo Beltran
Surely the other answer was right and I confused both states. Thanks for
the clarification and sorry for my bad input  :(.

2015-05-12 12:36 GMT+02:00 Neil Bartlett njbartl...@gmail.com:

 No sorry this is not right. Alex and Tom’s answer was correct. Please
 refer to section 4.4.6.2 of the OSGi Core R6 specification for details of
 the Lazy Activation Policy and its impact on bundle lifecycle.

 Unsatisfied imports such as in your example would cause a failure of
 resolution, leaving the bundle in INSTALLED state.

 Regards,
 Neil



 On 12 May 2015, at 11:29, Pablo Beltran pbeltr...@gmail.com wrote:

 Hmm, I would say they remain on such state due a missing class (or any
 other problem while loading B in memory)

 For instance, plugin A imports class B which imports class C. If C is not
 available A will remain in the Starting state for ever.
  El 12/5/2015 11:49, Lars Vogel lars.vo...@vogella.com escribió:

 Thanks Alex and Tom for the clarification.

 Best regards, Lars

 On Fri, May 8, 2015 at 3:14 PM, Thomas Watson tjwat...@us.ibm.com
 wrote:

 Alex is correct.  Things in the STARTING state are waiting to be lazily
 activated on first class define.

 Tom

 -equinox-dev-boun...@eclipse.org wrote: -
 To: Equinox development mailing list equinox-dev@eclipse.org
 From: Alex Blewitt
 Sent by: equinox-dev-boun...@eclipse.org
 Date: 05/07/2015 04:40PM
 Subject: Re: [equinox-dev] Bundles remaining in life cyle Starting.


 I think they’re placed into that state if they are lazily started, i.e.
 they have a BundleActivationPolicy of ‘lazy’.

 http://www.osgi.org/Design/LazyStart
 http://wiki.osgi.org/wiki/Bundle-ActivationPolicy

 I think it goes from ‘starting’ to ‘started’ when classes have been
 loaded from the bundle.

 Alex

 On 7 May 2015, at 22:31, Lars Vogel lars.vo...@vogella.com wrote:

 Hi,

 I frequently see lots of bundles remaining in the life cyle status
 Starting. Is this expected? I would assume that Starting is a temporary
 status and that once a bundle has finished starting, it becomes Active.

 Best regards, Lars

 --

 Eclipse Platform and e4 project co-lead
 vogella GmbH CEO

 Haindaalwisch 17a, 22395 Hamburg
 Amtsgericht Hamburg: HRB 127058
 Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
 USt-IdNr.: DE284122352
 Fax (032) 221739404, Email: lars.vo...@vogella.com, Web:
 http://www.vogella.com
  ___
 equinox-dev mailing list
 equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe
 from this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev


 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe
 from this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev

 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe
 from this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev




 --
 Geschäftsführer

 vogella GmbH

 Haindaalwisch 17a, 22395 Hamburg
 Amtsgericht Hamburg: HRB 127058
 Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
 USt-IdNr.: DE284122352
 Fax (032) 221739404, Email: lars.vo...@vogella.com, Web:
 http://www.vogella.com

 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe
 from this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev

 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe
 from this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev



 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe
 from this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev

___
equinox-dev mailing list
equinox-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Re: [equinox-dev] Bundles remaining in life cyle Starting.

2015-05-12 Thread Lars Vogel
Thanks Alex and Tom for the clarification.

Best regards, Lars

On Fri, May 8, 2015 at 3:14 PM, Thomas Watson tjwat...@us.ibm.com wrote:

 Alex is correct.  Things in the STARTING state are waiting to be lazily
 activated on first class define.

 Tom

 -equinox-dev-boun...@eclipse.org wrote: -
 To: Equinox development mailing list equinox-dev@eclipse.org
 From: Alex Blewitt
 Sent by: equinox-dev-boun...@eclipse.org
 Date: 05/07/2015 04:40PM
 Subject: Re: [equinox-dev] Bundles remaining in life cyle Starting.


 I think they’re placed into that state if they are lazily started, i.e.
 they have a BundleActivationPolicy of ‘lazy’.

 http://www.osgi.org/Design/LazyStart
 http://wiki.osgi.org/wiki/Bundle-ActivationPolicy

 I think it goes from ‘starting’ to ‘started’ when classes have been loaded
 from the bundle.

 Alex

 On 7 May 2015, at 22:31, Lars Vogel lars.vo...@vogella.com wrote:

 Hi,

 I frequently see lots of bundles remaining in the life cyle status
 Starting. Is this expected? I would assume that Starting is a temporary
 status and that once a bundle has finished starting, it becomes Active.

 Best regards, Lars

 --

 Eclipse Platform and e4 project co-lead
 vogella GmbH CEO

 Haindaalwisch 17a, 22395 Hamburg
 Amtsgericht Hamburg: HRB 127058
 Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
 USt-IdNr.: DE284122352
 Fax (032) 221739404, Email: lars.vo...@vogella.com, Web:
 http://www.vogella.com
  ___
 equinox-dev mailing list
 equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe
 from this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev


 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe
 from this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev

 ___
 equinox-dev mailing list
 equinox-dev@eclipse.org
 To change your delivery options, retrieve your password, or unsubscribe
 from this list, visit
 https://dev.eclipse.org/mailman/listinfo/equinox-dev




-- 
Geschäftsführer

vogella GmbH

Haindaalwisch 17a, 22395 Hamburg
Amtsgericht Hamburg: HRB 127058
Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
USt-IdNr.: DE284122352
Fax (032) 221739404, Email: lars.vo...@vogella.com, Web:
http://www.vogella.com
___
equinox-dev mailing list
equinox-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev