Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP 1.5 on Virgo 3.5
RAP 1.5 on Virgo 3.5 [message #889796] Tue, 19 June 2012 16:42 Go to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Has anyone been able to get this working? The current wiki page isn't even close to the current configuration:

http://wiki.eclipse.org/RAP/Running_RAP_on_virgo

I'm running into some pretty gnarly dependency issues.
Re: RAP 1.5 on Virgo 3.5 [message #889931 is a reply to message #889796] Wed, 20 June 2012 09:45 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
Hi Miles,

you are right. The Wiki page should be updated. With RAP 1.5 there is an OSGi integration available which I successfully use with Virgo Kernel 3.0.3.RELEASE.

Extend your Virgo installation with Jetty 8.1.3 HttpService:

<plan name="org.eclipse.jetty" version="8.1.3" scoped="false" atomic="true" ...>

	<artifact type="bundle" name="javax.servlet" version="[3, 4)" />
	<artifact type="bundle" name="org.eclipse.jetty.util" version="[8.1.3, 9)" />
	<artifact type="bundle" name="org.eclipse.jetty.io" version="[8.1.3, 9)" />
	<artifact type="bundle" name="org.eclipse.jetty.http" version="[8.1.3, 9)" />
	<artifact type="bundle" name="org.eclipse.jetty.servlet" version="[8.1.3, 9)" />

	<artifact type="bundle" name="org.eclipse.equinox.http.servlet" version="[1.1.300, 2)" />
	<artifact type="bundle" name="org.eclipse.equinox.http.jetty" version="[3.0.0, 4)" />
</plan>


Don't forget to specify the HTTP port in lib/org.eclipse.virgo.kernel.launch.properties:

org.osgi.service.http.port=18080


And add RAP plus the OSGi integration:

<plan name="org.eclipse.rap.rwt" version="1.5.0" scoped="false" atomic="true" ...>

	<artifact type="bundle" name="org.eclipse.rap.rwt" version="[1.5, 2)" />
	<artifact type="bundle" name="org.eclipse.rap.rwt.osgi" version="[1.5, 2)" />
</plan>


Now you are able to write an EntryPoint, configure and register your RAP application as an OSGi service:

package org.example.rap.helloworld;

import org.eclipse.rwt.lifecycle.IEntryPoint;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class EntryPoint implements IEntryPoint {

    public int createUI() {
      Display display = new Display();
      Shell shell = new Shell( display );
      shell.setLayout( new GridLayout( 1, false ) );

      Button button = new Button( shell, SWT.PUSH );
      button.setText( "Hello Virgo world!" );

      shell.pack();
      shell.open();
      return 0;
    }
  }


package com.eclipsesource.demo.rap.virgodemo;

import java.util.HashMap;
import java.util.Map;

import org.eclipse.rwt.application.Application;
import org.eclipse.rwt.application.ApplicationConfiguration;
import org.eclipse.rwt.client.WebClient;
import org.example.rap.helloworld.EntryPoint;

public class SimpleConfiguration implements ApplicationConfiguration {

	public void configure(Application application) {
		Map<String, String> properties = new HashMap<String, String>();
		properties.put(WebClient.PAGE_TITLE, "simple RAP test");
		application.addEntryPoint("/simple", EntryPoint.class, properties );
	}
}


<?xml version="1.0" encoding="UTF-8"?>
... 
    <bean id="simpleConfiguration" class="com.eclipsesource.demo.rap.virgodemo.SimpleConfiguration" init-method="init" />

    <osgi:service ref="simpleConfiguration" interface="org.eclipse.rwt.application.ApplicationConfiguration" />
</beans>


I'll try to migrate this setup to Virgo Kernel 3.5.0 and report back.

Hope this helps,
Florian
Re: RAP 1.5 on Virgo 3.5 [message #889980 is a reply to message #889931] Wed, 20 June 2012 13:13 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
The good news: RAP 1.5.0 works with Virgo Jetty Server 3.5.0.M04

download.eclipsesource.com/~fwaibel/virgo/Virgo_admin_console_with_RAP.png

As you can see in the screenshot the configuration is almost the same as above with Virgo Kernel 3.0.3.RELEASE. (I
removed the Jetty 8.1.3 bundles from the jetty extension plan.) and the configuration of the HttpService port is in the good old config.ini now.

The bad news: I think I can reproduce your "gnarly dependency issues" with the Virgo Tooling.

[2012-06-20 14:36:58.893]  TCP Connection(8)-127.0.0.1 <DE0000I> Installing bundle 'com.eclipsesource.demo.rap.virgodemo' version '1.0.0'. 
[2012-06-20 14:37:00.081]  TCP Connection(8)-127.0.0.1 <ME0003I> Dump 'serviceability/dump/2012-06-20-14-36-915' generated 
[2012-06-20 14:37:00.095]  TCP Connection(8)-127.0.0.1 <DE0002E> Installation of bundle 'com.eclipsesource.demo.rap.virgodemo' version '1.0.0' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'com.eclipsesource.demo.rap.virgodemo' at version '1.0.0': Cannot resolve: com.eclipsesource.demo.rap.virgodemo
    Resolver report:
        A Require-Bundle could not be resolved. Resolver error data <Require-Bundle: org.eclipse.rap.rwt; bundle-version="0.0.0">. Caused by missing constraint in bundle <com.eclipsesource.demo.rap.virgodemo_1.0.0>
             constraint: <Require-Bundle: org.eclipse.rap.rwt; bundle-version="0.0.0">


I observed that the bundles configured as additional initial artifacts are no longer available in the Server configuration of Virgo Jetty 3.5.0.M04 inside my Eclipse.

I used the OSGi console to check if the HttpService is available. When starting VJS from the command line I can access the console with telnet (enabled in repository/ext/osgi.console.properties). Starting VJS with the Virgo Tools I was not able to connect to the OSGi console.

Hope this helps,
Florian

[Updated on: Wed, 20 June 2012 13:15]

Report message to a moderator

Re: RAP 1.5 on Virgo 3.5 [message #893530 is a reply to message #889980] Wed, 04 July 2012 13:08 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
The Wiki page "Running RAP on Virgo" mentioned above has been updated for RAP 1.5 and Virgo 3.0.3.RELEASE.
Re: RAP 1.5 on Virgo 3.5 [message #893573 is a reply to message #893530] Wed, 04 July 2012 16:02 Go to previous message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Awesome. Thanks Florian.
Previous Topic:Resorting ot editors
Next Topic:Tree selection problem
Goto Forum:
  


Current Time: Fri Mar 29 12:28:11 GMT 2024

Powered by FUDForum. Page generated in 0.07847 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top