2

奇妙で再現性のない動作が発生しています。

maven-bundle-plugin と maven-pax-plugin を使用して Apache Felix と Eclipse Equinox で実行する OSGi アプリケーションを開発しています。

今日から、バンドルを開始または停止しようとすると、次のエラーが発生することがあります。

lbは正常に動作します

出力 (抜粋):

0|Active     |    0|OSGi System Bundle (3.8.1.v20120830-144521)
1|Active     |    1|Console plug-in (1.0.0.v20120522-1841)
2|Active     |    1|Apache Felix Gogo Command (0.12.0)
3|Active     |    1|Apache Felix Gogo Runtime (0.10.0)
4|Active     |    1|Apache Felix Gogo Shell (0.10.0)
5|Active     |    5|OSGi R4 Core Bundle (4.1.0)
6|Active     |    5|slf4j-api (1.6.6)
7|Active     |    5|Logback Core Module (1.0.7)
8|Active     |    5|Logback Classic Module (1.0.7)

しかし、たとえば停止 6 を試みると、次の例外が発生します。

g! stop 6
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
at org.eclipse.equinox.console.commands.EquinoxCommandsConverter.convert(EquinoxCommandsConverter.java:61)
at org.apache.felix.gogo.runtime.CommandProcessorImpl.convert(CommandProcessorImpl.java:254)
at org.apache.felix.gogo.runtime.CommandSessionImpl.convert(CommandSessionImpl.java:374)
at org.apache.felix.gogo.runtime.Reflective.coerce(Reflective.java:389)
at org.apache.felix.gogo.runtime.Reflective.coerce(Reflective.java:310)
at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:110)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at org.apache.felix.gogo.shell.Console.run(Console.java:62)
at org.apache.felix.gogo.shell.Shell.console(Shell.java:203)
at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
at java.lang.Thread.run(Thread.java:722)

これはすべてのバンドルで発生します。すべてが Felix タフで正常に動作します。

何か案は?

4

1 に答える 1

3

これは、equinox コマンド バンドル内のエラーです。型を正しく変換できません。gogo ランタイムは printStackTrace を出力し、felix コマンドでコマンドを正しく実行します。

于 2012-12-05T16:21:30.967 に答える