Something Is Wrong Here [message #753581] |
Thu, 27 October 2011 16:51  |
Eclipse User |
|
|
|
All,
Has anybody else had a similar experience?
Backgrond:
Two years ago I did a project based on OSGi, which ran oh so successfully in a standalone equinox container. One of my bundles was a set of commands that were implementations of the CommandProvider interface. It all just worked.
Today:
I tried something similar with Virgo. I implemented two commands one brutally simple and the other only bit more complex.
Here's what I found: The commands function intermittently. I type a command and it it throws an error, type it again no error, type it a third time it throws an error; and on and on.
What gives? I have never seen this before.
From the osgi console:
osgi> parse
_parse==>
/usr/local/virgo-jetty-server-3.0.1.RELEASE/.
<==_parse
osgi> parse
gogo: CommandNotFoundException: Command not found: parse
osgi> parse
_parse==>
/usr/local/virgo-jetty-server-3.0.1.RELEASE/.
<==_parse
osgi> parse
gogo: CommandNotFoundException: Command not found: parse
osgi>
The command:
public Object _parse(CommandInterpreter intp) {
intp.println("_parse==>");
File file = new File(".");
intp.println(file.getAbsolutePath());
intp.println("<==_parse");
return null;
}
I have another command simpler than the first. We're talking hello world stuff here:
public Object _run(CommandInterpreter intp) {
intp.println("_run==>");
intp.println("<==_run");
return null;
}
Look at what this does:
osgi> run
gogo: CommandNotFoundException: Command not found: run
osgi> run
osgi> run
gogo: CommandNotFoundException: Command not found: run
osgi> run
osgi>
This command is as intermittent as the previous but yields no output.
Why would one command give output and the other not?
Thanks
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.27851 seconds