Universal Robots Forum

Error adding dependency org.eclipse.swt in URCap

Hi everyone,
I am trying to add the Software Toolkit Package as a dependency to my URCap in my pom file. I am adding the following:



It compiles without errors, and seems to recognize the dependency. However, at run time when I try to instantiate an object of e.g. org.eclipse.swt.widgets.Shell, I get an error stating:

ERROR [Thread-1] 14:54:33 03/07/18: Error starting bundle.
org.osgi.framework.BundleException: Unable to resolve com.test.base [109](R 109.0): missing requirement 
[com.test.base [109](R 109.0)] osgi.wiring.package; (osgi.wiring.package=org.eclipse.swt.widgets) Unresolved 
requirements: [[com.test.base [109](R 109.0)] osgi.wiring.package; (osgi.wiring.package=org.eclipse.swt.widgets)]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4114)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2111)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:964)
at com.ur.view.polyscope.module.ContributionBinding.startURCapBundles(ContributionBinding.java:52)
at com.ur.view.polyscope.module.ContributionBinding.initialize(ContributionBinding.java:23)
at com.ur.view.polyscope.module.ContributionBinding.registerContributions(ContributionBinding.java:102)
at gui.main.URGUI.bindServices(URGUI.java:471)
at gui.main.URGUI.bindServices(URGUI.java:414)
at gui.main.URGUI.run(URGUI.java:246)

Jul 03, 2018 2:54:33 PM com.steadystate.css.parser.CSSOMParser <init>
WARNING: java.lang.ClassNotFoundException: com.steadystate.css.parser.SACParserCSS21 not found by org.w3c.css.sac [31]
Jul 03, 2018 2:54:33 PM com.steadystate.css.parser.CSSOMParser <init>
WARNING: using the default 'SACParserCSS21' instead

I can’t seem to find other in here with the same problem. Does anyone have any clue as to what might be wrong?

My system specs:
Ubuntu 16.04, 64 bit
URCaps sdk-1.3.55
UR Offline Simulator - ursim-
Java: java-8-openjdk-amd64

Thanks in advance.
Best Regards, Thomas

1 Like

You might have to add the package to the folder system of Eclipse. Home -> eclipse -> plugins

Thanks for the reply. Unfortunately that didn’t seem to work, but as I am building my URCap from a terminal with ‘mvn install -P ursim’, I wouldn’t suspect maven to look in my Eclipse folder for plugins.

It did however work to embed the dependency into the plugin by:


I am not exactly sure why though, and the documentation does not seem to offer any help here (or at least I can’t find it).

How did you do that? This is what I am trying to do all day with sqlite, but the amount of beaurocracy involved is enormous.

Did you edit pom.xml directly and just added <EmbedDependency>org.eclipse.swt*</EmbedDependency> under <instructions>?

Almost, I added <Embed-Dependency>org.eclipse.swt*</Embed-Dependency> under instructions - which for some reason isn’t shown in my earlier post (because I didn’t have an escape character in front, aha)

You need to add ticks - ` around it. It will show as code.

Yep, just figured it out :smile:

OMG, I missed - between the words in <Embed-Dependency>. (╯°□°)╯︵ ┻━┻