我在Apache Felix 5.6.10 OSGi上成功安装并运行了TornadoFX 1.7.14及其所有必需的软件包。然后在IntelliJ 2017.3社区版中使用tornado-maven-osgi-project
模板创建了一个项目,然后使用mvn package
创建了一个包。我没有在生成的类中更改任何内容。刚刚将Kotlin从1.2.21更新为1.2.31。然后我在Felix上安装了捆绑包没有任何问题。但是,当我启动bundle时,会抛出以下异常:Kotlin 1.2.21也会发生这种情况。 TornadoFX和已安装的TornadoFX的maven依赖关系都是1.7.14。
Waiting for JavaFX Runtime Startup.[Done]
ERROR: Bundle no.tornado.tornadofx [25] EventDispatcher: Error during dispatch. (java.lang.VerifyError: Uninitialized object exists on backward branch 77
Exception Details:
Location:
tornadofx/CSSKt.toSelector(Ljava/lang/String;)Ltornadofx/CssSelector; @123: goto
Reason:
Error exists in the bytecode
Bytecode:
0000000: 2a12 1ab8 000f bb01 e959 2ac0 00a1 4cb2
0000010: 01c8 b601 ec4d 3a0b 3a0a 033e 2c2b 1db6
0000020: 01f0 3a0c 190a 190b 190c c000 1c4c 3a0b
0000030: 3a0a 2b4d bb01 f259 2b10 0ab8 01f8 b701
0000040: fbc0 01fd 4e2c b900 2001 003a 0419 04b9
0000050: 0026 0100 9900 2a19 04b9 002a 0100 3a05
0000060: 2d19 05c0 007b 3a06 3a0c 1906 b802 013a
0000070: 0d19 0c19 0db9 0205 0200 57a7 ffd2 2dc0
0000080: 0207 3a0c 190a 190b 190c c001 fd4c 3a0b
0000090: 3a0a 2b4d 2c2c b902 0a01 00bd 020c b902
00000a0: 1002 0059 c700 0ebb 00ac 5913 0212 b700
00000b0: afbf 3a0c 190a 190b 190c c002 1459 beb8
00000c0: 021a c002 14b7 021d b0
Stackmap Table:
full_frame(@77,{Object[#123],Object[#28],Object[#28],Object[#509],Object[#34],Top,Top,Top,Top,Top,Uninitialized[#6],Uninitialized[#6],Object[#4]},{})
same_frame(@126)
full_frame(@178,{Object[#123],Object[#509],Object[#509],Object[#509],Object[#34],Top,Top,Top,Top,Top,Uninitialized[#6],Uninitialized[#6],Object[#519]},{Object[#83]})
)
java.lang.VerifyError: Uninitialized object exists on backward branch 77
Exception Details:
Location:
tornadofx/CSSKt.toSelector(Ljava/lang/String;)Ltornadofx/CssSelector; @123: goto
Reason:
Error exists in the bytecode
Bytecode:
0000000: 2a12 1ab8 000f bb01 e959 2ac0 00a1 4cb2
0000010: 01c8 b601 ec4d 3a0b 3a0a 033e 2c2b 1db6
0000020: 01f0 3a0c 190a 190b 190c c000 1c4c 3a0b
0000030: 3a0a 2b4d bb01 f259 2b10 0ab8 01f8 b701
0000040: fbc0 01fd 4e2c b900 2001 003a 0419 04b9
0000050: 0026 0100 9900 2a19 04b9 002a 0100 3a05
0000060: 2d19 05c0 007b 3a06 3a0c 1906 b802 013a
0000070: 0d19 0c19 0db9 0205 0200 57a7 ffd2 2dc0
0000080: 0207 3a0c 190a 190b 190c c001 fd4c 3a0b
0000090: 3a0a 2b4d 2c2c b902 0a01 00bd 020c b902
00000a0: 1002 0059 c700 0ebb 00ac 5913 0212 b700
00000b0: afbf 3a0c 190a 190b 190c c002 1459 beb8
00000c0: 021a c002 14b7 021d b0
Stackmap Table:
full_frame(@77,{Object[#123],Object[#28],Object[#28],Object[#509],Object[#34],Top,Top,Top,Top,Top,Uninitialized[#6],Uninitialized[#6],Object[#4]},{})
same_frame(@126)
full_frame(@178,{Object[#123],Object[#509],Object[#509],Object[#509],Object[#34],Top,Top,Top,Top,Top,Uninitialized[#6],Uninitialized[#6],Object[#519]},{Object[#83]})
at tornadofx.Stylesheet.<clinit>(CSS.kt:99)
at tornadofx.App.<init>(App.kt:70)
at tornadofx.App.<init>(App.kt:55)
at tornadofx.App.<init>(App.kt:55)
at services.nano.wb.app.DashboardApp.<init>(DashboardApp.kt:6)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:433)
at tornadofx.osgi.impl.ApplicationListener.startDelegate(ApplicationListener.kt:105)
at tornadofx.osgi.impl.ApplicationListener.startDelegateIfPossible(ApplicationListener.kt:87)
at tornadofx.osgi.impl.ApplicationListener.serviceChanged(ApplicationListener.kt:79)
at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4595)
at org.apache.felix.framework.Felix.registerService(Felix.java:3587)
at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:355)
at tornadofx.osgi.ApplicationProviderKt.registerApplication(ApplicationProvider.kt:17)
at services.nano.wb.app.Activator.start(Activator.kt:12)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2240)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2146)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1373)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:744)
这些是已安装的软件包:
ID|State |Level|Name
0|Active | 0|System Bundle (5.6.10)|5.6.10
1|Active | 1|jansi (1.16.0)|1.16.0
2|Active | 1|JLine Bundle (3.5.1)|3.5.1
3|Active | 1|Apache Felix Bundle Repository (2.0.10)|2.0.10
4|Active | 1|Apache Felix Gogo Command (1.0.2)|1.0.2
5|Active | 1|Apache Felix Gogo JLine Shell (1.0.10)|1.0.10
6|Active | 1|Apache Felix Gogo Runtime (1.0.10)|1.0.10
8|Active | 1|Apache Apache HttpCore OSGi bundle (4.4.9)|4.4.9
9|Active | 1|Apache Apache HttpClient OSGi bundle (4.5.5)|4.5.5
10|Active | 1|org.osgi:org.osgi.service.cm (1.5.0.201505202024)|1.5.0.201505202024
11|Active | 1|Apache Commons Logging (1.2.0)|1.2.0
12|Resolved | 1|JavaFX 8 OSGi extension bundle (8.0.1)|8.0.1
13|Active | 1|kotlin-osgi-bundle (1.2.31)|1.2.31
23|Active | 1|JSR 353 (JSON Processing) Default Provider (1.0.4)|1.0.4
25|Active | 1|TornadoFX (1.7.14)|1.7.14