The remote shell bundle does not support the JLine gogo integration. The code is 10 years old and has not been maintained. JLine requires a terminal to be created and setup when the CommandSession is created and this step is not done by the remote shell bundle. If you want remote access, JLine provides good telnet and ssh support for incoming connections. For example if you start the main JLine demo which uses gogo, but outside OSGi, you can then run: > telnetd start which starts the telnet daemon and you can then connect remotely.
The commands are registered via a custom gosh_profile script which is executed when a gogo shell is created: https://github.com/jline/jline3/blob/master/demo/etc/gosh_profile#L151-L163 Cheers, Guillaume Nodet Le jeu. 29 nov. 2018 à 01:57, Doug Meredith <doug.mered...@skyridge.com> a écrit : > I'm attempting to use Felix Remote Shell with the Gogo Jline Shell, but > without luck. > > 0|Active | 0|System Bundle (6.0.1)|6.0.1 > 1|Active | 1|JLine Bundle (3.7.0)|3.7.0 > 4|Active | 1|Apache Felix Gogo Command (1.0.2)|1.0.2 > 5|Active | 1|Apache Felix Gogo JLine Shell (1.1.0)|1.1.0 > 6|Active | 1|Apache Felix Gogo Runtime (1.1.0)|1.1.0 > 8|Active | 1|Apache Felix Remote Shell (1.2.0)|1.2.0 > > Telnet connections are accepted and immediately dropped. The following > exception occurs: > > java.lang.NullPointerException > at org.apache.felix.gogo.jline.Shell.gosh(Shell.java:304) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown > Source) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown > Source) > at java.base/java.lang.reflect.Method.invoke(Unknown Source) > at > org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:139) > at > org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:91) > at > org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) > at > org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) > at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) > at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) > at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) > at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) > at java.base/java.util.concurrent.FutureTask.run(Unknown Source) > at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown > Source) > at java.base/java.lang.Thread.run(Unknown Source) > > I tried the prior version of the JLine shell and had the same issue. If I > use the non-JLine shell, then remote shell works. I've googled extensively > and not found any solution to this. Anyone have any thoughts? What do I > lose if I don't use the JLine shell? If this worked, would JLine give me > command recall when using telnet? All help is appreciated. > > Doug > -- ------------------------ Guillaume Nodet