Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Infra-vmware connector]Eclipse dependencies problem with MartServer and the vmware connector #187

Closed
cgourdin opened this issue Jan 24, 2017 · 3 comments

Comments

@cgourdin
Copy link
Member

Following the last update of MartServer on git and clean up dependencies, the connector use eclipse ui lib for dialog box.
The connector itself throw an exception when using it with MartServer :
2017-01-24 15:05:04.503 INFO Added Resource 8dd7a35c-165a-4be6-97be-f88f75aeb406 to configuration object.
2017-01-24 15:05:04.514 WARN
javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: org/eclipse/ui/PlatformUI

To resolve this add eclipse library to connector when building his jar:

org.eclipse.jface
databinding
1.1.0-I20070606-0010
compile


org.eclipse.ui
ide
3.3.0-I20070620
compile


org.eclipse.swt
org.eclipse.swt.gtk.linux.x86
4.3
compile

@philippemerle
Copy link
Member

A connector must NOT do UI stuff.
UI stuff must be done in the associated designer.
So dependencies to Eclipse UI libraries must NOT be added to a connector jar.
This is not specific to VMware connector, this is true for ANY connector.

@philippemerle
Copy link
Member

If the implementation of the connector requires Eclipse UI stuff (this is not the best thing to do) then the code of the connector must be carefully programmed to work also when Eclipse UI is not present (aka in MartServer).
So connector code like:
org.eclipse.ui.PlatformUI ui = ....
... do something with ui ...
must be written in the following style:
try {
org.eclipse.ui.PlatformUI ui = ....
... do something with ui ...
} catch(ClassNotFoundException cnfe) {
// do nothing because this code runs outsides Eclipse UI.
}

@cgourdin
Copy link
Member Author

I'm agree with you, the connector must not manage ui stuff. Cloud designer is done to manage ui, it may be a new feature of cloud designer to manage progress bar, dialog box and other ui stuffs.

I'm agree with you with the other solution, it's not the best thing to do, because it's like doing a try catch on a null pointer...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants