Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Getting started with Virgo (Virgin Project???)(Trying to create new projects that can reference each other)
Getting started with Virgo (Virgin Project???) [message #791567] Mon, 06 February 2012 01:34 Go to next message
Brian Williamson is currently offline Brian WilliamsonFriend
Messages: 24
Registered: January 2012
Location: Blissfield, MI
Junior Member
Hello again all,

With the help of forum users, I was able to get Greenpages 2.5 up and running in eclipse. With this experience and some additional documentation, I was able to get a web bundle up and running and serving up some simple pages.

My newest dilemma is this: Some time ago I created a series of plug-in projects for use in an equinox runtime. It worked well. I'm moving to Virgo for several reasons however I am running into problems, the biggest of which is how to reference other projects correctly. For example, I have one library project that provides a series of interfaces for other bundles. The problem I have is that I cannot reference those interfaces from within another project.

For testing purposes I created two very simple bundle projects (tried both Spring bundle and EclipseRT bundles). I added a package to each project and exported the packages. Naturally I also created a simple class in each of the packages. I import the a package in only one project and attempt to use the class in the package and get an error. Both bundles are added to my virgo runtime configuration.

I suspect that this has something to do with my project or environment setup but I have scoured google and I just can't find anything to help me with this.

Any help is greatly appreciated. I have posted the project just in case any info can be gleaned from them. Thanks!
Re: Getting started with Virgo (Virgin Project???) [message #791585 is a reply to message #791567] Mon, 06 February 2012 02:14 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Hi Brian,

Thanks for including the projects. I'll take a look tomorrow.

cheers,

Miles
Re: Getting started with Virgo (Virgin Project???) [message #792485 is a reply to message #791585] Tue, 07 February 2012 03:22 Go to previous messageGo to next message
Brian Williamson is currently offline Brian WilliamsonFriend
Messages: 24
Registered: January 2012
Location: Blissfield, MI
Junior Member
Hi Miles,

I really appreciate it. I created both projects as spring dm projects. One references the other - at least the manifest editor recognizes both bundles and exported packages. Java can't resolve them though. Its been a real head scratcher.

Thanks again - Brian
Re: Getting started with Virgo (Virgin Project???) [message #793034 is a reply to message #792485] Tue, 07 February 2012 17:34 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Brian,

I also couldn't get them to build either. The Virgo tooling does not (necessarily) support all existing Spring artifacts, and in particular we won't be supporting Spring DM as a server target. What I was able to do was create a new Spring project, and then add the OSGi nature to it. (Configure: Convert to OSGi..") Then I dragged the source files over, created the dependencies and everything compiled.

See this document http://wiki.eclipse.org/Virgo/Tooling#Migration or more on migrating existing projects, but I think you might be better off simply creating new projects depending on how large your current code base is.

hth,

Miles
Re: Getting started with Virgo (Virgin Project???) [message #793099 is a reply to message #793034] Tue, 07 February 2012 19:30 Go to previous messageGo to next message
Brian Williamson is currently offline Brian WilliamsonFriend
Messages: 24
Registered: January 2012
Location: Blissfield, MI
Junior Member
Miles,

Thanks again for looking into this. I'll give that a shot this evening and keep my fingers crossed.

My code base isn't really large and many of the plugins were slated for project changes anyway so if this works, it will be just a slightly different procedure.

- Brian
Re: Getting started with Virgo (Virgin Project???) [message #793152 is a reply to message #793099] Tue, 07 February 2012 20:39 Go to previous messageGo to next message
Brian Williamson is currently offline Brian WilliamsonFriend
Messages: 24
Registered: January 2012
Location: Blissfield, MI
Junior Member
Miles,

Would it be possible for you to post your test project files? I've had a little time and still no joy. I was wondering specifically about the step where you mention creating the dependencies. Could you elaborate?

I've been creating Spring projects, adding the OSGi bundle nature to the project, adding and configuring a src/META-INF/MANIFEST.MF (I even tried template.mf in the root), enable the bundle classpath container, export the packages, and add the projects to my virgo server runtime. Very similar to my previous attempts with the exception of the Spring items.

I can still manage to view and add the "other" projects package to the MANIFEST.MF through the manifest graphical editor dependency tab - it finds the package but then complains about not being able to resolve it.

I'm using Indigo and I've only installed the Virgo Tools, subclipse, and m2e v1.0 if that means anything. I'm not sure what state I left my projects in so I'll create two new ones in a bit and post them.

Thanks - Brian

[Updated on: Tue, 07 February 2012 20:48]

Report message to a moderator

Re: Getting started with Virgo (Virgin Project???) [message #793338 is a reply to message #793152] Wed, 08 February 2012 02:43 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Hi Brian,

Leo and I walked both through the same process you have, and we think it is a (serious) bug. We tried creating two new Bundle Projects and defining the dependencies exactly as you have. We couldn't get the dependencies to work either. Could you please file a bug against Virgo tooling on this?

The solution I was using uses the PDE build mechanism (plugin-in manifest editor with "Reguired Bundles"), but until we have support for deploying PDE bundles, that's not going to be of much help to you as you'll be able to build your bundles, but then you'll need to manually deploy them.

The good news is that greenpages does work, so it seems likely that we at least have a project structure that does work, but it isn't clear yet what is making that work that isn't working for this much simpler case. (For one thing, greenpages uses the Maven classpath mechanism.) Sorry I don't have better news, but we're working on it.

cheers,

Miles
Re: Getting started with Virgo (Virgin Project???) [message #793713 is a reply to message #793338] Wed, 08 February 2012 13:16 Go to previous messageGo to next message
Brian Williamson is currently offline Brian WilliamsonFriend
Messages: 24
Registered: January 2012
Location: Blissfield, MI
Junior Member
Miles,

Some news is good - I do wish it had been my fault though Smile

Anyway, I'd be happy to raise a bug - probably later this evening.

Thanks again for your assistance. Brian
Re: Getting started with Virgo (Virgin Project???) [message #794279 is a reply to message #793713] Thu, 09 February 2012 05:07 Go to previous messageGo to next message
Andrew Rootmann is currently offline Andrew RootmannFriend
Messages: 5
Registered: July 2009
Junior Member
Hi Brian,

I have the same issue of not being able to import a package from another project in the workspace... The only work around (no doubts, temporary one!) I've found is to export the required bundle(s) (using the Export Bundle link in the Manifest editor's Overview tab, for example) to $SERVER_HOME/repository/usr directory. Then, in the project that consumes the dependencies, first go to the manifest source and manually add the Import-Package header. Finally, on the Overview tab of the Manifest editor click the Refresh Bundle Dependencies link.

Hope it works for you.
Andrew
Re: Getting started with Virgo (Virgin Project???) [message #794521 is a reply to message #794279] Thu, 09 February 2012 11:52 Go to previous messageGo to next message
Brian Williamson is currently offline Brian WilliamsonFriend
Messages: 24
Registered: January 2012
Location: Blissfield, MI
Junior Member
Miles,

Bug has been submitted - hopefully this will get resolved quickly.

Andrew,

Thanks for the tip. I can use a workaround for the time being.

- Brian
Re: Getting started with Virgo (Virgin Project???) [message #797633 is a reply to message #791567] Mon, 13 February 2012 18:25 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
OK Brian,

This is kind of embarrassing, but I think that you can I were both making an assumption that is a natural one for an Eclipse PDE developer, but not from a Virgo or Springs developer POV.

That is that just because a project is in the workspace, does not mean that it is available for dependencies. To make it so, you need to create a par or a plan to allow those bundles to be discovered:

http://www.eclipse.org/virgo/documentation/virgo-documentation-3.0.2.RELEASE/docs/virgo-programmer-guide/htmlsingle/virgo-programmer-guide.html#developing-applications-plans

Unfortunately, I didn't figure out that my basic assumption was incorrect until I spent a lot of time going through the code and determining that there was no way that it ever could have supported what we both were thinking it should have. So I think this may fall under the "feature, not bug" category, but I'm still testing things so I can't say for sure that everything is working as it should be yet.

cheers,

Miles
Re: Getting started with Virgo (Virgin Project???) [message #797802 is a reply to message #797633] Mon, 13 February 2012 22:42 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Brian, here is a par project that should accomplish what you need.

Re: Getting started with Virgo (Virgin Project???) [message #798347 is a reply to message #797802] Tue, 14 February 2012 15:13 Go to previous messageGo to next message
Brian Williamson is currently offline Brian WilliamsonFriend
Messages: 24
Registered: January 2012
Location: Blissfield, MI
Junior Member
Miles,

Thanks for the update. I saw the traffic on the bugzilla so I was going to try and see what the PAR is all about.

Having some direction with this problem is probably the best news I've gotten in the last week.

Thanks again - Brian
Re: Getting started with Virgo (Virgin Project???) [message #880161 is a reply to message #798347] Fri, 01 June 2012 14:44 Go to previous messageGo to next message
Eduardo Frazão is currently offline Eduardo FrazãoFriend
Messages: 123
Registered: January 2012
Senior Member
Hi Folks..
Sorry, but I dont belive that you cant refer two projects, and import packages from each other.
With the Spring IDE Plugins + Virgo Tooling 2.x it was possible. I always work like that.
First I create a Bundle Project, after, other, so I put a "Project Reference" between them, and so, I added the two projects inside the Virgo Server!
All works. I can import packages, deploy packages, with no problem.

Why this does not work anymore with the new Virgo Tooling?
Re: Getting started with Virgo (Virgin Project???) [message #880229 is a reply to message #880161] Fri, 01 June 2012 17:11 Go to previous messageGo to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1341
Registered: July 2009
Senior Member
Eduardo,

If you're referring to having projects with circular dependencies on them, then that would be a really bad idea in any environment. Smile If you're talking about a set of projects with one way dependencies and they don't work as expected, please open a bug on that.

cheers,

Miles
Re: Getting started with Virgo (Virgin Project???) [message #880239 is a reply to message #880229] Fri, 01 June 2012 17:29 Go to previous messageGo to next message
Eduardo Frazão is currently offline Eduardo FrazãoFriend
Messages: 123
Registered: January 2012
Senior Member
Hi Miles!! First of all, thanks by your answer!!!

Its not projects that have circular dependencies.
Some depends on another. Import packages from them..

Its strange, because I use virgo from about six months with no problem. After upgrade to virgo tools, and remove Spring IDE STS plugins, I cant use the Bundle Editor to import packages from one bundle to another anymore. Only packages on the virgo repository are found..

Ive recorded two Screencasts to illustrate the problem..

In this first, I'm creating in a fresh workspace two Virgo Bundle Projects. Look that I cant import packages from one bundle to another:

http://www.screencast-o-matic.com/watch/cl1VbXGsi

In this second screencast, im creating a SpringDM Bundle (Ive reinstalled the Spring STS plugins). Now, I can import packages from another bundle of my workspace.

http://www.screencast-o-matic.com/watch/cl1VbFGs6

I will appreciate so mutch for some help with a so trivial task!!

Thanks!

Re: Getting started with Virgo (Virgin Project???) [message #880254 is a reply to message #880239] Fri, 01 June 2012 17:58 Go to previous messageGo to next message
Leo Dos Santos is currently offline Leo Dos SantosFriend
Messages: 27
Registered: July 2009
Junior Member
Hi Eduardo. Your videos suggest that we have introduced some sort of regression into the tools. Can you file a bug report with links to the videos? They will be very useful in helping to reproduce this bug. Thanks.
Re: Getting started with Virgo (Virgin Project???) [message #880270 is a reply to message #880254] Fri, 01 June 2012 18:24 Go to previous messageGo to next message
Eduardo Frazão is currently offline Eduardo FrazãoFriend
Messages: 123
Registered: January 2012
Senior Member
Hi Leo!

Here is the bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=381417

Thanks!!!!
Re: Getting started with Virgo (Virgin Project???) [message #891787 is a reply to message #791567] Mon, 25 June 2012 22:58 Go to previous messageGo to next message
Leo Dos Santos is currently offline Leo Dos SantosFriend
Messages: 27
Registered: July 2009
Junior Member
Brian, bug 381417 has been resolved. That means that your use case of importing a package from project a into project b without needing a par should work again! Sorry about the delay.
Re: Getting started with Virgo (Virgin Project???) [message #891788 is a reply to message #891787] Mon, 25 June 2012 23:15 Go to previous messageGo to next message
Eduardo Frazão is currently offline Eduardo FrazãoFriend
Messages: 123
Registered: January 2012
Senior Member
Hi Leo! In which version of the tooling this fix will be released?
Re: Getting started with Virgo (Virgin Project???) [message #892031 is a reply to message #891788] Tue, 26 June 2012 22:21 Go to previous messageGo to next message
Leo Dos Santos is currently offline Leo Dos SantosFriend
Messages: 27
Registered: July 2009
Junior Member
We plan to do our 1.0.0 release by early/mid next week!

Cheers,
Leo
Re: Getting started with Virgo (Virgin Project???) [message #892032 is a reply to message #892031] Tue, 26 June 2012 22:42 Go to previous message
Eduardo Frazão is currently offline Eduardo FrazãoFriend
Messages: 123
Registered: January 2012
Senior Member
Nice!!

Thanks by effort Leo!

Att,
Eduardo Frazão
Previous Topic:Error configuring application listener: ClassNotFoundException
Next Topic:Running a boot-level bundle
Goto Forum:
  


Current Time: Thu Mar 28 10:37:22 GMT 2024

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

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

Back to the top