VMware {code} Community
pankajchhabra
Enthusiast
Enthusiast

Compiler Error While running the vspherewssdk sample

Hello,

I am getting error running when Importing the sample. I have copied vim25.jar to vsphere-client-sdk\server\repository\usr directory.

Error.png

On deploying to the server, the error is -

[2015-10-15T22:50:54.939+05:30] [ERROR]  TCP Connection(5)-127.0.0.1  <DE0002E> Installation of bundle 'com.vmware.samples.vspherewssdk-service' version '1.0.0' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'com.vmware.samples.vspherewssdk-service' at version '1.0.0': Cannot resolve: com.vmware.samples.vspherewssdk-service

    Resolver report:

        An Import-Package could not be resolved. Resolver error data <Import-Package: com.vmware.vim25; version="0.0.0">. Caused by missing constraint in bundle <com.vmware.samples.vspherewssdk-service_1.0.0>

             constraint: <Import-Package: com.vmware.vim25; version="0.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)

  at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessGraph(CompensatingPipeline.java:73)

  at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)

  at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)

  at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)

  at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:359)

  at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:185)

  at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:140)

  at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:253)

  at org.eclipse.virgo.kernel.deployer.management.StandardDeployer.deploy(StandardDeployer.java:52)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  at java.lang.reflect.Method.invoke(Unknown Source)

  at sun.reflect.misc.Trampoline.invoke(Unknown Source)

  at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  at java.lang.reflect.Method.invoke(Unknown Source)

  at sun.reflect.misc.MethodUtil.invoke(Unknown Source)

  at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source)

  at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source)

  at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source)

  at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source)

  at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(Unknown Source)

  at com.sun.jmx.mbeanserver.PerInterface.invoke(Unknown Source)

  at com.sun.jmx.mbeanserver.MBeanSupport.invoke(Unknown Source)

  at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)

  at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)

  at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)

  at javax.management.remote.rmi.RMIConnectionImpl.access$300(Unknown Source)

  at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)

  at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)

  at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  at java.lang.reflect.Method.invoke(Unknown Source)

  at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)

  at sun.rmi.transport.Transport$2.run(Unknown Source)

  at sun.rmi.transport.Transport$2.run(Unknown Source)

  at java.security.AccessController.doPrivileged(Native Method)

  at sun.rmi.transport.Transport.serviceCall(Unknown Source)

  at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)

  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)

  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.access$400(Unknown Source)

  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(Unknown Source)

  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(Unknown Source)

  at java.security.AccessController.doPrivileged(Native Method)

  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)

  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

  at java.lang.Thread.run(Unknown Source)

[2015-10-15T22:50:54.941+05:30] [ERROR]  TCP Connection(5)-127.0.0.1  <DE0003E> Install failed for bundle 'com.vmware.samples.vspherewssdk-service' version '1.0.0'.

[2015-10-15T22:50:54.942+05:30] [ERROR]  TCP Connection(5)-127.0.0.1  <DE0500E> Unable to install application from URI 'file:/C:/sdk/VWS-6U1/vsphere-client-sdk/server/stage/vsphere-wssdk-service.jar'. Cannot satisfy constraints for bundle 'com.vmware.samples.vspherewssdk-service' version '1.0.0'. Cannot resolve: com.vmware.samples.vspherewssdk-service

    Resolver report:

        An Import-Package could not be resolved. Resolver error data <Import-Package: com.vmware.vim25; version="0.0.0">. Caused by missing constraint in bundle <com.vmware.samples.vspherewssdk-service_1.0.0>

             constraint: <Import-Package: com.vmware.vim25; version="0.0.0">

. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'com.vmware.samples.vspherewssdk-service' at version '1.0.0': Cannot resolve: com.vmware.samples.vspherewssdk-service

    Resolver report:

        An Import-Package could not be resolved. Resolver error data <Import-Package: com.vmware.vim25; version="0.0.0">. Caused by missing constraint in bundle <com.vmware.samples.vspherewssdk-service_1.0.0>

             constraint: <Import-Package: com.vmware.vim25; version="0.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)

  at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessGraph(CompensatingPipeline.java:73)

  at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)

  at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)

  at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)

  at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:359)

  at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:185)

  at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:140)

  at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:253)

  at org.eclipse.virgo.kernel.deployer.management.StandardDeployer.deploy(StandardDeployer.java:52)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  at java.lang.reflect.Method.invoke(Unknown Source)

  at sun.reflect.misc.Trampoline.invoke(Unknown Source)

  at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  at java.lang.reflect.Method.invoke(Unknown Source)

  at sun.reflect.misc.MethodUtil.invoke(Unknown Source)

  at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source)

  at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source)

  at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source)

  at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source)

  at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(Unknown Source)

  at com.sun.jmx.mbeanserver.PerInterface.invoke(Unknown Source)

  at com.sun.jmx.mbeanserver.MBeanSupport.invoke(Unknown Source)

  at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)

  at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)

  at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)

  at javax.management.remote.rmi.RMIConnectionImpl.access$300(Unknown Source)

  at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)

  at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)

  at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  at java.lang.reflect.Method.invoke(Unknown Source)

  at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)

  at sun.rmi.transport.Transport$2.run(Unknown Source)

  at sun.rmi.transport.Transport$2.run(Unknown Source)

  at java.security.AccessController.doPrivileged(Native Method)

  at sun.rmi.transport.Transport.serviceCall(Unknown Source)

  at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)

  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)

  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.access$400(Unknown Source)

  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(Unknown Source)

  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(Unknown Source)

  at java.security.AccessController.doPrivileged(Native Method)

  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)

  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

  at java.lang.Thread.run(Unknown Source)

[2015-10-15T22:50:54.962+05:30] [INFO ]  TCP Connection(5)-127.0.0.1  <ME0003I> Dump 'serviceability\dump\2015-10-15-22-50-961' generated

Please let me know how to resolve this error.

Thanks,

Pankaj

Tags (1)
4 Replies
pankajchhabra
Enthusiast
Enthusiast

Forgot to mention the environment -

1. vSphere Web SDK 6.0 Update 1

2. vCenter Server is vCenter 6.0 Update 1 running on Windows Server 2012

3. JDK 1.7.0_79 64 bit

4. Adobe Flash Builder 64 bit

5. OS is Windows 7 64 bit

Plugin is HTML vspherewssdk HTML sample and the error in the post is when I import it. On adding to Virgo, I get the exception log which I have pasted in question.

I am able to run all other HTML samples.

Reply
0 Kudos
MrIndia
VMware Employee
VMware Employee

Pankaj,

The FAQ  section in SDK documentation have trouble shooting steps for this kind of issues...Please refer following in vsphere-client-sdk/docs/FAQ.html

----------------------------------------------------------------

5. Building and running a Java service plugin

Bundle installation fails because "An Import-Package could not be resolved"file:///E:/NGC/vimclients-public-sdk-6.0.0.2559419/vsphere-client-sdk/docs/FAQ.html#top

This means that Virgo cannot find any installed bundle exporting the missing package:

  • Either the bundle manifest's Import-Packages metadata is wrong (but this is unlikely if you used a tool like bundlor to generate it),
  • Or the missing package is in a library which itself don't contain correct OSGI metadata (see how to package a library as an OSGI bundle),
  • Or simply that the bundle exporting the package in question is not deployed yet! Check the bundle status list in the Virgo editor. Select the bundle and verify its list of exported packages.
  • If you checked the previous points and the deployment error persists try to delete your server/work directory where bundles are cached and restart the server.

The following error can also happen for UI bundles (Flex or HTML plugins):

An Import-Package could not be resolved. Resolver error data <Import-Package: com.vmware.samples.ngviews; version="0.0.0">. Caused by missing constraint in bundle <com.vmware.samples.ngviews_1.0.0> constraint: <Import-Package: com.vmware.samples.ngviews; version="0.0.0"> 

version="0.0.0" is usually a sign that MANIFEST.MF is missing (you can check in the server/stage directory). You should "clean" the project in Eclipse/STS, redeploy and verify that a correct MANIFEST.MF is included.


--------------------------------------------


Also if you are not able to resolve issue, please provide MANIFEST.MF



pankajchhabra
Enthusiast
Enthusiast

Hello,

I am getting the Import error on vspherewssdk-service.

Following did not fix the issue -

1. Clean up project

2. vim25.jar was already copied.

Following fixed the error

1. Copied the vim25.jar from VSphere Web SDK 5.5 Update 1 vsphereviews\vsphere-wssdk-provider\lib directory

Still I was getting error on the HTML project vsphere-wssdk-html.

here is it got fixed for me -

1. Imported the project vsphere-wssdk-html from vSphere Web SDK 5.5 Update 1.

I will check the differences between the vSphere Web SDK 5.5 Update 1 and vSphere Web SDK 6.0 Update 1 vsphere-wssdk-html project later. For now it is working with vSphere Web SDK 5.5 Update 1.

Thanks,

Pankaj

Reply
0 Kudos
Peter_Ivanov
VMware Employee
VMware Employee

Hi Pankaj,

The problem is that vim25.jar in 6.0 Update 1 SDK has broken MANIFEST.MF file. The workaround is to get the file from 6.0 (or previous version).

This has been noted in the release notes. Sorry for the inconvenience.

~Peter

Reply
0 Kudos