[
https://issues.apache.org/jira/browse/FELIX-6021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16770619#comment-16770619
]
Tobias Gunkel commented on FELIX-6021:
--------------------------------------
[~ALemmer]: Same problem here.
Replacing the Manifest line
{code:java}
DynamicImport-Package: org.apache.felix.service.command;
status="provisional",org.apache.felix.shell,org.osgi.service.log
{code}
with
{code:java}
DynamicImport-Package: org.osgi.service.log
Require-Bundle: org.apache.felix.gogo.runtime;resolution:=optional
{code}
helps that {{NoClassDefFoundError:
org/apache/felix/service/command/CommandProcessor}} goes away but then another
exception occurs:
{code:java}
Exception in thread "telnetconsole.shell remote=/127.0.0.1:32827"
java.lang.NoSuchMethodError:
org.apache.felix.service.command.CommandProcessor.createSession(Ljava/io/InputStream;Ljava/io/PrintStream;Ljava/io/PrintStream;)Lorg/apache/felix/service/command/CommandSession;
at org.apache.felix.shell.remote.Shell.run(Shell.java:79)
{code}
Although the exception states that the method was not found, the API interface
{{org.apache.felix.service.command.CommandProcessor}} still seems to be
compatible:
{{public abstract org.apache.felix.service.command.CommandSession
createSession(java.io.InputStream arg0, java.io.OutputStream arg1,
java.io.OutputStream arg2)}}.
At least the proposed workaround {{-Dgosh.args="-sc telnetd -p2323 start"}}
works fine here.
> Remote shell doesn't work with Gogo
> -----------------------------------
>
> Key: FELIX-6021
> URL: https://issues.apache.org/jira/browse/FELIX-6021
> Project: Felix
> Issue Type: Bug
> Components: Remote Shell
> Affects Versions: shell.remote-1.1.2
> Reporter: Andreas Lemmer
> Priority: Critical
> Labels: gogo, remote, shell
>
> The shell.remote bundle doesn't work together with the Gogo shell, neither
> with gogo.shell nor with gogo.jline. When trying to connect, there is an
> {{Exception in thread "telnetconsole.shell remote=/127.0.0.1:60679"
> java.lang.NoClassDefFoundError:
> org/apache/felix/service/command/CommandProcessor}}
> {{at org.apache.felix.shell.remote.Shell.run(Shell.java:78)}}
> {{at java.lang.Thread.run(Thread.java:748)}}
> {{Caused by: java.lang.ClassNotFoundException:
> org.apache.felix.service.command.CommandProcessor not found by
> org.apache.felix.shell.remote [16]}}
> {{at
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1597)}}
> {{at
> org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)}}
> {{at
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1982)}}
> {{at java.lang.ClassLoader.loadClass(ClassLoader.java:357)}}
> {{... 2 more}}
> When changing the Manifest.MF and removing the status requirement in
> {{DynamicImport-Package:
> org.apache.felix.service.command;status="provisional"}}
> then it seems to find the class, but the method arguments don't seem to match.
> Currently, the only method to open a telnet server seems to be setting the
> system property
> -Dgosh.args="-sc telnetd -p2323 start"
> but this works only with gogo.shell and not with gogo.jline (in fact, there
> is always an exception when specifying -Dgosh.args with gogo.jline). JLine
> has an embedded telnet daemon (which seems to be the same like gogo.shell
> has), but it isn't used.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)