VMware

This Question is Not Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
0 Replies Last post: Oct 21, 2009 2:01 PM by bleschber  

Incompatible Class Change Error posted: Oct 21, 2009 2:01 PM

Click to view bleschber's profile Lurker 1 posts since
Feb 18, 2008

Following the example included with the SDK, I wrote an app to try and connect to VMWare, but I'm getting an error message telling me that I have an Incompatible Class Change Error:

Exception in thread "AWT-EventQueue-0" java.lang.IncompatibleClassChangeError: Expected non-static field com.vmware.ws.service.BaseServiceStub._service
at com.vmware.ws.service.BaseServiceStub.<init>(BaseServiceStub.java:119)
at com.vmware.ws.service.BaseServiceStub.<init>(BaseServiceStub.java:108)
at com.vmware.ws.service.BaseServiceStub.<init>(BaseServiceStub.java:159)
at com.vmware.contrib.vi.Connection.<init>(Connection.java:78)

And it has a few more listed. Here is the block of code:

import com.vmware.contrib.vi.Connection;

String uname = jTextField1.getText();
String pass = jTextField2.getText();
String server = jTextField3.getText();
String protocol = jTextField4.getText();

Connection.Parameters config = new Connection.Parameters(
Connection.Protocol.http, server, null, uname, pass, null);

try{


Connection con = new Connection(config);

}catch(com.vmware.vi.fault.InvalidLogin e)
{

}catch(com.vmware.vi.fault.InvalidLocale f)
{

}

And it's the line Connection con = new Connection(config) which causes the problem. Debugging, I found that everything else works fine and I get legit login information (server, protocol, etc.) Once it gets to that line, it causes the error.

Anyone have a clue why I'm getting the error and/or what "com.vmware.ws.service.BaseServiceStub._service" is?

Thanks!

Developer Social Media

Communities