Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Equinox Server
Equinox Server [message #66072] Thu, 13 December 2007 04:26 Go to next message
Eclipse UserFriend
Hi

I want to know if it is possible to start equinox server programmatically
with Jetty and Rap. Because I want my server when it launch, start Equinox
server too.
Also, it is possible to make RAP and RCP application talk through JMS
messages. The scenario is like this, the RAP application send a message
for my server and then forward it to proper component within my RCP
application?

Regards
Salwa
Re: Equinox Server [message #66301 is a reply to message #66072] Fri, 14 December 2007 04:44 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

In order to automate UI test RAP I've done this. Here's the code :

private static final int PORT = 8080;
private static final String[] BUNDLES =
{
"org.eclipse.equinox.common_3.2.0.v20060603.jar"
,"javax.servlet_2.4.0.20071010-2241.jar"

,"org.apache.commons.logging_1.0.4.20071010-2241.jar"

,"org.eclipse.equinox.registry_3.2.1.R32x_v20060814.jar"

,"org.eclipse.core.runtime_3.2.0.v20060603.jar"

,"org.eclipse.core.commands_3.2.0.I20060605-1400.jar"

,"org.eclipse.core.expressions_3.2.2.r322_v20070109a.jar"

,"org.eclipse.core.contenttype_3.2.0.v20060603.jar"

,"org.eclipse.core.jobs_3.2.0.v20060603.jar"

,"org.eclipse.equinox.http.registry_1.0.0.20071010-2241.jar "

,"org.eclipse.equinox.http.servlet_1.0.0.20071010-2241.jar"

,"org.eclipse.equinox.preferences_3.2.1.R32x_v20060717.jar"

,"org.eclipse.osgi.services_3.1.100.v20060601.jar"

,"org.eclipse.rap.jface_1.0.0.20071010-2241.jar"

,"org.eclipse.rap.rwt_1.0.0.20071010-2241.jar"

,"org.eclipse.rap.ui_1.0.0.20071010-2241.jar"

,"org.eclipse.rap.ui.views_1.0.0.20071010-2241.jar"

,"org.eclipse.rap.ui.workbench_1.0.0.20071010-2241.jar"

,"org.eclipse.equinox.http.jetty_1.0.0.20071010-2241.jar"

,"org.mortbay.jetty_5.1.11.20071010-2241.jar"
};

public void startTest() throws Exception
{
//Start Equinox service
System.setProperty("org.osgi.service.http.port",String.valueOf(PORT));
System.setProperty("osgi.parentClassloader","app");
System.setProperty(EclipseStarter.PROP_CLEAN,"true");

Assert.assertFalse(EclipseStarter.isRunning());
BundleContext context = EclipseStarter.startup(new String[]{},null);
Assert.assertTrue(EclipseStarter.isRunning());

for (int i = 0; i < BUNDLES.length; i++)
bundles.add(context.installBundle(FOLDER_TARGET_PLATFORM +
BUNDLES[i]));

for (int i = 0; i < bundles.size(); i++)
{
Bundle bundle = bundles.get(i);

if (bundle.getState() != Bundle.ACTIVE && bundle.getState() !=
Bundle.STARTING)
bundle.start();
}
}

Hope that helps.

Setya
Re: Equinox Server [message #66322 is a reply to message #66072] Fri, 14 December 2007 04:49 Go to previous messageGo to next message
Eclipse UserFriend
Salwa wrote:

> Also, it is possible to make RAP and RCP application talk through JMS
> messages. The scenario is like this, the RAP application send a message
> for my server and then forward it to proper component within my RCP
> application?

I don't see why you can't do this since with JMS you don't have to know
each other to send/receive messages.

Regards,

Setya
Re: Equinox Server [message #66881 is a reply to message #66322] Mon, 17 December 2007 02:10 Go to previous messageGo to next message
Eclipse UserFriend
Hi
Thankx alot for your reply.
I try the code that you posted. However, I got this problems when i start
running Rap.
I got this exception:
**On the browser when i launch rap:
HTTP ERROR: 500
Internal Server Error
RequestURI=/rap

Powered by Jetty://
=====================================
****On my console:
SEVERE: /rap?nocache=1197874737785:
java.lang.NullPointerException
at rap.platform.LoginScreen.createContents(LoginScreen.java:85)

at
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I (EntryPointManager.java:94)
at
org.eclipse.rwt.internal.lifecycle.PrepareUIRoot.execute (PrepareUIRoot.java:36)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.executePhase (RWTLifeCycle.java:126)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.execute (RWTLifeCycle.java:88)
at
org.eclipse.rwt.internal.service.LifeCycleServiceHandler$1.r un (LifeCycleServiceHandler.java:59)
at
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.int ernalServic e(LifeCycleServiceHandler.java:178)
at
org.eclipse.rwt.internal.service.LifeCycleServiceHandler.acc ess$1( LifeCycleServiceHandler.java:170)
at
org.eclipse.rwt.internal.service.LifeCycleServiceHandler$Lif eCycleServi ceHandlerSync.doService(LifeCycleServiceHandler.java:135)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.servi ceInternal(RWTLifeCycleServiceHandlerSync.java:82)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync.acces s$0(RWTLifeCycleServiceHandlerSync.java:48)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleServiceHandle rSync$1.ser vice(RWTLifeCycleServiceHandlerSync.java:43)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleBlockControl$ ServiceHand lerProcessor.run(RWTLifeCycleBlockControl.java:68)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleThreadPool$Po olRunnable. run(RWTLifeCycleThreadPool.java:38)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycleThreadPool$Po olWorker.ru n(RWTLifeCycleThreadPool.java:66)


Do u have any idea!!!

Regards
Salwa
Re: Equinox Server [message #66893 is a reply to message #66881] Mon, 17 December 2007 04:30 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Do you encounter the same error when you launch Equinox from Eclipse
instead of programmatically ? I never had problem when launching my app
after launching Equinox programmatically.

Regards,

Setya
Re: Equinox Server [message #66902 is a reply to message #66893] Mon, 17 December 2007 05:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: salwa.moih.gmail.com

No, it was working fine ,
just when it fail when i run it programmatically


Salwa
Re: Equinox Server [message #66919 is a reply to message #66902] Mon, 17 December 2007 07:52 Go to previous message
Eclipse UserFriend
Hi,

Then just compare the list of bundles (version & numbers) with the ones
when you run from Eclipse.

Regards,

Setya
Previous Topic:Slow ListViewer
Next Topic:FormEditor addPage bug?
Goto Forum:
  


Current Time: Tue Mar 11 03:02:03 EDT 2025

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

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

Back to the top