Hi Karl,

works ... works ... works ...

when executing from atomos.examples.substrate.lib/target/ dir, then it
works fine !

regards
Pierre

On Fri, Feb 12, 2021 at 5:34 PM Thomas Watson <[email protected]> wrote:

> Hi,
>
> Yes that is another reason the lib solution is not great.  It has to find
> the folder where the bundles are.  Currently it tries the current
> working directory to find that.
>
> I'll update the readme for that example to make it clear.  I'm also going
> to update the recommended graal version.  I finally did get big sur to get
> graal to work again.  I tested 21.0.0.1 (just released) and it appears to
> work.  Note that on Mac jlink is broken so it fails building the jlink
> example on graal.
>
> For others trying to get Graal to work on Mac Big Sur.  I had to do a fresh
> extract of the tar.gz and then run:
>
>  sudo xattr -d -r com.apple.quarantine path/to/graal/dir
>
> I had to do that before invoking any executable from graal.
>
> Tom
>
>
> On Fri, Feb 12, 2021 at 10:11 AM Karl Pauls <[email protected]> wrote:
>
> > Hi Pierre,
> >
> > ah, I think this is a funny coincidence. The example was indeed broken
> > but that is not the problem you are running into I think.
> >
> > Can you cd into the target dir and try again? I.e.,
> >
> > cd atomos.examples/atomos.examples.substrate.lib/target
> > ./atomos
> >
> > The substrate.lib example needs to be executed from the same dir the
> > executable is in - we probably need to point that out in the
> > documentation!
> >
> > regards,
> >
> > Karl
> >
> > On Fri, Feb 12, 2021 at 4:48 PM Pierre De Rop <[email protected]>
> > wrote:
> > >
> > > Hi Tom,
> > >
> > > no, I'm sorry but the substrate.lib does not work either with -Pequinox
> > in
> > > my environment.
> > >
> > > Hi Karl,
> > >
> > > I recompiled the latest version using "./mvnw clean install -Psubstrate
> > > -Pfelix", so it's the same:the substrate.lib sample does not work. it
> > shows
> > > the harmless UnsupportedFeatureError error (this, I know I can ignore
> > it),
> > > but it does not work.
> > > Other examples seem to work fine, so I don't want to block the release
> > > since Tom said that the substrate.lib example should not be promoted
> > > anymore ...
> > >
> > > PS: I re-installed the old GraalVM CE 20.2.0, to make sure I'm using
> the
> > > same version that is documented from the atomos readme files.
> > >
> > > thanks.
> > >
> > > regards
> > > /Pierre
> > >
> > >
> > > On Fri, Feb 12, 2021 at 2:20 PM Thomas Watson <[email protected]>
> wrote:
> > >
> > > > Strange, I really remember testing that change across both felix and
> > > > equinox on substrate.  Thanks for fixing it.
> > > >
> > > > Tom.
> > > >
> > > > On Fri, Feb 12, 2021 at 3:18 AM Karl Pauls <[email protected]>
> > wrote:
> > > >
> > > > > Hi Pierre,
> > > > >
> > > > > good catch, the latest refactoring [0] removed the dependency for
> the
> > > > > log service. I added it back in [1] - can you try again?
> > > > >
> > > > > We need better tests for the substrate examples - they are hard to
> > > > > test and really don't like when something is missing :-)
> > > > >
> > > > > You'll still see the:
> > > > >
> > > > > java.lang.reflect.InvocationTargetException
> > > > > ...
> > > > > Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError:
> Defining
> > > > > new classes at run time is not supported. All classes need to be
> > known
> > > > > at image build time.
> > > > > ...
> > > > > com.oracle.svm.core.jdk.UnsupportedFeatureError: Setting a custom
> > > > > URLStreamHandlerFactory.
> > > > >
> > > > > for Felix but that is just a print out which is harmless.
> > > > >
> > > > > regards,
> > > > >
> > > > > Karl
> > > > >
> > > > >
> > > > > [0]
> > > > >
> > > >
> >
> https://github.com/apache/felix-atomos/commit/ddc6688e88653591b41bda77148e6877118cf532#diff-8140292ec524a3e05ad38011530a28f34345e456c8d5f0c5132b10d5e74fa0e9
> > > > > [1] https://github.com/apache/felix-atomos/pull/45
> > > > >
> > > > >
> > > > > On Fri, Feb 12, 2021 at 12:56 AM Pierre De Rop <
> > [email protected]>
> > > > > wrote:
> > > > > >
> > > > > > Hi Tom,
> > > > > >
> > > > > > Maybe I did something wrong, but it seems I can't run the
> > > > > > substrate.lib/target/atomos example.
> > > > > >
> > > > > > So, I'm using this graalvm version:
> > > > > >
> > > > > > openjdk version "11.0.10" 2021-01-19
> > > > > > OpenJDK Runtime Environment GraalVM CE 21.0.0 (build
> > > > > > 11.0.10+8-jvmci-21.0-b06)
> > > > > > OpenJDK 64-Bit Server VM GraalVM CE 21.0.0 (build
> > > > > 11.0.10+8-jvmci-21.0-b06,
> > > > > > mixed mode, sharing)
> > > > > >
> > > > > >
> > > > > > Now, I have built the whole project using this command, as per
> your
> > > > > README
> > > > > > from [1].
> > > > > >
> > > > > > ./mvnw clean install -Psubstrate -Pfelix
> > > > > >
> > > > > >
> > > > > > So, after a while, everything is built, but when I'm trying to
> > launch
> > > > the
> > > > > > following executable:
> > > > > >
> > > > > > ./atomos.examples/atomos.examples.substrate.lib/target/atomos
> > > > > >
> > > > > > then I'm getting this exception:
> > > > > >
> > > > > > java.lang.reflect.InvocationTargetException
> > > > > >        at java.lang.reflect.Method.invoke(Method.java:566)
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.util.SecureAction.getAccessor(SecureAction.java:1139)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.util.SecureAction.setAccesssible(SecureAction.java:998)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.ext.ClassPathExtenderFactory$DefaultClassLoaderExtender.<clinit>(ClassPathExtenderFactory.java:79)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:375)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:295)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.ExtensionManager.<clinit>(ExtensionManager.java:152)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:375)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:295)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.Felix.initializeFrameworkProperties(Felix.java:4881)
> > > > > >
> > > > > >        at org.apache.felix.framework.Felix.<init>(Felix.java:405)
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:36)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.atomos.impl.base.AtomosBase.newFramework(AtomosBase.java:423)
> > > > > >
> > > > > >        at org.apache.felix.atomos.Atomos.main(Atomos.java:228)
> > > > > > Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError:
> > Defining
> > > > new
> > > > > > classes at run time is not supported. All classes need to be
> known
> > at
> > > > > image
> > > > > > build time.
> > > > > >        at
> > > > > >
> > com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:87)
> > > > > >        at
> > > > jdk.internal.misc.Unsafe.defineAnonymousClass(Unsafe.java:246)
> > > > > >        at sun.misc.Unsafe.defineAnonymousClass(Unsafe.java:830)
> > > > > >        ... 14 more
> > > > > > com.oracle.svm.core.jdk.UnsupportedFeatureError: Setting a custom
> > > > > > URLStreamHandlerFactory.
> > > > > >        at
> > > > > >
> > com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:87)
> > > > > >        at java.net.URL.setURLStreamHandlerFactory(URL.java:77)
> > > > > >        at
> > > > > >
> org.apache.felix.framework.URLHandlers.<init>(URLHandlers.java:243)
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.URLHandlers.registerFrameworkInstance(URLHandlers.java:633)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.URLHandlersActivator.start(URLHandlersActivator.java:69)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:825)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.Felix$SystemBundleActivator.start(Felix.java:5173)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:825)
> > > > > >
> > > > > >        at org.apache.felix.framework.Felix.init(Felix.java:899)
> > > > > >        at org.apache.felix.framework.Felix.init(Felix.java:648)
> > > > > >        at org.apache.felix.framework.Felix.start(Felix.java:1111)
> > > > > >        at org.apache.felix.atomos.Atomos.main(Atomos.java:229)
> > > > > >
> > > > > > And, I don't get the gogo prompt and I can't hit the gogo web
> > console
> > > > > from
> > > > > > http://localhost:8080/system/console/bundles
> > > > > >
> > > > > > Did I wrongly build the projects ? maybe it's because I'm using
> the
> > > > > > latest GraalVM
> > > > > > CE 21.0.0 version while in your README file it is mentioned that
> > > > GraalVM
> > > > > CE
> > > > > > 20.2.0 is required ? Notice that I'm getting the same issue when
> > using
> > > > > the
> > > > > > -Pjava8 option. I hope I'm not raising a false alarm ?
> > > > > >
> > > > > > Now, the other  atomos.examples.substrate.maven works, but at
> > startup,
> > > > I
> > > > > > however noticed some exceptions:
> > > > > >
> > > > > >
> > > > >
> > > >
> >
> ./atomos.examples/atomos.examples.substrate.maven/target/native_image_build/bin/org.apache.felix.atomos.examples.substrate.maven
> > > > > >
> > > > > > java.lang.reflect.InvocationTargetException
> > > > > >        at java.lang.reflect.Method.invoke(Method.java:566)
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.util.SecureAction.getAccessor(SecureAction.java:1139)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.util.SecureAction.setAccesssible(SecureAction.java:998)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.ext.ClassPathExtenderFactory$DefaultClassLoaderExtender.<clinit>(ClassPathExtenderFactory.java:79)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:375)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:295)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.ExtensionManager.<clinit>(ExtensionManager.java:152)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:375)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:295)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.Felix.initializeFrameworkProperties(Felix.java:4881)
> > > > > >
> > > > > >        at org.apache.felix.framework.Felix.<init>(Felix.java:405)
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:36)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.atomos.impl.base.AtomosBase.newFramework(AtomosBase.java:423)
> > > > > >
> > > > > >        at org.apache.felix.atomos.Atomos.main(Atomos.java:228)
> > > > > > Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError:
> > Defining
> > > > new
> > > > > > classes at run time is not supported. All classes need to be
> known
> > at
> > > > > image
> > > > > > build time.
> > > > > >        at
> > > > > >
> > com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:87)
> > > > > >        at
> > > > jdk.internal.misc.Unsafe.defineAnonymousClass(Unsafe.java:246)
> > > > > >        at sun.misc.Unsafe.defineAnonymousClass(Unsafe.java:830)
> > > > > >        ... 14 more
> > > > > > com.oracle.svm.core.jdk.UnsupportedFeatureError: Setting a custom
> > > > > > URLStreamHandlerFactory.
> > > > > >        at
> > > > > >
> > com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:87)
> > > > > >        at java.net.URL.setURLStreamHandlerFactory(URL.java:77)
> > > > > >        at
> > > > > >
> org.apache.felix.framework.URLHandlers.<init>(URLHandlers.java:243)
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.URLHandlers.registerFrameworkInstance(URLHandlers.java:633)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.URLHandlersActivator.start(URLHandlersActivator.java:69)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:825)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.Felix$SystemBundleActivator.start(Felix.java:5173)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:825)
> > > > > >
> > > > > >        at org.apache.felix.framework.Felix.init(Felix.java:899)
> > > > > >        at org.apache.felix.framework.Felix.init(Felix.java:648)
> > > > > >        at org.apache.felix.framework.Felix.start(Felix.java:1111)
> > > > > >        at org.apache.felix.atomos.Atomos.main(Atomos.java:229)
> > > > > > Registered Echo service from activator.
> > > > > > 2021-02-12 00:48:55.120:INFO:oejs.Server:FelixStartLevel:
> > > > > > jetty-9.4.30.v20200611; built: 2020-06-11T12:34:51.929Z; git:
> > > > > > 271836e4c1f4612f12b7bb13ef5a92a927634b0d; jvm 11.0.10
> > > > > > resource:gosh_profile: ERROR: java.lang.IllegalArgumentException:
> > > > Cannot
> > > > > > coerce addcommand(Token, BundleContextImpl) to any of []
> > > > > > g! 2021-02-12 00:48:55.123:INFO:oejs.session:FelixStartLevel:
> > > > > > DefaultSessionIdManager workerName=node0
> > > > > > 2021-02-12 00:48:55.123:INFO:oejs.session:FelixStartLevel: No
> > > > > > SessionScavenger set, using defaults
> > > > > > 2021-02-12 00:48:55.123:INFO:oejs.session:FelixStartLevel: node0
> > > > > Scavenging
> > > > > > every 600000ms
> > > > > > 2021-02-12
> 00:48:55.123:INFO:oejsh.ContextHandler:FelixStartLevel:
> > > > > Started
> > > > > > o.e.j.s.ServletContextHandler@6384780a{/,null,AVAILABLE}
> > > > > > 2021-02-12 00:48:55.123:INFO:oejs.Server:FelixStartLevel: Started
> > > > @124ms
> > > > > > 2021-02-12 00:48:55.123:INFO:oejs.session:FelixStartLevel: node0
> > > > > Scavenging
> > > > > > every 600000ms
> > > > > > 2021-02-12
> > 00:48:55.124:INFO:oejs.AbstractConnector:FelixStartLevel:
> > > > > > Started ServerConnector@507b669c{HTTP/1.1, (http/1.1)}{
> > 0.0.0.0:8080}
> > > > > > [INFO] Started Jetty 9.4.30.v20200611 at port(s) HTTP:8080 on
> > context
> > > > > path
> > > > > > / [minThreads=8,maxThreads=200,acceptors=1,selectors=2]
> > > > > > [INFO] Apachde Felix Http Whiteboard Service started
> > > > > > Activated:
> > > > > org.apache.felix.atomos.tests.testbundles.service.impl.EchoImpl
> > > > > > Echo service found: impl.activator hello
> > > > > > Activated:
> > > > > org.apache.felix.atomos.tests.testbundles.service.user.EchoUser
> > > > > > Activated via constructor:
> > > > > > org.apache.felix.atomos.tests.testbundles.service.user.EchoUser2
> > > > > > ERROR: Bundle org.osgi.service.component.annotations [25] Error
> > > > starting
> > > > > > atomos:boot:org.osgi.service.component.annotations
> > > > > > (org.osgi.framework.BundleException: Unable to resolve
> org.osgi.se
> > > > > > rvice.component.annotations [25](R 25.0): missing requirement
> > > > > > [org.osgi.service.component.annotations [25](R 25.0)]
> > > > osgi.unresolvable;
> > > > > > (&(must.not.resolve=*)(!(must.not.resolve=*))) Unresolv
> > > > > > ed requirements: [[org.osgi.service.component.annotations [25](R
> > 25.0)]
> > > > > > osgi.unresolvable;
> (&(must.not.resolve=*)(!(must.not.resolve=*)))])
> > > > > > org.osgi.framework.BundleException: Unable to resolve
> > > > > > org.osgi.service.component.annotations [25](R 25.0): missing
> > > > requirement
> > > > > > [org.osgi.service.component.annotations [25](R 25.0)] osgi.unre
> > > > > > solvable; (&(must.not.resolve=*)(!(must.not.resolve=*)))
> Unresolved
> > > > > > requirements: [[org.osgi.service.component.annotations [25](R
> > 25.0)]
> > > > > > osgi.unresolvable; (&(must.not.resolve=*)(!(must.not.
> > > > > > resolve=*)))]Unable to resolve connected bundle: Unable to
> resolve
> > > > > > org.osgi.service.component.annotations [25](R 25.0): missing
> > > > requirement
> > > > > > [org.osgi.service.component.annotations [25](R 25.
> > > > > > 0)] osgi.unresolvable;
> > (&(must.not.resolve=*)(!(must.not.resolve=*)))
> > > > > > Unresolved requirements: [[org.osgi.service.component.annotations
> > > > [25](R
> > > > > > 25.0)] osgi.unresolvable; (&(must.not.resolve=*
> > > > > > )(!(must.not.resolve=*)))]
> > > > > >
> > > > > >        at
> > > > > >
> > org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398)
> > > > > >        at
> > org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
> > > > > >        at
> > > > > >
> > org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1566)
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
> > > > > >
> > > > > >        at java.lang.Thread.run(Thread.java:834)
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
> > > > > >
> > > > > >        at
> > > > > >
> > > > >
> > > >
> >
> com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
> > > > > >
> > > > > >
> > > > > >
> > > > > > Despite of the exceptions, the substrate.maven example works
> fine:
> > I
> > > > can
> > > > > > get the gogo prompt and the webconsole also works.
> > > > > >
> > > > > > [1]
> > > > > >
> > > > >
> > > >
> >
> https://github.com/apache/felix-atomos/blob/master/atomos.examples/SUBSTRATE.md
> > > > > >
> > > > > > thanks;
> > > > > >
> > > > > > regards
> > > > > > /pierre
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Tue, Feb 9, 2021 at 7:38 PM Thomas Watson <[email protected]>
> > wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > I did publish the new snapshots of atomos to
> > > > > > > https://repository.apache.org/content/repositories/snapshots
> in
> > case
> > > > > you
> > > > > > > want to try them from there. I also updated my simplistic
> > example of
> > > > > gogo
> > > > > > > w/ atomos at https://github.com/tjwatson/atomos-examples
> > > > > > >
> > > > > > > Tom
> > > > > > >
> > > > > > > On Tue, Feb 9, 2021 at 7:14 AM Jean-Baptiste Onofre <
> > [email protected]
> > > > >
> > > > > > > wrote:
> > > > > > >
> > > > > > > > Thanks Tom for the reminder !
> > > > > > > >
> > > > > > > > I should have time to test by the end of the week.
> > > > > > > >
> > > > > > > > Regards
> > > > > > > > JB
> > > > > > > >
> > > > > > > > > Le 9 févr. 2021 à 02:01, Thomas Watson <[email protected]>
> a
> > > > écrit
> > > > > :
> > > > > > > > >
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > I would like to give you a chance to provide feedback
> before
> > > > > calling a
> > > > > > > > vote
> > > > > > > > > for a 1.0 release of Atomos.  I've done a few modifications
> > over
> > > > > the
> > > > > > > past
> > > > > > > > > week or so and have improved the project readme to make it
> > easier
> > > > > to
> > > > > > > > > understand what Atomos is and how to use it:
> > > > > > > > >
> > > > > > > > > https://github.com/apache/felix-atomos
> > > > > > > > >
> > > > > > > > > Please let me know what you think and provide any
> > improvements
> > > > > that you
> > > > > > > > > think may be needed before we call for a 1.0 release.
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > > >
> > > > > > > > > Tom
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Karl Pauls
> > > > > [email protected]
> > > > >
> > > >
> >
> >
> >
> > --
> > Karl Pauls
> > [email protected]
> >
>

Reply via email to