Open Source VI Java API 5.0.1 Released

While preparing this annoucement, I realize that on the same day last year we had a very successful community event with several techtalks to celebrate the 3 year of vijava open source project. Today it’s the 4th year of this project!

Since VI Java API 5.0 GAed last October, there have been some changes, one of which is that I left VMware and joined VCE the same month. On the project side, there are several new bugs opened with the forum. These bugs do not affect most developers. But still I fixed them quickly in the code repository so that anyone who was affected could get the fixes from there.

Lost VMs or Containers? Too Many Consoles? Too Slow GUI? Time to learn how to "Google" and manage your VMware and clouds in a fast and secure HTML5 App.

As the fixes accumulate, I thought it’s a good idea to push out a minor release. Therefore I called for new bugs in March with my tweets. Surprisingly, I haven’t seen any coming up after that. That doesn’t mean that vijava API is perfect now, but that vijava is quite stable given our large developer/administrator community.

Anyway, here is a list of the bug fixes getting in 5.0.1 release and short description of the solutions.

  • 3499323 WSClient fails to parse float in StorageMigrationAction
    Solution: add the code to parse float which is an easy fix with clean code structure of vijava engine.
  • 3497202 StorageResourceManager constructor missing
    Solution: add the contructor code. This is the simplest fix.
  • 3496063 XmlGen.getVimClass(…) is not thread safe
    Solution: change the HashMap for classes to the thread safe equivalent.
  • 3461462 ScheduledTask Clone – The root cause is the serialization of ManagedObjectReference object is not correct.
    Solution: add xsi:type attribute to the XML entity.

If your application works fine with previous release, you don’t need to upgrade to this 5.0.1. If you upgrade, you do need to change your product notice to include one more line of copyright by me. For details, just check out the License.txt. The BSD license for vijava API remains the same as before. To download, click here.

This entry was posted in vSphere API and tagged . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

21 Comments

  1. Shobhit Gupta
    Posted May 22, 2012 at 2:59 pm | Permalink

    Hi Steve,

    The vijava jar files that you release do not have source within them. Do you export a separate version that has source bundled (at them time of release)?

    regards,
    Shobhit

  2. Posted May 22, 2012 at 5:40 pm | Permalink

    There are two different files – one binary with *.zip extension, the other source with *.jar extension. Please go get the latter one.

    Steve

  3. Kenny Qiao
    Posted May 22, 2012 at 6:48 pm | Permalink

    Hi Steve,
    I’m not sure it is OK to raise my question here for a bug I found with VI Java API 5.0. I already filed a bug on vijava bugzilla:
    http://sourceforge.net/tracker/?func=detail&aid=3528779&group_id=228007&atid=1073396

    SearchDatastore.java failed with exception: InvalidRequest – ID: 3528779

    Run sample code SearchDatastore.java and throwed the following exception:
    Exception in thread “main” com.vmware.vim25.InvalidRequest
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
    at java.lang.Class.newInstance0(Class.java:372)
    at java.lang.Class.newInstance(Class.java:325)
    at com.vmware.vim25.ws.XmlGen.fromXml(XmlGen.java:201)
    at com.vmware.vim25.ws.XmlGen.parseSoapFault(XmlGen.java:80)
    at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:133)
    at com.vmware.vim25.ws.VimStub.searchDatastoreSubFolders_Task(VimStub.java:2602)
    at com.vmware.vim25.mo.HostDatastoreBrowser.searchDatastoreSubFolders_Task(HostDatastoreBrowser.java:81)
    at com.vmware.vim25.mo.samples.storage.SearchDatastore.main(SearchDatastore.java:117)

    Since I already write some code to verify this and found that HostDatastoreBrowser.searchDatastoreSubFolders_Task always throws the same exception.

    Your comments?

    Thanks.

  4. Posted May 22, 2012 at 6:52 pm | Permalink

    Hi Kenny,
    Thanks for reporting the bug! The InvalidRequest exception means the application does not pass the expected argument, therefore fails the method call. You may want to double check your application code. Please let me know of any update.
    Steve

  5. Kenny Qiao
    Posted May 22, 2012 at 7:20 pm | Permalink

    @Steve Jin
    Thanks for your quick response.

    I only changed the following part of sample java code: SearchDatastore.java

    String hostname = “my.domain.com”;
    String datastorePath = “[ds-1_LUN34]”;

    This part is hardcoded in SearchDatasotre.java and I changed it according to my setup. Then I met that problem.

  6. Posted May 22, 2012 at 8:07 pm | Permalink

    Hi Kenny,
    There are two arguments to the searchDatastoreSubFolders_Task() method. You may want to double check what you passed in against what is required in the API reference. You can also check server side log to see if there is any additional hints.
    Good luck!
    Steve

  7. Kenny Qiao
    Posted May 22, 2012 at 8:51 pm | Permalink

    @Steve Jin
    Thanks for your reply. I will double check this. If sample code src/com/vmware/vim25.mo/samples/storage/SearchDatastore.java in 5.0 release works for you, it should works for me by just changing hostname and datastorePath.
    Anyway, I will do some debugging and see what happened.

    -Kenny

  8. don
    Posted May 23, 2012 at 2:01 pm | Permalink

    Hi Steve
    Just wondering if there is any incremental update to the automatic code generator that coincides with this vijava release? In particular with respect to python and/or ruby support?
    Thanks
    Don

  9. Posted May 23, 2012 at 11:04 pm | Permalink

    This release is really bug fixes. The underlying interfaces have not changed at all.

    Steve

  10. Daniel Linsley
    Posted May 24, 2012 at 4:07 pm | Permalink

    Thanks Steve! The fixes for issues 3499323 and 3497202 allowed me to add Storage DRS support to HP Operations Orchestration Content Pack 8!

  11. Posted May 24, 2012 at 5:43 pm | Permalink

    Great to hear that Dan!
    Steve

  12. Xiaofeng Lin
    Posted May 30, 2012 at 4:03 pm | Permalink

    Has the new vijava 5.0.1 release been pushed to a public maven repository anywhere?

  13. Posted May 30, 2012 at 7:00 pm | Permalink

    Good question. Not yet.
    Steve

  14. Xiaofeng Lin
    Posted May 31, 2012 at 12:10 pm | Permalink

    @Steve Jin
    Do you plan to publish it? I think it’s better for the project owner to publish it. When I search the web, I’ve got this for 5.0.0, “http://mvnrepository.com/artifact/com.cloudbees.thirdparty/vijava/5.0.0”. It looks strange that the package name belongs to some thirdparty company.

  15. Posted May 31, 2012 at 1:25 pm | Permalink

    Thanks for the information. I think I should do that. Cloudbee propably uses vijava in their project.

    Steve

  16. Mike Matczynski
    Posted June 15, 2012 at 2:21 pm | Permalink

    Cloudbee only has vijava 5.0.0 in their Maven repo

  17. Marty
    Posted June 28, 2012 at 12:15 pm | Permalink

    Steve,
    I am working on someone else’s Java code for reading MOB information. I have tried your library but ran into a difference between your library and the one that is on the VMware site. Your library does not support serialization of the objects, which turns out, is important to us. Needless to say, it allows us to grab data from a customer site and use that data to debug any errors we see on the customer site that we can’t reproduce with any of our servers. Unfortunately, the vim25.jar file from VMware does not include the mo package, and, unfortunately, your library has serialization stripped out. Is there a version with serialization or can you point me somewhere to find the mo package with serialization enabled? Any help would be greatly appreciated.

    Thanks,
    Marty

  18. Posted June 28, 2012 at 12:33 pm | Permalink

    Hi Marty,
    Thansk for the feedback. Can you file feature request in the vijava.sf.net project tracker? Let’s track it from there.
    Steve

  19. Marty
    Posted June 28, 2012 at 5:59 pm | Permalink

    Done, thanks.

  20. Julia
    Posted September 11, 2012 at 2:44 am | Permalink

    Hi Steve Jin,
    I have a look at your book.In charpter performance monitoring,I know that the PerfMetricId is the instance of counterId in the server.But I search that there is no PerfMetric info about Memory in my ESXi server.So I new a PerfMetric,”new PerfMetric(null,null,5,true)”.It also works.So I want to know why we need to check the corresponding instance Metric of the counter.Your code and sdk code both need get Metric throught counter,but I test,it return size is 0.So the PerfQuerySpec.setMetric() set the default metric.so the program return data about all the instance.My English is poor.my description maybe unclear.Please do me a favor,thanks!

  21. Julia
    Posted September 13, 2012 at 12:45 am | Permalink

    Hi Steven Jin,
    I have figure out the difference.”new PerfMetric(null,null,5,true)”just point to one instance that is not definited.Also thanks you for your book.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  • NEED HELP?


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__ doublecloud.org.

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.