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.)
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.
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:
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.
[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
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.
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.
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.
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.