java-modularity/agenda-example

Duplicate and unusable Gogo Shell

Opened this issue · 1 comments

Times have changed and I'm not able to the examples in ch. 3.


Welcome to Apache Felix Gogo


Welcome to Apache Felix Gogo

g! g!
gogo: CommandNotFoundException: Command not found: llb
g! lb
gogo: CommandNotFoundException: Command not found: l
g! lb
gogo: CommandNotFoundException: Command not found: b
g! lb
gogo: CommandNotFoundException: Command not found: b
g!

The shell is running twice, I get two welcome messages. It does not accept input. E.g. the lb command is taken as an l or as a b.

My bnd.bnd file look like this and I can see that there is a strange resolution in there:

Bundle-Version: 0.0.0.${tstamp}
-sub:
*.bnd
-buildpath:
osgi.core,
org.apache.felix.dependencymanager
-runfw: org.apache.felix.framework;version='[4.4.1,4.4.1]'
-runee: JavaSE-1.8
-runrequires:
osgi.identity;filter:='(osgi.identity=osgi.cmpn)',
osgi.identity;filter:='(osgi.identity=org.apache.felix.dependencymanager.shell)',
osgi.identity;filter:='(osgi.identity=org.apache.felix.dependencymanager)',
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.runtime)',
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)'
-runbundles:
org.apache.felix.dependencymanager;version='[3.2.0,3.2.1)',
org.apache.felix.dependencymanager.shell;version='[3.2.0,3.2.1)',
org.apache.felix.gogo.command;version='[0.14.0,0.14.1)',
org.apache.felix.gogo.runtime;version='[0.10.0,0.10.1)',
org.apache.felix.gogo.runtime;version='[0.12.1,0.12.2)',
org.apache.felix.gogo.shell;version='[0.10.0,0.10.1)',
osgi.cmpn;version='[5.0.0,5.0.1)'
-resolve: auto

org.apache.felix.gogo.runtime is listed twice with differenct versions.

How can I run the example with a good console?

I am stuck on page 32, "After saving your code changes, take a look at the console. What does it say?"
Well, nothing. I don't see any output when I edit and save the Activator.
I would expect to see the output from
System.out.println("Added " + conferences.size() + " conferences");
but I don't.

What to do about that?

I tried the complete example from git and it has the same problem with the shell:

Incremental update test
2015-02-23 04:41:24.210:INFO:oejs.Server:jetty-8.1.14.v20131031


Welcome to Apache Felix Gogo

g! ____________________________
Welcome to Apache Felix Gogo

g! 2015-02-23 04:41:24.294:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080
[INFO] Started Jetty 8.1.14.v20131031 at port(s) HTTP:8080 on context path /
[DEBUG] Ignoring Servlet Service [javax.servlet.Servlet], alias is missing or empty
[DEBUG] Reusing context with id []
[DEBUG] Reusing context with id []
[INFO] Detected extended HttpService. Filters enabled.
[DEBUG] Ignoring Servlet Service [javax.servlet.Servlet], alias is missing or empty
[INFO] Http service whiteboard started

And the resolution is:

-runfw: org.apache.felix.framework;version='[4.4.1,4.4.1]'
-runee: JavaSE-1.8
-runrequires:
osgi.identity;filter:='(osgi.identity=agenda.simpleagenda)',
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.runtime)',
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)',
osgi.identity;filter:='(osgi.identity=agenda.console)',
osgi.identity;filter:='(osgi.identity=agenda.mongo)',
osgi.identity;filter:='(osgi.identity=org.apache.felix.dependencymanager.shell)',
osgi.identity;filter:='(osgi.identity=org.apache.felix.fileinstall)',
osgi.identity;filter:='(osgi.identity=agenda.rest)',
osgi.identity;filter:='(osgi.identity=org.amdatu.web.rest.doc)',
osgi.identity;filter:='(osgi.identity=org.amdatu.web.rest.doc.swagger)',
osgi.identity;filter:='(osgi.identity=org.amdatu.web.rest.doc.swagger.ui)',
osgi.identity;filter:='(&(osgi.identity=org.amdatu.web.rest.wink)(version>=1.0.5))',
osgi.identity;filter:='(osgi.identity=org.amdatu.web.rest.jaxrs)',
osgi.identity;filter:='(osgi.identity=org.apache.felix.http.jetty)',
osgi.identity;filter:='(osgi.identity=org.apache.felix.http.whiteboard)',
osgi.identity;filter:='(osgi.identity=agenda.ui)',
osgi.identity;filter:='(&(osgi.identity=org.amdatu.web.resourcehandler)(version>=1.0.1))'
-runbundles:
agenda.api;version='[1.0.0,1.0.1)',
agenda.console;version='[1.0.0,1.0.1)',
agenda.mongo;version='[1.0.0,1.0.1)',
agenda.rest;version='[1.0.0,1.0.1)',
agenda.simpleagenda;version='[1.0.1,1.0.2)',
agenda.ui;version=latest,
com.fasterxml.jackson.core.jackson-annotations;version='[2.3.0,2.3.1)',
com.fasterxml.jackson.core.jackson-core;version='[2.3.1,2.3.2)',
com.fasterxml.jackson.core.jackson-databind;version='[2.3.1,2.3.2)',
com.fasterxml.jackson.jaxrs.jackson-jaxrs-base;version='[2.3.0,2.3.1)',
com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider;version='[2.3.0,2.3.1)',
de.undercouch.bson4jackson;version='[1.3.0,1.3.1)',
jackson-core-asl;version='[1.9.8,1.9.9)',
jackson-mapper-asl;version='[1.9.8,1.9.9)',
net.vz.mongodb.jackson.mongo-jackson-mapper;version='[1.4.3,1.4.4)',
org.amdatu.mongo;version='[1.1.2,1.1.3)',
org.amdatu.persistence2_1;version='[1.0.0,1.0.1)',
org.amdatu.web.resourcehandler;version='[1.0.7,1.0.8)',
org.amdatu.web.rest.doc;version='[1.2.1,1.2.2)',
org.amdatu.web.rest.doc.swagger;version='[1.0.8,1.0.9)',
org.amdatu.web.rest.doc.swagger.ui;version='[1.0.6,1.0.7)',
org.amdatu.web.rest.jaxrs;version='[1.0.7,1.0.8)',
org.amdatu.web.rest.wink;version='[2.0.2,2.0.3)',
org.apache.felix.configadmin;version='[1.8.0,1.8.1)',
org.apache.felix.dependencymanager;version='[3.1.0,3.1.1)',
org.apache.felix.dependencymanager.shell;version='[3.0.1,3.0.2)',
org.apache.felix.fileinstall;version='[3.4.0,3.4.1)',
org.apache.felix.gogo.command;version='[0.14.0,0.14.1)',
org.apache.felix.gogo.runtime;version='[0.10.0,0.10.1)',
org.apache.felix.gogo.runtime;version='[0.12.1,0.12.2)',
org.apache.felix.gogo.shell;version='[0.10.0,0.10.1)',
org.apache.felix.http.api;version='[2.3.0,2.3.1)',
org.apache.felix.http.jetty;version='[2.3.0,2.3.1)',
org.apache.felix.http.servlet-api;version='[1.0.0,1.0.1)',
org.apache.felix.http.whiteboard;version='[2.3.0,2.3.1)',
org.apache.geronimo.specs.geronimo-jta_1.1_spec;version='[1.1.1,1.1.2)',
org.mongodb.mongo-java-driver;version='[2.11.3,2.11.4)',
osgi.enterprise;version='[4.2.0,4.2.1)',
osgi.residential;version='[4.3.0,4.3.1)'
-resolve: auto