Hello. I've put together a small OSGi-based IRC bot as an experiment:
https://github.com/io7m/thoth I've added a Maven module that contains no code but instead uses the assembly plugin to collect all of the dependency jars along with a minimal set of jars required to start a Felix instance with a remote gogo telnet shell. For the sake of simplicity (and perhaps it's too simple, I don't know), all of the jars are placed into a single directory and a configuration file is provided that auto deploys and starts everything in that directory. $ mvn clean package $ unzip -d /tmp -o io7m-thoth-distribution/target/io7m-thoth-distribution-0.1.0.zip $ cd /tmp $ ./run.sh This works well enough. However, the remote shell doesn't work. When a client connects, the following occurs: Exception in thread "telnetconsole.shell remote=/127.0.0.1:39902" 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:745) Caused by: java.lang.ClassNotFoundException: *** Class 'org.apache.felix.service.command.CommandProcessor' was not found because bundle org.apache.felix.shell.remote [30] does not import 'org.apache.felix.service.command' even though bundle [org.apache.felix.gogo.runtime [24](R 24.0)] osgi.wiring.package; {bundle-symbolic-name=org.apache.felix.gogo.runtime, bundle-version=0.16.2, version=0.16.2, osgi.wiring.package=org.apache.felix.service.command, status=provisional} does export it. To resolve this issue, add an import for 'org.apache.felix.service.command' to bundle org.apache.felix.shell.remote [30]. *** at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2031) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 2 more Caused by: java.lang.ClassNotFoundException: org.apache.felix.service.command.CommandProcessor not found by org.apache.felix.shell.remote [30] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574) at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018) ... 3 more I'm not sure what's going on there. Any ideas? Note that if you actually run the above, it'll try and fail (repeatedly) to connect to a non-public IRC server. I've not yet gotten to integrating a ConfigurationAdmin based setup, so the address is hardcoded for now. Stopping the io7m-thoth-main bundle will shut it up. M
pgpbMa6bhpFqO.pgp
Description: OpenPGP digital signature