Thursday, November 25, 2010

How to develop with the Virgo Kernel in Eclipse

A number of groups are discovering that the Virgo Kernel is a really useful OSGi runtime. For instance the Rich Ajax Platform project have documented how to run RAP on the kernel.

Others have steered clear of the kernel because the Eclipse-based Virgo tooling does not support the kernel directly (see bug 331101). However, it's really easy to get the tooling working with the kernel. Here's how...

First, set up the Virgo tooling in Eclipse as described in the Tooling chapter of the Virgo Programmer Guide.

However, when you create a new Virgo Web Server server runtime environment and point at a Virgo kernel installation, you'll see the following error:

.version file in lib directory is missing key 'virgo.server.version'. Make
sure to point to a Virgo Server installation.


















Edit lib/.version in the kernel installation to contain the key 'virgo.server.version' instead of 'virgo.kernel.version'. Then the above error goes away and you can continue to set up the runtime environment and server as per the instructions in the Programmer Guide.

You can then use the Virgo tooling to do all the usual things: start and stop the kernel, create and deploy bundles, PARs and plans, examine bundles, and explore package and service wirings.

2 comments:

Anonymous said...

Glyn, thanks for the tip. Works in STS 2.5.2 RELEASE as well as Eclipse. Note, however, that while I can start and stop the server deploying bundles does not work for me. I can select bundles in the Server>Add and Remove context menu dialog but adding them has no effect on the actual running instance of the server.

... WkH

Glyn said...

That's peculiar. Probably best to take this up on the Virgo forum for better visibility of the issue.

Projects

OSGi (130) Virgo (59) Eclipse (10) Equinox (9) dm Server (8) Felix (4) WebSphere (3) Aries (2) GlassFish (2) JBoss (1) Newton (1) WebLogic (1)