Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Could Fragment bundles be used on Virgo?
Could Fragment bundles be used on Virgo? [message #633090] Fri, 15 October 2010 10:36 Go to next message
guofeng zhang is currently offline guofeng zhang
Messages: 49
Registered: July 2009
Member
Equinox support fragment bundles, but Virgo user guide describes that "The Virgo Web Server does not support deploying fragment bundles", what does the late means?

If I deploy a fragment bundle using Equinox command, where does the fragment bundle runs -- in Kernel or user region? (suppose I use Virgo Web Server, but telnet to it from DOS console.)



Re: Could Fragment bundles be used on Virgo? [message #633095 is a reply to message #633090] Fri, 15 October 2010 10:54 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
Virgo will automatically search fragments for a deploying bundle in its repository (user region)

For kernel you will need to add fragments to the list bundles in
/lib/org.eclipse.virgo.kernel.launch.properties.

Make sure not to add @start option to it.
Re: Could Fragment bundles be used on Virgo? [message #633096 is a reply to message #633090] Fri, 15 October 2010 11:05 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
The user guide statement means that you shouldn't try to deploy a fragment, by copying to pickup or using the admin console, JMX, etc. Dmitry has explained what to do instead.

If you use Equinox console to install a fragment, this will bypass the Virgo deployment pipeline and simply install the bundle in the user region (if you configured the console in the user region properties) or in the kernel (if you configured the console in the kernel launch properties). The fragment may then attach to hosts which are resolved or refreshed in the future.

In general, it is best to avoid installing bundles into Virgo using the Equinox console. Apart from it being not particularly usable, you won't get many of the benefits of the deployment pipeline such as automatic faulting in of dependencies from the repository.

Re: Could Fragment bundles be used on Virgo? [message #634387 is a reply to message #633096] Thu, 21 October 2010 14:06 Go to previous messageGo to next message
Andre  is currently offline Andre
Messages: 3
Registered: October 2010
Junior Member
Hi there,

I tried to follow your instructions when installing EclipseLink bundles into Virgo, but I was not successful. Maybe I have not understood you correctly, could you help? This is what I did:

  • There is a fragment "org.eclipse.persistence.jpa.osgi" with host "org.eclipse.persistence.jpa". So using the console, I typed install " file:///..../org.eclipse.persistence.jpa.osgi_2.1.1.v2010081 7-r8050.jar". The bundle is then in INSTALLED state.
  • Using the admin web interface, I installed the host bundle "org.eclipse.persistence.jpa_2.1.1.v20100817-r8050.jar". This produced the error message below, which I don't understand. ("org.eclipse.persistence.core" is ACTIVE.)


Installing the host bundle alone succeeds, so it seems the other dependencies are OK.

Cheers,
André

[2010-10-21 15:46:43.203] http-8080-1                  <DE0500E> Unable to install application from URI 'file:/.../virgo/work/org.eclipse.virgo.region.user_0.0.0/upload/org.eclipse.persistence.jpa_2.1.1.v20100817-r8050.jar'. Cannot satisfy constraints for bundle 'org.eclipse.persistence.jpa' version '2.1.1.v20100817-r8050'. Cannot resolve: org.eclipse.persistence.jpa
    Resolver report:
        A Require-Bundle could not be resolved because of a uses directive conflict. Caused by missing constraint in bundle <org.eclipse.persistence.jpa_2.1.1.v20100817-r8050>
             constraint: <Require-Bundle: org.eclipse.persistence.core; bundle-version="2.1.1.v20100817-r8050">
        A Fragment-Host could not be resolved. The affected fragment is org.eclipse.persistence.jpa.osgi_2.1.1.v20100817-r8050
. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'org.eclipse.persistence.jpa' at version '2.1.1.v20100817-r8050': Cannot resolve: org.eclipse.persistence.jpa
    Resolver report:
        A Require-Bundle could not be resolved because of a uses directive conflict. Caused by missing constraint in bundle <org.eclipse.persistence.jpa_2.1.1.v20100817-r8050>
             constraint: <Require-Bundle: org.eclipse.persistence.core; bundle-version="2.1.1.v20100817-r8050">
        A Fragment-Host could not be resolved. The affected fragment is org.eclipse.persistence.jpa.osgi_2.1.1.v20100817-r8050

Re: Could Fragment bundles be used on Virgo? [message #634402 is a reply to message #634387] Thu, 21 October 2010 14:52 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
To reduce the risk of a uses constraint violation, it is better to place fragments in repository/usr and the deploy the host bundle to Virgo.

Please could you try that instead and see what happens.
Re: Could Fragment bundles be used on Virgo? [message #634411 is a reply to message #634402] Thu, 21 October 2010 15:28 Go to previous messageGo to next message
Andre  is currently offline Andre
Messages: 3
Registered: October 2010
Junior Member
Thanks for the quick answer! I have copied the file into repository/usr. There is no immediate reaction, is that Ok? It will not appear in any way in the list of bundles. The error message is still the same.

Cheers,
André

Andres-Mac:usr eickler$ pwd
/Users/eickler/springsource/virgo/repository/usr
Andres-Mac:usr eickler$ ls -l
total 12360
-rw-r--r-- 1 eickler staff 890344 Sep 3 18:51 com.springsource.freemarker-2.3.15.jar
-rw-r--r-- 1 eickler staff 53773 Sep 3 18:51 com.springsource.javax.persistence-1.0.0.jar
-rw-r--r-- 1 eickler staff 122589 Sep 3 18:51 com.springsource.org.apache.commons.dbcp-1.2.2.osgi.jar
-rw-r--r-- 1 eickler staff 62203 Sep 3 18:51 com.springsource.org.apache.commons.pool-1.3.0.jar
-rw-r--r-- 1 eickler staff 3393811 Sep 3 18:51 com.springsource.org.eclipse.persistence-1.0.0.jar
-rw-r--r-- 1 eickler staff 59117 Sep 3 18:51 com.springsource.org.eclipse.persistence.antlr-1.0.0.jar
-rw-r--r-- 1 eickler staff 216922 Sep 3 18:51 com.springsource.org.eclipse.persistence.asm-1.0.0.jar
-rw-r--r-- 1 eickler staff 433036 Sep 3 18:51 com.springsource.org.eclipse.persistence.jpa-1.0.0.jar
-rw-r--r-- 1 eickler staff 1060309 Sep 3 18:51 com.springsource.org.h2-1.0.71.jar
-rw-r--r--@ 1 eickler staff 19093 Oct 21 17:18 org.eclipse.persistence.jpa.osgi_2.1.1.v20100817-r8050.jar
Re: Could Fragment bundles be used on Virgo? [message #634424 is a reply to message #634411] Thu, 21 October 2010 16:08 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
The fragment should be installed automatically when you deploy the host. Virgo does this in a temporary state rather than polluting the OSGi framework. However, when the resolution failure occurs, Virgo dumps the OSGi state to disk and you can then use the admin console OSGi tab to inspect the state dump, see what bundles were installed, and how their wiring was getting on when the resolver blew.

Would you like to give that a go and see if you can see the fragment in the state dump? You can then look and see if there is any sign of the package org.eclipse.persistence.core in the state dump.
Re: Could Fragment bundles be used on Virgo? [message #634460 is a reply to message #634424] Thu, 21 October 2010 19:38 Go to previous messageGo to next message
Andre  is currently offline Andre
Messages: 3
Registered: October 2010
Junior Member
Neat feature, I'll try to understand the dump. I guess you mean this repository-usr.index XML file.

Cheers,
Andre

P.S.: My motivation is btw. that EclipseLink in the container cannot create an EntityManagerFactory, because it probably does not see my persistence.xml file and possibly also not the classes mentioned in it. I was hoping that the thing ending with osgi has some magic in it that would resolve the problem. If anyone has a good suggestion, I'd be more than happy to hear it.
Re: Could Fragment bundles be used on Virgo? [message #634503 is a reply to message #634460] Fri, 22 October 2010 01:27 Go to previous message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
No, it's a different file in the relevant dump directory in serviceability. I forget the file name and type as it's a binary format only readable via the admin console.

However, there is an overview of how to using the admin console to browse OSGi states in the docs.

You'll see the relevant state dump listed there.
Previous Topic:can't import derbyclient bundle
Next Topic:[SOLVED] java.lang.NoClassDefFoundError: org/codehaus/jackson/map/ObjectMapper
Goto Forum:
  


Current Time: Tue Sep 16 19:42:06 GMT 2014

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

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