felix-atomos icon indicating copy to clipboard operation
felix-atomos copied to clipboard

Error and Exception in log with substrate and Equinox

Open fipro78 opened this issue 2 years ago • 1 comments

I am trying to build an executable using GraalVM from an OSGi application, similar to the Atomos examples. But starting the application I see errors and exceptions in the log. The application works, but I wonder if the errors could make problems later. At least the "exit" command is not known, so it is not possible to exit the application via command.

!ENTRY org.eclipse.osgi 4 0 2022-09-22 15:17:12.666
!MESSAGE Setting a custom URLStreamHandlerFactory.
!STACK 0
com.oracle.svm.core.jdk.UnsupportedFeatureError: Setting a custom URLStreamHandlerFactory.
	at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
	at java.net.URL.setURLStreamHandlerFactory(URL.java:85)
	at org.eclipse.osgi.internal.url.EquinoxFactoryManager.forceURLStreamHandlerFactory(EquinoxFactoryManager.java:90)
	at org.eclipse.osgi.internal.url.EquinoxFactoryManager.installURLStreamHandlerFactory(EquinoxFactoryManager.java:52)
	at org.eclipse.osgi.internal.url.EquinoxFactoryManager.installHandlerFactories(EquinoxFactoryManager.java:40)
	at org.eclipse.osgi.internal.framework.SystemBundleActivator.start(SystemBundleActivator.java:75)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:813)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1)
	at java.security.AccessController.executePrivileged(AccessController.java:145)
	at java.security.AccessController.doPrivileged(AccessController.java:98)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:805)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:762)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1032)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.initWorker(EquinoxBundle.java:203)
	at org.eclipse.osgi.container.SystemModule.init(SystemModule.java:99)
	at org.eclipse.osgi.container.SystemModule.start(SystemModule.java:191)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:464)
	at org.eclipse.osgi.launch.Equinox.start(Equinox.java:139)
	at org.apache.felix.atomos.Atomos.main(Atomos.java:237)
!ENTRY org.apache.felix.scr 4 0 2022-09-22 15:17:12.690
!MESSAGE bundle org.apache.felix.scr:2.1.26 (14) Exception starting during restart
!STACK 0
java.lang.IllegalArgumentException: Interface(s) not visible to the provided class loader: org.eclipse.osgi.internal.connect.DelegatingConnectClassLoader@71c1e19f[org.apache.felix.gogo.runtime:1.1.2(id=8)], child of jdk.internal.loader.ClassLoaders$PlatformClassLoader@7c804f13, child of null; interface org.apache.felix.service.command.Converter loaded by jdk.internal.loader.ClassLoaders$AppClassLoader@233c0b17, child of jdk.internal.loader.ClassLoaders$PlatformClassLoader@7c804f13, child of null
	at com.oracle.svm.reflect.proxy.DynamicProxySupport.incompatibleClassLoaders(DynamicProxySupport.java:210)
	at com.oracle.svm.reflect.proxy.DynamicProxySupport.getProxyClass(DynamicProxySupport.java:191)
	at java.lang.reflect.Proxy.getProxyConstructor(Proxy.java:48)
	at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:1006)
	at org.apache.felix.scr.impl.ComponentCommands.createConverter(ComponentCommands.java:619)
	at org.apache.felix.scr.impl.ComponentCommands.addingService(ComponentCommands.java:596)
	at org.apache.felix.scr.impl.ComponentCommands.addingService(ComponentCommands.java:65)
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
	at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
	at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:321)
	at org.apache.felix.scr.impl.ComponentCommands.register(ComponentCommands.java:113)
	at org.apache.felix.scr.impl.Activator.doStart(Activator.java:200)
	at org.apache.felix.scr.impl.AbstractExtender.start(AbstractExtender.java:72)
	at org.apache.felix.scr.impl.Activator.restart(Activator.java:164)
	at org.apache.felix.scr.impl.config.ScrConfigurationImpl.configure(ScrConfigurationImpl.java:228)
	at org.apache.felix.scr.impl.config.ScrConfigurationImpl.start(ScrConfigurationImpl.java:123)
	at org.apache.felix.scr.impl.Activator.start(Activator.java:121)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:813)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1)
	at java.security.AccessController.executePrivileged(AccessController.java:145)
	at java.security.AccessController.doPrivileged(AccessController.java:98)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:805)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:762)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1032)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:371)
	at org.eclipse.osgi.container.Module.doStart(Module.java:605)
	at org.eclipse.osgi.container.Module.start(Module.java:468)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:513)
	at org.eclipse.osgi.container.ModuleContainer.start(ModuleContainer.java:888)
	at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:879)
	at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:560)
	at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:503)
	at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:492)
	at org.eclipse.osgi.container.Module.start(Module.java:446)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1847)
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1840)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1745)
	at org.eclipse.osgi.container.SystemModule.startWorker(SystemModule.java:269)
	at org.eclipse.osgi.container.Module.doStart(Module.java:605)
	at org.eclipse.osgi.container.Module.start(Module.java:468)
	at org.eclipse.osgi.container.SystemModule.start(SystemModule.java:193)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:464)
	at org.eclipse.osgi.launch.Equinox.start(Equinox.java:139)
	at org.apache.felix.atomos.Atomos.main(Atomos.java:237)

I then tried to build Atomos and the examples to see if the error is there also. And yes I can see the same log entries for the substrate.lib and the substrate.maven example on start.

I tested with graalvm-ce-java11-22.2.0 and graalvm-ce-java17-22.2.0

fipro78 avatar Sep 22 '22 13:09 fipro78