Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Virgo / Equinox console usage
Virgo / Equinox console usage [message #1049354] Thu, 25 April 2013 14:49 Go to next message
Franck Mising name is currently offline Franck Mising name
Messages: 91
Registered: July 2009
Location: France
Member
I am a bit confused with the Virgo console, it seems like most of the commands described in the user guide don't work as expected, for example (1st example in section 8.2):

osgi> vsh:plan list
gogo: CommandNotFoundException: Command not found: vsh:plan
osgi>


Some of the commands in Table 8.1 work (packages)if I issue them without the vhs: prefix; but others don't:
osgi> vhs:plan
gogo: CommandNotFoundException: Command not found: vhs:plan
osgi> plan
gogo: CommandNotFoundException: Command not found: plan
osgi>


What's the story here?

I have a subsidiary question: what is the simplest way to trigger the refresh of a bundle from the Windows command line (batch mode, i.e. without having to open a Virgo console first)?

Thanks!
Re: Virgo / Equinox console usage [message #1049674 is a reply to message #1049354] Fri, 26 April 2013 02:23 Go to previous messageGo to next message
Lazar Kirchev is currently offline Lazar Kirchev
Messages: 28
Registered: July 2009
Location: Sofia, Bulgaria
Junior Member
Hello Franck,

Which Virgo distribution are you using? These commands are not available in all distributions.

Lazar
Re: Virgo / Equinox console usage [message #1052081 is a reply to message #1049674] Mon, 29 April 2013 11:36 Go to previous messageGo to next message
Franck Mising name is currently offline Franck Mising name
Messages: 91
Registered: July 2009
Location: France
Member
Sorry, I should have mentioned, I am using Virgo for Tomcat Server v. 3.6.1
Re: Virgo / Equinox console usage [message #1052943 is a reply to message #1052081] Wed, 01 May 2013 10:01 Go to previous messageGo to next message
Alexei Isac is currently offline Alexei Isac
Messages: 2
Registered: May 2013
Junior Member
Ditto here.
Running 3.6.1 on 64bit Linux box running OpenJDK 1.6

vsh:par list seems to work.

osgi> vsh:par list
Name Version State
org.eclipse.virgo.apps.repository 3.6.1.RELEASE ACTIVE

vsh:par examine comes back saying "Incorrect number of parameters"

osgi> vsh:par examine org.eclipse.virgo.apps.repository 3.6.1.RELEASE
Command par examine: Incorrect number of parameters
osgi>

I am hoping something basic like this is a user bug =)
Re: Virgo / Equinox console usage [message #1053183 is a reply to message #1052943] Thu, 02 May 2013 18:03 Go to previous messageGo to next message
Franck Mising name is currently offline Franck Mising name
Messages: 91
Registered: July 2009
Location: France
Member
vsh:par is unknown for me on Windows 7 running Oracle JDK 7_011.
It isn't listed in the "help" output, nor is any other vhs command.

I also can't figure out how to provide bundle arguments to commands such as "headers", I keep getting "can't coerce xxx" errors.
Re: Virgo / Equinox console usage [message #1057812 is a reply to message #1052943] Wed, 08 May 2013 21:24 Go to previous messageGo to next message
Alexei Isac is currently offline Alexei Isac
Messages: 2
Registered: May 2013
Junior Member
vsh:bundle examine <number> comes back with
java.lang.NullPointerException while executing command 'bundle examine 157': 'null'

I can open the webui and view the bundle details.
But that is not an option in a production environment where the most likely option I would have would be terminal access.

Is this a bug ?
Re: Virgo / Equinox console usage [message #1058438 is a reply to message #1057812] Tue, 14 May 2013 02:20 Go to previous messageGo to next message
Lazar Kirchev is currently offline Lazar Kirchev
Messages: 28
Registered: July 2009
Location: Sofia, Bulgaria
Junior Member
Hello,

@Franck The console commands are available only in the user region. Most probably you are connecting to the telnet of the kernel region and therefore cannot see the commands. If you like to use them, you should enable telnet in the user region (modify telnet configuration in repository/ext/osgi.console.properties - set telnet.enabled to true) and connect to port 2501. The "headers" subcommand is used as follows: vhs:bundle headers <bundle_id>, where bundle_id is the number of the bundle

@Alexei This really seems to be a bug. I saw that examine in some other contexts is not working too. Please open a bug for this issue. We will investigate further the problem.

Lazar
Re: Virgo / Equinox console usage [message #1060506 is a reply to message #1058438] Sat, 25 May 2013 11:41 Go to previous messageGo to next message
Franck Mising name is currently offline Franck Mising name
Messages: 91
Registered: July 2009
Location: France
Member
Lazar Kirchev wrote on Tue, 14 May 2013 08:20
Hello,

@Franck The console commands are available only in the user region. Most probably you are connecting to the telnet of the kernel region and therefore cannot see the commands. If you like to use them, you should enable telnet in the user region (modify telnet configuration in repository/ext/osgi.console.properties - set telnet.enabled to true) and connect to port 2501. The "headers" subcommand is used as follows: vhs:bundle headers <bundle_id>, where bundle_id is the number of the bundle
...
Lazar


Nope, I am connecting alternatively to one of the other console and I am having similar issues in both (the command sets do differ somewhat):

osgi> vhs:bundle headers 3
gogo: CommandNotFoundException: Command not found: vhs:bundle
osgi>


Franck
Re: Virgo / Equinox console usage [message #1060507 is a reply to message #1060506] Sat, 25 May 2013 11:46 Go to previous messageGo to next message
Franck Mising name is currently offline Franck Mising name
Messages: 91
Registered: July 2009
Location: France
Member
Hmmm, just discovered that some commands do work for certain bundles:

osgi> bundle 142
gogo: IllegalArgumentException: Cannot coerce bundle(Long) to any of [(Bundle[])]
osgi> bundle 3
ch.qos.logback.classic_1.0.7.v20121108-1250 [3]
Id=3, Status=RESOLVED Data Root=C:\virgo-tomcat-3.6.1\work\org.eclipse.osgi\bundles\3\data

Bundle 142 was loaded through a plan, could this be the reason?
Is there any way to address bundles loaded through a plan?

Re: Virgo / Equinox console usage [message #1060508 is a reply to message #1060507] Sat, 25 May 2013 11:59 Go to previous message
Franck Mising name is currently offline Franck Mising name
Messages: 91
Registered: July 2009
Location: France
Member
Ooops, my bad, I was connecting to the wrong console this time.

So problem solved it seems, here is the wrapup for me:
- forget the vsh: prefix, it doesn't seem needed
- can't coerce args etc doesn't necessarily mean that you are using the wrong syntax, you get that message if the bundle isn't found in the region
- the two regions don't have the same set of commands - e.g. plan is only available in the user region

Moving on to trying to refresh a bundle by name from the command line...
Previous Topic:Virgo does not start up on Windows 2008 64 bit Virtual machine- Timeout exception thrown
Next Topic:How to know when virgo finished loading all plugins
Goto Forum:
  


Current Time: Sat Apr 19 11:48:15 EDT 2014

Powered by FUDForum. Page generated in 0.01685 seconds