Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362334 - Running of custom commands from Virgo's OSGi console fails intermittently.
Summary: Running of custom commands from Virgo's OSGi console fails intermittently.
Status: CLOSED WORKSFORME
Alias: None
Product: Virgo
Classification: RT
Component: runtime (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-28 12:01 EDT by Geoffry Roberts CLA
Modified: 2012-09-23 09:07 EDT (History)
2 users (show)

See Also:


Attachments
Bundle with source included (3.80 KB, application/java-archive)
2011-10-28 12:04 EDT, Geoffry Roberts CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffry Roberts CLA 2011-10-28 12:01:33 EDT
Build Identifier: Virgo Server Version 	3.0.1.RELEASE

The command runs properly when run from the OSGi framework within eclipse.  It is only from Virgo that the problem occurs.

When the command is run repeatedly, it fails one time, then succeeds the next time, the fails again the third time, and so on.

The command as code:

public Object _run(CommandInterpreter intp) {
intp.println("_run==>");
intp.println("<==_run");
return null;
}

The command in use:

osgi> run
gogo: CommandNotFoundException: Command not found: run
osgi> run
osgi> run
gogo: CommandNotFoundException: Command not found: run
osgi> run
osgi>

Reproducible: Always

Steps to Reproduce:
1.Implement CommandProvider in a bundle.
2.Deploy bundle to Virgo
3.Attempt to run the command from the osgi prompt.
Comment 1 Geoffry Roberts CLA 2011-10-28 12:04:39 EDT
Created attachment 206139 [details]
Bundle with source included

This is the actual code that produces the problem described in the bug report.
Comment 2 Lazar Kirchev CLA 2011-10-31 10:28:59 EDT
(In reply to comment #1)
> Created attachment 206139 [details]
> Bundle with source included
> 
> This is the actual code that produces the problem described in the bug report.

Is this happening only from within Eclipse?

I tried to reproduce it by using only Virgo RELEASE 3.0.1, but I couldn't. I took Virgo, started it, deployed the attached bundle through the pickup folder, and then I called more than ten times the run command from telnet console. Always the result was 
_run==>
<==_run

So I guess this is a problem only when Virgo is run from Eclipse. I continue the investigation.
Comment 3 Glyn Normington CLA 2011-11-21 05:52:28 EST
(In reply to comment #2)
> I continue the investigation.

Any progress to report, please?
Comment 4 Lazar Kirchev CLA 2011-11-21 06:09:55 EST
(In reply to comment #3)
> (In reply to comment #2)
> > I continue the investigation.
> 
> Any progress to report, please?

Most probably there is a race condition between the input streams of the Gogo shell and the IDE shell. I haven't debugged it yet to confirm this.
Comment 5 Glyn Normington CLA 2011-11-21 06:17:42 EST
Thanks for the update. If you can find time to look into this in the next couple of weeks, that would be great.
Comment 6 Lazar Kirchev CLA 2011-11-21 09:04:04 EST
(In reply to comment #5)
> Thanks for the update. If you can find time to look into this in the next
> couple of weeks, that would be great.

I will try to have a look on it in the next couple of days. It's been waiting for quite a long time now.
Comment 7 Lazar Kirchev CLA 2011-11-21 10:11:46 EST
I couldn't reproduce the issue. Since there is no answer to my comment, and I cannot reproduce the problem according to the steps, I close the issue. If you could provide more details how to reproduce it, please feel free to re-open it.
Comment 8 Lazar Kirchev CLA 2012-09-23 09:07:17 EDT
Closing the issue.