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:

  1. Anonymous5:40 PM

    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

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

    ReplyDelete