Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Static EclipseLink weaving causing endless bundle refresh
Static EclipseLink weaving causing endless bundle refresh [message #1008062] Fri, 08 February 2013 17:17 Go to next message
Simon Watson is currently offline Simon WatsonFriend
Messages: 30
Registered: September 2011
Member
I am encountering a problem deploying a single bundle to Virgo 3.6 within my Eclipse IDE.

The bundle is a JPA persistence unit and, for my testing, has a single entity class. The bundle's Eclipse project settings specify the Virgo OSGi Bundle, Java, and JPA facets. The bundle can be deployed to Virgo fine but as soon as I enable the JPA EclipseLink static weaving at build option, the bundle will no longer deploy properly. The server view in Eclipse shows the bundle endlessly alternating between 'Republish' and 'Synchrnonized', whilst Virgo's console output shows the output below.

Can anyone explain exactly what's going on and suggest a workaround? I need to use static weaving for other reasons. Is there an alternative approach for static weaving which is more Virgo friendly?

I'm attaching the bundle's project archive.

Thanks,

Simon.

[2013-02-08 17:12:00.887] CP Connection(500)-127.0.0.1 <DE0010I> Stopping bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:00.888] CP Connection(500)-127.0.0.1 <DE0011I> Stopped bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:00.916] CP Connection(500)-127.0.0.1 <DE0004I> Starting bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:00.917] start-signalling-3           <DE0005I> Started bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:00.918] CP Connection(500)-127.0.0.1 <DE0008I> Refreshed bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:03.335] CP Connection(503)-127.0.0.1 <DE0007I> Refreshing bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:03.338] CP Connection(503)-127.0.0.1 <DE0010I> Stopping bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:03.339] CP Connection(503)-127.0.0.1 <DE0011I> Stopped bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:03.367] CP Connection(503)-127.0.0.1 <DE0004I> Starting bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:03.368] start-signalling-3           <DE0005I> Started bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:03.369] CP Connection(503)-127.0.0.1 <DE0008I> Refreshed bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:05.890] CP Connection(505)-127.0.0.1 <DE0007I> Refreshing bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:05.893] CP Connection(505)-127.0.0.1 <DE0010I> Stopping bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:05.894] CP Connection(505)-127.0.0.1 <DE0011I> Stopped bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:05.921] CP Connection(505)-127.0.0.1 <DE0004I> Starting bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:05.922] start-signalling-3           <DE0005I> Started bundle 'foo.test.pu2' version '1.0.0'. 
[2013-02-08 17:12:05.923] CP Connection(505)-127.0.0.1 <DE0008I> Refreshed bundle 'foo.test.pu2' version '1.0.0'. 
  • Attachment: testpu2.zip
    (Size: 3.87KB, Downloaded 60 times)
Re: Static EclipseLink weaving causing endless bundle refresh [message #1008430 is a reply to message #1008062] Tue, 12 February 2013 12:54 Go to previous messageGo to next message
Hristo Iliev is currently offline Hristo IlievFriend
Messages: 156
Registered: May 2010
Location: Sofia, Bulgaria
Senior Member

Looks to me like an issue with Gemini JPA refresh feature [1]

A possible approach to solve this is to describe JPA stuff as initial artifact in Virgo. In this way you'll have it started as early as possible so the refresh would not be needed.

[1] http://wiki.eclipse.org/Gemini/JPA/Documentation/OtherTopics#Refreshing
Re: Static EclipseLink weaving causing endless bundle refresh [message #1008489 is a reply to message #1008430] Tue, 12 February 2013 17:35 Go to previous messageGo to next message
Simon Watson is currently offline Simon WatsonFriend
Messages: 30
Registered: September 2011
Member
Thanks for your reply. I don't think Gemini JPA refresh is the problem as I can recreate the issue with only my test bundle deployed via the Eclipse Virgo tooling. I think it's the tooling which is interfering somehow.

I have encountered problems with Gemini JPA refreshing before (see a previous thread I posted ). As a result, I have disabled its refreshing, which is why I'm trying to get the static weaving working Smile I will try using Maven or just manually export the bundle I need to weave from Eclipse, and place in the /repository/usr directory i.e. a workaround I can live with because the bundle won't need to change much once it's working.

Hopefully someone involved in the tooling can comment on whether this is a bug or I have things configured incorrectly.
Re: Static EclipseLink weaving causing endless bundle refresh [message #1008643 is a reply to message #1008489] Wed, 13 February 2013 11:55 Go to previous messageGo to next message
Hristo Iliev is currently offline Hristo IlievFriend
Messages: 156
Registered: May 2010
Location: Sofia, Bulgaria
Senior Member

If you manage to install the bundle on standalone Virgo via the pickup directory or the repository I think we'll be able to isolate if this is a problem related to the tooling only or a general issue with Virgo and JPA.
Re: Static EclipseLink weaving causing endless bundle refresh [message #1009889 is a reply to message #1008062] Fri, 15 February 2013 23:39 Go to previous messageGo to next message
Leo Dos Santos is currently offline Leo Dos SantosFriend
Messages: 26
Registered: July 2009
Junior Member
Hi Simon

What version of the tooling are you using, are you on the 1.0.0 release or one of the 1.0.1 snapshots? There was some bundle refresh issues prior to 1.0.0 that were fixed, but they were tied to automatic manifest generation.

I loaded your sample into my dev environment to debug. I ran into issues with the JPA tooling (I can sympathize Surprised) but once I worked past those I was able to compile the project and deploy it to Virgo 3.6 without refresh issues.

Re: Static EclipseLink weaving causing endless bundle refresh [message #1009896 is a reply to message #1009889] Sat, 16 February 2013 00:00 Go to previous message
Simon Watson is currently offline Simon WatsonFriend
Messages: 30
Registered: September 2011
Member
I'm using 1.0.0.201209050002-RELEASE. I tried exporting the bundle and manually deploying it to Virgo's pickup directory and it worked. I'll try updating to the latest snapshot.
Previous Topic:Guide to getting Greenpages working under Eclipse
Next Topic:Deployment in Eclipse results in empty MANIFEST.MF
Goto Forum:
  


Current Time: Wed Nov 26 17:47:45 GMT 2014

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

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