VMware {code} Community
chellyyyy
Contributor
Contributor
Jump to solution

conflicts caused by vim25.jar when registering a plugin

I have my plugin registered to vCenter client,but I have some questions about vim25.jar.

I declare com.vmware.vim25 and com.google.gson as import-package in the MANIFEST.MF of myService.jar.

manifest.png

The two jars are alse declared In the plugin-package.xml as followed, and we put them into the /plugins directory.

        <bundlesOrder>

           <!-- List the jar bundles from the /plugins directory in loading order:

              3rd party libraries first then your java service bundles. UI war bundles

              are not needed here, they will be loaded automatically after the jars.

              Bundle Ids must match the Bundle-SymbolicName in each plugin's MANIFEST.MF

           -->

           <bundle id="com.vmware.wsvim25" />

           <bundle id="com.google.gson" />

           <bundle id="myService" />

        </bundlesOrder>

Even though I don't konw why the two jars are specially declared here and how they work, I just do that as my former developers did.

Then a problem has come to me. When another plugin is installed, it conflcts with mine. I found that vim25.jar in the /plugins directory is the cause.

I tried the solution in OSGi-specific recommendations​. I edited the MANIFEST.MF of myService.jar as followed.

manifest-edit.png

Then I removed the jar both from the plugin-package.xml and the /plugins directory.

My plugin can be registered successfully, but when the program uses vim25.jar, some Exception comes out.

The Excetion report is attached. It seems that vim25.jar cannot be found.

Could anyone tell me how to deal with this? Thank a lot.

Reply
0 Kudos
1 Solution

Accepted Solutions
Denis_Chorbadzh
VMware Employee
VMware Employee
Jump to solution

Hi,

 

Looking at the provided snippet, it seems ok.

What I can see as a potential problem is "Bundle-ClassPath: ., lib/vim25.jar". Please make sure that you have placed the vim25.jar at the root level of your service bundle and use this "Bundle-Classpath: .,vim25.jar"

 

Best Regards,

Denis

View solution in original post

Reply
0 Kudos
1 Reply
Denis_Chorbadzh
VMware Employee
VMware Employee
Jump to solution

Hi,

 

Looking at the provided snippet, it seems ok.

What I can see as a potential problem is "Bundle-ClassPath: ., lib/vim25.jar". Please make sure that you have placed the vim25.jar at the root level of your service bundle and use this "Bundle-Classpath: .,vim25.jar"

 

Best Regards,

Denis

Reply
0 Kudos