Equinox Console with bndtools

382 views
Skip to first unread message

Kamesh Sampath

unread,
Mar 13, 2015, 1:40:52 AM3/13/15
to bndtool...@googlegroups.com
Hi,

I am using the latest dev release of the bndtools and trying to define a bndrun configuration that could run Eclipse 3.10.x  with console and gogo shell, but i the framework getting started but no console coming up, the configuration I am trying is below:

-runfw: org.eclipse.osgi;version='[3.10.1.v20140909-1633,3.10.1.v20140909-1633]'

-runee: JavaSE-1.7

-runrequires: \

osgi.identity;filter:='(&(osgi.identity=org.apache.felix.gogo.command)(version>=0.14.0))',\

osgi.identity;filter:='(&(osgi.identity=org.apache.felix.gogo.shell)(version>=0.10.0))',\

osgi.identity;filter:='(&(osgi.identity=osgi.cmpn)(version>=5.0.0.201305092017))',\

osgi.identity;filter:='(&(osgi.identity=org.eclipse.equinox.ds)(version>=1.4.200.v20131126-2331))',\

osgi.identity;filter:='(&(osgi.identity=org.eclipse.equinox.console)(version>=1.1.0.v20140131-1639))',\

osgi.identity;filter:='(&(osgi.identity=org.eclipse.equinox.event)(version>=1.3.100.v20140115-1647))'

-runbundles: \

org.apache.felix.gogo.command;version='[0.14.0,0.14.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.eclipse.equinox.console;version='[1.1.0,1.1.1)',\

org.eclipse.equinox.ds;version='[1.4.200,1.4.201)',\

org.eclipse.equinox.event;version='[1.3.100,1.3.101)',\

org.eclipse.equinox.util;version='[1.0.500,1.0.501)',\

osgi.cmpn;version='[5.0.0,5.0.1)'

-runvm: -Dosgi.console=14711

-resolve: auto


Because of equinox console's lazy activation i even tried adding a utility bundle to trigger activation of equinox.console but still same result.

I tried the ideas told in this thread but nothing helped. 

Can anyone have idea why its not starting the console ?

-Kamesh

Peter Kriens

unread,
Mar 13, 2015, 3:40:12 AM3/13/15
to bndtool...@googlegroups.com
Please provide the -runtrace=true output for these problems or share a workspace.

Kind regards,

Peter Kriens


--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kamesh Sampath

unread,
Mar 13, 2015, 4:26:17 AM3/13/15
to bndtool...@googlegroups.com
Hi Peter,

Attached please find the output after I Run OSGi from IDE, the cnf workspace is default one with couple of bundles equinox console and equinox util added to the local repo.

Thank you.

Regards,
Kamesh
bndtools_equniox_runtrace.txt

Peter Kriens

unread,
Mar 16, 2015, 6:20:47 AM3/16/15
to bndtool...@googlegroups.com
Isn't the problem that you have 2 shells loaded?

# starting org.apache.felix.gogo.command
# started  org.apache.felix.gogo.command
# starting org.apache.felix.gogo.runtime
# started  org.apache.felix.gogo.runtime
# starting org.apache.felix.gogo.shell
# started  org.apache.felix.gogo.shell
# starting org.eclipse.equinox.console
# started  org.eclipse.equinox.console
# starting osgi.cmpn
# started  osgi.cmpn

And you should also not load osgi.cmpn, it is a compile only JAR.

Kind regards,

Peter Kriens
<bndtools_equniox_runtrace.txt>

Kamesh Sampath

unread,
Mar 16, 2015, 7:11:03 AM3/16/15
to bndtool...@googlegroups.com
I have removed the "org.eclipse.equinox.console", i was just trying to see if i need that bundle seperately and "osgi.cpmn" was that i was trying to replicate what bndtools does provide when i I choose Equinox + DS + Gogo, now i have removed and rerun but the result is same. 

attached is the new trace.
equinox_bndrun_st_2.txt

Peter Kriens

unread,
Mar 16, 2015, 8:45:48 AM3/16/15
to bndtool...@googlegroups.com
Ok, the problem is 

-runvm: -Dosgi.console=14711

Just remove that line or comment it and it works. Since Equinox uses Gogo I get the feeling that Equinox is messing up. 

You can try http://felix.apache.org/documentation/subprojects/apache-felix-remote-shell.html for Apache Felix Gogo. Use -runproperties to set these properties, not -D

Kind regards,

Peter Kriens


On 13 mrt. 2015, at 06:40, Kamesh Sampath <kamesh....@liferay.com> wrote:

Kamesh Sampath

unread,
Mar 16, 2015, 9:22:29 AM3/16/15
to bndtool...@googlegroups.com
felix on gogo works fine for me, but I am working on something that's specific to equinox so wanted to test my work on  equinox based platform.

i don't know for strange reasons that doesn't even work for me as well, is it possible for you to put your working version of .bndrun file ?

Peter Kriens

unread,
Mar 16, 2015, 10:22:37 AM3/16/15
to bndtool...@googlegroups.com
Equinox contains a copy of Gogo (it is their latest shell). Gogo should, however, run on Equinox as well as long as the internal shell not steals the output. 

If you checkout the OSGi Examples workspace: 


And then add a new project and use the following bndrun file.

-runrequires: \
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)',\
osgi.identity;filter:='(&(osgi.identity=org.apache.felix.gogo.runtime)(version>=0.12.1))'
-runbundles: \
org.apache.felix.gogo.command;version='[0.15.0,0.15.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)'


-runtrace: true
-runfw: org.eclipse.osgi;version='[3.10.1.v20140909-1633,3.10.1.v20140909-1633]'
-runee: JavaSE-1.8

You might want to try to set:


   -runproperties.eqnx: \
org.apache.felix.http.jettyEnabled=true, \
org.apache.felix.http.whiteboardEnabled=true,\
osgi.console.enable.builtin=false, \
osgi.console=, \
org.osgi.service.http.port=8080


Kind regards,

Peter Kriens

Bryan Hunt

unread,
Mar 16, 2015, 10:51:03 AM3/16/15
to bndtool...@googlegroups.com
The equinox console does not start automatically.  You have to use something like Neil's caffeine bundle to start the equinox console.   You also need to set OSGi.console="" as a runtime property.

Bryan

Kamesh Sampath

unread,
Mar 16, 2015, 11:15:44 AM3/16/15
to bndtool...@googlegroups.com
Thanks Peter.

Kamesh Sampath

unread,
Mar 16, 2015, 11:28:38 AM3/16/15
to bndtool...@googlegroups.com
Here is what made it to run finally : )

- runfw: org.eclipse.osgi;version='[3.10.1.v20140909-1633,3.10.1.v20140909-1633]'

-runee: JavaSE-1.7

-resolve: auto

-runrequires: \

 osgi
.identity;filter:='(&(osgi.identity=org.apache.felix.gogo.command)(version>=0.14.0))',\

 osgi
.identity;filter:='(&(osgi.identity=org.apache.felix.gogo.shell)(version>=0.10.0))'

-runbundles: \

 org
.apache.felix.gogo.command;version='[0.14.0,0.14.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)'

# -runtrace=true

-runproperties.eqnx: \

 osgi
.console= ,\

 osgi
.console.enable.builtin=false


the crucial thing which made the difference here is the last  three lines @Peter  thanks for sharing these properties, maybe the bndtools manifest intellisense did not show "-runproperties.eqnx" may be we can add it to the 3.0 :)

@Byran, with this setup we don't need the caffeine bundle, as I see at least Equinox 3.10 has got rid of the Lazy bundle activation.

Thank you.
Reply all
Reply to author
Forward
0 new messages