Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Debugging bundles on Virgo with Spring Source Tool Suite
Debugging bundles on Virgo with Spring Source Tool Suite [message #715877] Mon, 15 August 2011 16:40 Go to next message
paulvitic  is currently offline paulvitic
Messages: 4
Registered: August 2011
Junior Member
Until now we develop and debug our Spring based applications with Eclipse and Maven tools. We do not use any Application server for production. We simply package our war files with Maven tools and debug them with Maven Tomcat plugin+Maven run configurations. We also use Maven tools such as maven-jar-plugin, maven-dependency-plugin to package jars in a certain structure and debug these with eclipse run configurations. We use wagon-maven-plugin for deployment. It is not always easy but it serves the purpose.

Recently a new member of our team found all these too confusing and advised me to switch to an Application server or OSGi framework based development, deployment and production.

I have been wanting to learn more about OSGi so I decided to give it a try. It took a couple of days to get the basic knowledge. Soon I started to ask myself how easy it is to debug bundle development.

I selected SpringSource TS as IDE and Virgo as the OSGi framework. I added my Virgo (2.2.1) installation as a server to the IDE. I gave my project an OSGi bundle project nature via the Spring Tools of the IDE.

I added my bundle projects to the server, started the server and all seem to work fine. There did not seem to be any issue in terms of debugging until I wanted to try to debug a bundle project with embedded jars,i.e. with some "Bundle-ClassPath" entries. This is inevitable as some legacy jars that my projects will be dependent on will not be OSGi enabled. The embedded jars are in the project classpath via the "Maven Dependency" library (I continued to use Maven for dependency management).

When I tried to run these bundles from inside SpringSource TS IDE, i.e. by adding them to the Virgo server, classes within packages in the the embedded jars are not resolved.

When I Googled this issue a little I found out that this is a "known limitation". See bugs.eclipse.org/bugs/show_bug.cgi?id=135012.

Is this true? Is it not possible to debug OSGi bundles with embedded jars on target OSGi framework such as Virgo with Equinox based IDEs?

If so how is one expected to debug these type of bundles?

Re: Debugging bundles on Virgo with Spring Source Tool Suite [message #717820 is a reply to message #715877] Mon, 22 August 2011 09:16 Go to previous message
Martin Lippert is currently offline Martin Lippert
Messages: 123
Registered: July 2009
Senior Member
Hi!

I don't know exactly what the current state of JDT is with regards to supporting embedded JARs, since the compiler limitations seem to be resolved, but not some UI issues... Strange... Anyway, did you use the latest STS 2.7.1 running on top of Eclipse 3.7? I would definitely recommend that.

What do you exactly mean with "classes within... are not resolved"? Do you mean when you debug your app, you are not seeing source code for them? Or is there a runtime issue?

As a side note: You can always try to extract the embedded JARs into their own bundles. There are libraries out there that are able to add the MANIFEST.MF to an existing JAR (like bnd for example).

-Martin
Previous Topic:Running a set of eclipse bundles as an application
Next Topic:Enabling Bundlor after migration to Virgo IDE
Goto Forum:
  


Current Time: Thu Apr 24 01:34:34 EDT 2014

Powered by FUDForum. Page generated in 0.02204 seconds