Я пытаюсь запустить vertx под OSGi (bndtools/eclipse) и получить это сообщение об ошибке из базовой Netty.Ошибка OSGi Netty/Vertx при работе с bndtools/eclipse
Я использую vertx 3.3.3 с использованием bndtools в автономном режиме (maven), поэтому все зависимости импортируются с использованием maven, а не стандартного шаблона bndtools (cnf).
17:00:05.935 [main] DEBUG io.netty.util.internal.logging.InternalLoggerFactory - Using SLF4J as the default logging framework 17:00:05.938 [main] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.level: simple 17:00:05.939 [main] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.maxRecords: 4 17:00:05.971 [main] DEBUG io.netty.channel.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 8 17:00:05.993 [main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Buffer.address: available 17:00:05.994 [main] DEBUG io.netty.util.internal.PlatformDependent - Platform: Windows 17:00:05.994 [main] DEBUG io.netty.util.internal.PlatformDependent - Java version: 8 17:00:05.994 [main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.noUnsafe: false 17:00:05.995 [main] DEBUG io.netty.util.internal.PlatformDependent - maxDirectMemory: 3776970752 bytes (maybe) ! Failed to start bundle mybundle.vertx-2.0.0, exception activator error Could not initialize class io.netty.util.internal.PlatformDependent0 from: io.netty.util.internal.PlatformDependent:<clinit>#101
В моем расслоении активатора я пытаюсь создать новый VertX, используя статический метод:
`` `
@Override
public void start(BundleContext bc) throws Exception {
Vertx vertx = Vertx.vertx();
` ``
В стандартном bndtools template (none maven) это отлично работает. Я не уверен, что смогу смешивать два режима в одном проекте, и я предпочитаю придерживаться формата maven.
EDIT
Я создал этот образец проекта клонированный из основного проекта Paremus привет пример, чтобы продемонстрировать вопрос, который я имею с Vert.x & OSGi https://github.com/gadieichhorn/hello-examples/tree/hello-1.13.x
EDIT 2
Я переместил инициализацию Vertx в службу (а не активатор пакета), и теперь я получаю более подробную ошибку.
ERROR: helloworld-web (6): [com.example.hello.web.VertxRegistrationService(0)] The start method has thrown an exception
java.lang.NoClassDefFoundError: Could not initialize class io.netty.util.internal.PlatformDependent0
at io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:101)
at io.netty.util.ConstantPool.<init>(ConstantPool.java:32)
at io.netty.util.Signal$1.<init>(Signal.java:27)
at io.netty.util.Signal.<clinit>(Signal.java:27)
at io.netty.util.concurrent.DefaultPromise.<clinit>(DefaultPromise.java:42)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:36)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:58)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:47)
at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:58)
at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:77)
at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:72)
at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:59)
at io.vertx.core.impl.VertxImpl.<init>(VertxImpl.java:133)
at io.vertx.core.impl.VertxImpl.<init>(VertxImpl.java:122)
at io.vertx.core.impl.VertxImpl.<init>(VertxImpl.java:118)
at io.vertx.core.impl.VertxFactoryImpl.vertx(VertxFactoryImpl.java:34)
at io.vertx.core.Vertx.vertx(Vertx.java:80)
at com.example.hello.web.VertxRegistrationService.lambda$0(VertxRegistrationService.java:26)
at com.example.hello.web.TcclSwitch.executeWithTCCLSwitch(TcclSwitch.java:11)
at com.example.hello.web.VertxRegistrationService.start(VertxRegistrationService.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:724)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:399)
at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:676)
at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:339)
at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:360)
at org.apache.felix.scr.impl.Activator.access$000(Activator.java:53)
at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:260)
at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
at org.apache.felix.utils.extender.AbstractExtender.addingBundle(AbstractExtender.java:192)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)
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.BundleTracker.open(BundleTracker.java:156)
at org.apache.felix.utils.extender.AbstractExtender.startTracking(AbstractExtender.java:150)
at org.apache.felix.utils.extender.AbstractExtender.doStart(AbstractExtender.java:142)
at org.apache.felix.scr.impl.Activator.doStart(Activator.java:170)
at org.apache.felix.utils.extender.AbstractExtender.start(AbstractExtender.java:114)
at org.apache.felix.scr.impl.Activator.restart(Activator.java:140)
at org.apache.felix.scr.impl.config.ScrConfiguration.configure(ScrConfiguration.java:215)
at org.apache.felix.scr.impl.config.ScrConfiguration.start(ScrConfiguration.java:136)
at org.apache.felix.scr.impl.Activator.start(Activator.java:110)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2226)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
at aQute.launcher.Launcher.update(Launcher.java:483)
at aQute.launcher.Launcher.activate(Launcher.java:382)
at aQute.launcher.Launcher.run(Launcher.java:276)
at aQute.launcher.Launcher.main(Launcher.java:133)
любая помощь оценили
bndtools 3.4.0.DEV с включенными плагинами m2e – Gadi
Похоже, должно быть больше этого сообщения об ошибке. Он останавливается так же, как становится интересным. –
@NeilBartlett Я боюсь, что это все, что есть в консоли. – Gadi