Hi Laurent,
we are now working on our newest version of the plug-in using the 6.5 sdk for production. Our plug-in is working fine here.
But now we have installed another plug-in (from a different company) and then tried to deploy our plug-in again.
Our plug-in will not now be deployed.
When the plugin package is read, it tries to deploy vim25.jar. That fails because it is already deployed by another plug-in.
Then our plug-in won't be deployed, because it has a missing dependency.
I was wondering (for a long time now), why it is necessary for the plug-ins to bring the vim25.jar with them. It
seems strange, that such an important jar, which is used by probably all providers is not installed already in
server/repository/usr directory. Can you tell us why - so we can understand that? And if it is not posible, how we
can get around these problems?
Many thanks
Cathy
Here's the log:
[2016-12-15T09:02:07.787+01:00] [ERROR] Connection(13)-111.111.22.22 org.eclipse.virgo.kernel.deployer.management.StandardDeployer Exception filtered from JMX invocation org.eclipse.virgo.nano.deployer.api.core.DeploymentException: The artifact bundle 'com.vmware.wsvim25' version '6.5.0' in scope 'null' at URI 'file:/C:/ProgramData/VMware/vCenterServer/cfg/vsphere-client/vc-packages/vsphere-client-serenity/com.acme.gui-2.0.0/plugins/vim25.jar' cannot be stored in the runtime artifact model as it clashes with the artifact bundle 'com.vmware.wsvim25' version '1.0.0' in scope 'null' which is already present.
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:179)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:140)
...
Caused by: org.eclipse.virgo.kernel.deployer.model.DuplicateFileNameException: The artifact bundle 'com.vmware.wsvim25' version '6.5.0' in scope 'null' at URI 'file:/C:/ProgramData/VMware/vCenterServer/cfg/vsphere-client/vc-packages/vsphere-client-serenity/com.acme.myplugin-2.0.0/plugins/vim25.jar' cannot be stored in the runtime artifact model as it clashes with the artifact bundle 'com.vmware.wsvim25' version '1.0.0' in scope 'null' which is already present.
at org.eclipse.virgo.kernel.deployer.model.internal.StandardRuntimeArtifactModel.checkFileName(StandardRuntimeArtifactModel.java:100)
at org.eclipse.virgo.kernel.deployer.model.internal.StandardRuntimeArtifactModel.add(StandardRuntimeArtifactModel.java:78)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.addGraphToModel(PipelinedApplicationDeployer.java:303)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:174)
... 39 common frames omitted
[2016-12-15T09:02:07.808+01:00] [INFO ] Connection(13)-111.111.22.22 org.eclipse.virgo.medic.eventlog.default ME0003I Dump 'C:\PROGRA~1\VMware\VCENTE~1\WEBCLI~1\server\serviceability\dump\2016-12-15-09-02-804' generated
[2016-12-15T09:02:07.832+01:00] [ERROR] vc-extensionmanager-pool-121 70000086 100004 200001 com.vmware.vise.extensionfw.impl.JMXBundleDeployer Error deploying file:/C:/ProgramData/VMware/vCenterServer/cfg/vsphere-client/vc-packages/vsphere-client-serenity/com.acme.myplugin-2.0.0/plugins/vim25.jar javax.management.RuntimeMBeanException: java.lang.RuntimeException: org.eclipse.virgo.nano.deployer.api.core.DeploymentException: The artifact bundle 'com.vmware.wsvim25' version '6.5.0' in scope 'null' at URI 'file:/C:/ProgramData/VMware/vCenterServer/cfg/vsphere-client/vc-packages/vsphere-client-serenity/com.acme.myplugin-2.0.0/plugins/vim25.jar' cannot be stored in the runtime artifact model as it clashes with the artifact bundle 'com.vmware.wsvim25' version '1.0.0' in scope 'null' which is already present.
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852)
...
[2016-12-15T09:02:13.938+01:00] [INFO ] Connection(13)-111.111.22.22 o.e.v.k.m.i.deployer.ModelInstallArtifactLifecycleListener Processing installing event for bundle 'com.acme.provider' version '2.0.0'
[2016-12-15T09:02:13.948+01:00] [INFO ] Connection(13)-111.111.22.22 org.eclipse.virgo.medic.eventlog.default DE0000I Installing bundle 'com.acme.provider' version '2.0.0'.
[2016-12-15T09:02:13.951+01:00] [INFO ] Connection(13)-111.111.22.22 o.e.virgo.kernel.userregion.internal.quasi.DependencyCalculator Calculating missing dependencies of bundle(s) 'com.acme.provider_2.0.0'
[2016-12-15T09:02:14.122+01:00] [INFO ] Connection(13)-111.111.22.22 org.eclipse.virgo.medic.eventlog.default ME0003I Dump 'C:\PROGRA~1\VMware\VCENTE~1\WEBCLI~1\server\serviceability\dump\2016-12-15-09-02-025' generated
[2016-12-15T09:02:14.2.0.01:00] [ERROR] Connection(13)-111.111.22.22 org.eclipse.virgo.medic.eventlog.default DE0002E Installation of bundle 'com.acme.provider' version '2.0.0' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'com.acme.provider' at version '2.0.0': Cannot resolve: com.acme.provider
Resolver report:
An Import-Package could not be resolved. Resolver error data <Import-Package: com.vmware.vim25; version="[6.0.0,7.0.0)">. Caused by missing constraint in bundle <com.acme.provider_2.0.0>
constraint: <Import-Package: com.vmware.vim25; version="[6.0.0,7.0.0)">
at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:46)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)
We are working on solving this kind of issues when one plugin makes another one fail. In general it is because that other plugin didn't follow our OSGI-Specific Recommendations. See also this post from Vladi: New Feature: OSGi usage validation of plug-ins
The solution of embedding vim25.jar within your own plugin .jar should work.
Putting our own copy of vim25.jar with the server is a little tricky and may not work for everyone.
We are working on solving this kind of issues when one plugin makes another one fail. In general it is because that other plugin didn't follow our OSGI-Specific Recommendations. See also this post from Vladi: New Feature: OSGi usage validation of plug-ins
The solution of embedding vim25.jar within your own plugin .jar should work.
Putting our own copy of vim25.jar with the server is a little tricky and may not work for everyone.
hello laurentsd,
I have the same problem as follow.
[2018-11-29T13:33:08.534Z] [ERROR] plugin-deploy14 com.vmware.vise.extensionfw.impl.PackagesDeployer Error deploying one of more bundles for the plugin package /etc/vmware/vsphere-client/vc-packages/vsphere-client-serenity/com.mypackage org.eclipse.virgo.nano.deployer.api.core.DeploymentException: The artifact bundle 'com.vmware.wsvim25' version '6.5.0' in scope 'null' at URI 'file:/etc/vmware/vsphere-client/vc-packages/vsphere-client-serenity/com.mypackage/plugins/vim25.jar' cannot be stored in the runtime artifact model as it clashes with the artifact bundle 'com.vmware.wsvim25' version '6.5.0.10000' in scope 'null' which is already present.
I see that you've said "The solution of embedding vim25.jar within your own plugin .jar should work.".
Can you teach me how to do this?I don't quite understand.
Many thanks
Hi,
This is the first item in the OSGi-specific recommendations that Laurent mentined above.
Please try that out and let us know how it goes.
Cheers,
Vladi
Hi,
I've tried this.But it is still not worked.
And if I use this,my plugin can't get data from vsphere client.
Do you have any other way to solve this problem?
If you have,please teach me.
Thanks a lot.
Hi,
Yesterday I detailed all the steps of embedding a 3rd party library in this thread: https://code.vmware.com/forums/4974#602301|4474020
Please try it out and see if this works for you.
Cheers,
Vladi
Hi Vladi,
I deal with the conflicts of vim25 between plug-ins in this way,but there is another problem.
My plug-in can't work normally and can't get the data.
There is an exception reported as follow.
Exception
Root Cause
Root Cause
Root Cause
My plugin's manifest.mf is set as follow. I‘v deleted the vim25.jar from the plugin package and copy the vim25.jar inside my plugin's service.jar, I put it in the lib forder.
Can you teach me how to deal with this exception?
Thank a lot.