Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324445 - Provide Virgo support
Summary: Provide Virgo support
Status: CLOSED FIXED
Alias: None
Product: RAP
Classification: RT
Component: Demo (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 1.4 M3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: plan-theme=other-projects plan-status...
Keywords:
Depends on: 318863
Blocks:
  Show dependency tree
 
Reported: 2010-09-03 11:58 EDT by Holger Staudacher CLA
Modified: 2011-09-14 09:31 EDT (History)
7 users (show)

See Also:


Attachments
Virgo Plan containing equionx/eclipse bundles needed for RAP applications (1.91 KB, application/octet-stream)
2010-10-28 07:51 EDT, Florian Waibel CLA
no flags Details
Virgo Plan containing RAP bundles needed for RAP applications (948 bytes, application/octet-stream)
2010-10-28 07:54 EDT, Florian Waibel CLA
no flags Details
Virgo Plan containing the RAP demo application (682 bytes, application/octet-stream)
2010-10-28 07:56 EDT, Florian Waibel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Staudacher CLA 2010-09-03 11:58:12 EDT
We should make sure that RAP 1.4 can be deployed on Virgo.
Comment 1 Florian Waibel CLA 2010-10-28 07:51:37 EDT
Created attachment 181921 [details]
Virgo Plan containing equionx/eclipse bundles needed for RAP applications
Comment 2 Florian Waibel CLA 2010-10-28 07:54:09 EDT
Created attachment 181922 [details]
Virgo Plan containing RAP bundles needed for RAP applications
Comment 3 Florian Waibel CLA 2010-10-28 07:56:45 EDT
Created attachment 181924 [details]
Virgo Plan containing the RAP demo application

Drop this plan into the Virgo pickup folder to install the RAP demo application. Tested with Virgo Kernel 2.1.0.RC1-incubation - and RAP runtime 1.3.1.
Comment 4 Florian Waibel CLA 2010-10-28 08:04:21 EDT
TODO - automatically start the HttpService:

@see http://dev.eclipse.org/mhonarc/lists/virgo-dev/msg00336.html
Comment 5 Holger Staudacher CLA 2010-11-09 05:21:16 EST
Hey Florian,
thanks for your solution. I tink we should create a wiki page at wiki.eclipse.org/RAP before we can close the bug. Would you agree to do this? Thanks in advance.

Regards Holger
Comment 6 Holger Staudacher CLA 2010-11-10 04:48:48 EST
Thanks for creating the wiki page. You will find the page here: http://wiki.eclipse.org/RAP/Running_RAP_on_virgo

I will close the bug as fixed.
Comment 7 Andrey CLA 2011-07-12 04:48:30 EDT
Hi!

just tried to deploy RAP 1.4 demo using plans attached, but failed.
i was using virgo kernel 2.1.1 and 3.0.M6 - both failed.
Comment 8 Florian Waibel CLA 2011-07-12 08:15:32 EDT
Hi Andrey,

I guess you tried to deploy the RAP 1.4 runtime. This runtime depends on Equinox 3.7. Virgo is build on top of Equinox 3.6 and as such does not provide all required dependencies to resolve the RAP 1.4 runtime successfully.

Please use the Equinox bundles from RAP 1.3 runtime and the RAP bundles from RAP 1.4 runtime.

I tried this on the current Virgo 2.1.1.RELEASE.

Part of the installed RAP 1.3.2 runtime:

osgi> ss equinox

Framework is launched.

id	State       Bundle
10	ACTIVE      org.eclipse.equinox.common_3.6.0.v20100503
62	ACTIVE      org.eclipse.equinox.preferences_3.3.0.v20100503
63	ACTIVE      org.eclipse.equinox.app_1.3.1.R36x_v20100803
73	ACTIVE      org.eclipse.equinox.registry_3.5.0.v20100503
74	ACTIVE      org.eclipse.equinox.http.registry_1.1.1.R36x_v20101103
75	ACTIVE      org.eclipse.equinox.http.servlet_1.1.0.v20100503
76	ACTIVE      org.eclipse.equinox.http.jetty_2.0.0.v20100503

The RAP 1.4 bundles:

osgi> ss rap

Framework is launched.

id	State       Bundle
60	RESOLVED    org.eclipse.rap.jface.databinding_1.4.0.20110614-2335
77	ACTIVE      org.eclipse.rap.rwt_1.4.0.20110614-2335
	            Fragments=78
78	RESOLVED    org.eclipse.rap.rwt.q07_1.4.0.20110614-2335
	            Master=77
79	ACTIVE      org.eclipse.rap.jface_1.4.0.20110614-2335
80	ACTIVE      org.eclipse.rap.ui.workbench_1.4.0.20110614-2335
81	ACTIVE      org.eclipse.rap.ui_1.4.0.20110614-2335
82	<<LAZY>>    org.eclipse.rap.ui.views_1.4.0.20110614-2335
83	ACTIVE      org.eclipse.rap.demo_1.4.0.20110614-2335
Comment 9 Andrey CLA 2011-07-12 10:18:50 EDT
(In reply to comment #8)
Good day, Florian!

thank you for a quick reply!

yes, it was exactly that way. i used 1.4 runtime.
but as far as i can see, virgo 3.0.M6 uses Equinox 3.7 too!
Am i wrong?

The question, actually, was why doesn't RAP 1.4 run on Virgo 3.0.M6, as i managed to run RAP 1.3 on Virgo 2.1.1 flawlessly.
Comment 10 Florian Waibel CLA 2011-07-12 14:58:24 EDT
Hi Andrey,

with two small changes to the plan to match the newer versions/changes in Virgo Kernel:

1. comment out org.eclipse.osgi.services - now present in Virgo Kernel.

<!--
	<artifact type="bundle" name="org.eclipse.equinox.common" version="[3.5.0, 3.7.0)" />
	<artifact type="bundle" name="org.eclipse.osgi.services" version="[3.2.100, 4.0.0)" />
-->

2. change version range of org.eclipse.core.runtime:

<artifact type="bundle" name="org.eclipse.core.runtime" version="[3.6.0, 3.8.0)" />

you most likely encountered the following NPE:

Caused by: java.lang.NullPointerException: null
	at org.eclipse.core.internal.runtime.ResourceTranslator.getResourceBundle(ResourceTranslator.java:69)
	at org.eclipse.core.internal.runtime.ResourceTranslator.getResourceBundle(ResourceTranslator.java:61)

After investigating the source I came to the conclusion the NPE could be replaced with an InvalidStateException("Bundle not active") :-)

A singleton

	private static Activator singleton;

is initialized in the Activator of 'org.eclipse.equinox.common' bundle.

The problem we encounter here is the state RESOLVED of the org.eclipse.equinox.common bundle after starting Virgo Kernel 3.0.0:

osgi> ss common
...
id	State       Bundle
65	RESOLVED    org.eclipse.equinox.common_3.6.0.v20110523

Starting Virgo Kernel 2.1.1 the state is ACTIVE:

osgi> ss common

Framework is launched.

id	State       Bundle
10	ACTIVE      org.eclipse.equinox.common_3.6.0.v20100503

After starting this bundle manually

osgi> start 65

I was able to deploy and run the RAP 1.4 demo on virgo-kernel-3.0.0:

osgi> ss equinox
"Framework is launched."


id	State       Bundle
47	ACTIVE      org.eclipse.equinox.cm_1.0.300.v20101204
55	ACTIVE      org.eclipse.equinox.console.supportability_1.0.0.N20110626-2000
62	ACTIVE      org.eclipse.equinox.ds_1.3.0.v20110124-0830
63	ACTIVE      org.eclipse.equinox.util_1.0.200.v20100503
65	ACTIVE      org.eclipse.equinox.common_3.6.0.v20110523
73	ACTIVE      org.eclipse.equinox.preferences_3.4.0.v20110502
74	ACTIVE      org.eclipse.equinox.app_1.3.100.v20110321
82	ACTIVE      org.eclipse.equinox.registry_3.5.100.v20110502
83	ACTIVE      org.eclipse.equinox.http.registry_1.1.100.v20110502
84	ACTIVE      org.eclipse.equinox.http.servlet_1.1.200.v20110502

osgi> ss rap
"Framework is launched."


id	State       Bundle
99	RESOLVED    org.eclipse.rap.jface.databinding_1.4.0.20110614-2335
115	ACTIVE      org.eclipse.rap.rwt_1.4.0.20110614-2335
	            Fragments=116
116	RESOLVED    org.eclipse.rap.rwt.q07_1.4.0.20110614-2335
	            Master=115
117	ACTIVE      org.eclipse.rap.jface_1.4.0.20110614-2335
118	ACTIVE      org.eclipse.rap.ui.workbench_1.4.0.20110614-2335
119	ACTIVE      org.eclipse.rap.ui_1.4.0.20110614-2335
120	ACTIVE      org.eclipse.rap.ui.views_1.4.0.20110614-2335
121	ACTIVE      org.eclipse.rap.demo_1.4.0.20110614-2335

Maybe one of the Virgo experts know how to ACTIVatE the 'org.eclipse.equinox.common' bundle during startup...
Comment 11 Andrey CLA 2011-07-12 15:11:50 EDT
Amazing!

i was so close to the solution!

i've already commented out services and changed the version of runtime bundle in the plan.

then i stuck and went googling, found this bug and commented on it. ;)

thank you for the hints and thorough explanation, Florian!
Comment 12 Rino CLA 2011-09-14 06:23:57 EDT
Hi, 

I managed to get rap 1.3.2 running on virgo 2.1.1. But when i tried to deploy
rap 1.3 (or rap 1.4) on virgo 3.0.x it fails with the already mentioned NPE.
I tried "ss common" in order to search and manually start the org.eclipse.equinox.common bundle, but it doesn't show up in the list. Re-enabling the org.eclipse.equinox.common bundle in the demo plan doesn't help, because then i got the error "The bundle could not be resolved because another singleton bundle was selected. In bundle <org.eclipse.equinox.common_3.6.0.v20100503>"

How do i proceed?

Regards
Rino
Comment 13 Rino CLA 2011-09-14 06:48:34 EDT
Extra info: (running on virgo-kernel-3.0.1.RELEASE )

macbook-rino:rap_on_virgo rino$ telnet localhost 2401
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
osgi> ss common
"Framework is launched."


id	State       Bundle
3	ACTIVE      com.springsource.slf4j.org.apache.commons.logging_1.6.1
12	ACTIVE      org.eclipse.virgo.util.common_3.0.1.RELEASE
17	ACTIVE      com.springsource.org.apache.commons.codec_1.3.0
18	ACTIVE      com.springsource.org.apache.commons.httpclient_3.1.0
osgi> 
osgi> ss equinox
"Framework is launched."


id	State       Bundle
1	ACTIVE      org.eclipse.equinox.region_1.0.0.v20110503
8	ACTIVE      org.eclipse.equinox.cm_1.0.300.v20101204
11	ACTIVE      org.eclipse.equinox.event_1.2.100.v20110110
32	ACTIVE      org.eclipse.equinox.ds_1.3.0.v20110124-0830
33	ACTIVE      org.eclipse.equinox.util_1.0.200.v20100503
45	ACTIVE      org.eclipse.equinox.console.supportability_1.0.0.201108021516
osgi>
Comment 14 Florian Waibel CLA 2011-09-14 09:06:39 EDT
Hi Rino,

thanks for providing the extra information.

> macbook-rino:rap_on_virgo rino$ telnet localhost 2401

As I can see you connect to the *kernel region* console by mistake (port 2401). Please activate the *user region* console in
repository/ext/osgi.console.telnet.properties
 (port 2501 per default.)

Then you should be able to see the bundle you are looking for.

Hope this helps,
  Florian
Comment 15 Rino CLA 2011-09-14 09:31:23 EDT
(In reply to comment #14)
> Hi Rino,
> 
> thanks for providing the extra information.
> 
> > macbook-rino:rap_on_virgo rino$ telnet localhost 2401
> 
> As I can see you connect to the *kernel region* console by mistake (port 2401).
> Please activate the *user region* console in
> repository/ext/osgi.console.telnet.properties
>  (port 2501 per default.)
> 
> Then you should be able to see the bundle you are looking for.
> 
> Hope this helps,
>   Florian

DOOH!, You're right. I was looking at the wrong properties file (the one in config)!
Thanks for pointing it out. Will try again asap.

Regards
Rino