Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] RCP launch fails with NoClassDefFoundError for "org/eclipse/swt/SWTError"

Jan, Tycho Users -

Yeah!  After a few tweaks, I was able to get my application to launch without obvious errors.

A followup to close the loop for other tycho users.

I think the <environment> and <launcherArgs> in the .target file were installed by the Eclipse Target editor.  I deleted these elements, with no affect on the build.  It didn't hurt, but neither did it help with the NoClassDefFoundError for  SWTError.

It took me a while to find the "validate" button on the Product Configuration (PC) editor.  It is an icon in the upper right corner that resembles a text file with an overlayed check mark.  Once I got a clue regarding which components were missing, there were still some dots to connect.

The one helpful step was using the PC editor's Add Required button.  This seems to pull in the transitive closure of included features.  Although the editor page suggests that "Nested features need not be listed", listing the entire transitive tree of features seemed to be essential.

For each missing plugin reported by the PC editor's validate report indicated a missing plugin, I used the Feature Manifest editor to add an org.eclipse feature to my bundling feature (...platform).  I wound up "including" the following org.eclipse features in my platform feature:

org.eclipse.e4.rcp
org.eclipse.emf.common
org.eclipse.emf.ecore
org.eclipse.rcp

This seems like the right minimal set, but the I'd love to see a concise list and explanation of the minimal set of RCP plugins, fragments, and features.  Once these were "included" in my platform feature, the PC editor's Add Required button added everything to the product's dependency list (i.e. <feature> element in the .product file).

After rebuilding with these changes (minor .target fixes, adding 4 org.eclipse features to both the platform feature and the product definition), I was able to launch the application!!!!  All the nice Eclipse workspace and navigator features seem to be operating successfully.

Next up:  Adding the other analysis features and getting the JOGL libraries/DLLs to work in the application.

Thanks for your help
- Lee


On Mon, Oct 12, 2015 at 1:30 AM, Sievers, Jan <jan.sievers@xxxxxxx> wrote:
your target file looks a bit strange to me

I would not expect <environment> and <launcherArgs> elements in there.

more importantly, the product only includes a feature

https://github.com/google/depan/blob/scratch/mavenize/depan-platform-featur
e/feature.xml


which requires eclipse.org features (instead of *including* them). Looks
like most eclipse.org features are missing from your product install, i.e.
it seems your product is not self-contained (the product editor has a
button "validate" for this).
IIRC anything that should go into a product must be (transitively)
included (in technical p2 terms, that is required with a perfect version
match)

Regards,
Jan

On 12/10/15 10:06, "tycho-user-bounces@xxxxxxxxxxx on behalf of Lee
Carver" <tycho-user-bounces@xxxxxxxxxxx on behalf of leeca@xxxxxxxxxxx>
wrote:

>Tycho Folks -
>
>
>I am trying to build a RCP Application using the Maven/Tycho tool chain.
>I've knit together all my components with a set of Maven projects.  The
>POMs do create a .zip file with nearly all the pieces necessary to run my
>project
> as a stand alone application.  However, the platform specific SWT
>library is not getting added to the zip file.  Once the splash screen
>clears, the application fails with a NoClassDefFoundError for
>"org/eclipse/swt/SWTError".
>
>
>The really curious part is that "-Dtycho.debug.resolver=true" output
>shows that org.eclipse.swt.win32.win32.x86_64 3.103.2.v20150203-1351 is a
>Resovled IU (output below).  Most oddly, it is the last resolved IU in
>the list and
> it is not present in the product's .zip file.  Manually adding the
>platform specific SWT fragment to the plugins/ directory doesn't seem to
>help.  I still get the NoClassDefFoundError starting the application.
>
>
>I'm using the following PDE .target file to identify the luna release,
>the core RCP features, and a product environment:
>
>
><?xml version="1.0" encoding="UTF-8" standalone="no"?>
><?pde version="3.8"?><target name="DepAn RCP Target" sequenceNumber="0">
><locations>
><location includeAllPlatforms="false" includeConfigurePhase="true"
>includeMode="planner" includeSource="true" type="InstallableUnit">
><unit id="org.eclipse.equinox.executable.feature.group"
>version="3.6.102.v20150204-1316"/>
><unit id="org.eclipse.equinox.p2.user.ui.feature.group"
>version="2.2.0.v20150129-0838"/>
><unit id="org.eclipse.jdt.source.feature.group"
>version="3.10.1.v20150204-1700"/>
><unit id="org.eclipse.rcp.sdk.id <http://org.eclipse.rcp.sdk.id/>"
>version="4.4.2.M20150204-1700"/>
><repository location="http://download.eclipse.org/releases/luna"/>
></location>
></locations>
><environment>
><os>win32</os>
><ws>win32</ws>
><arch>x86_64</arch>
><nl>en_US</nl>
></environment>
><launcherArgs>
><vmArgs>-Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx512m</vmArgs>
></launcherArgs>
></target>
>
>
>The POM parent project configures the build target with a
>target-platform-configuration section as follows:
>
>
>      <plugin>
>        <groupId>org.eclipse.tycho</groupId>
>        <artifactId>target-platform-configuration</artifactId>
>        <version>${tycho.version}</version>
>        <configuration>
>
>
>          <environments>
>            <environment>
>              <os>win32</os>
>              <ws>win32</ws>
>              <arch>x86_64</arch>
>            </environment>
>          </environments>
>
>
>          <target>
>            <artifact>
>              <groupId>com.pnambic.depan</groupId>
>              <artifactId>depan-luna-target</artifactId>
>              <version>1.0.0-luna</version>
>            </artifact>
>          </target>
>        </configuration>
>
>
>
>
>My build environment is Windows 7 Pro, using Cygwin, Java 1.7, and Maven
>3.2.3, and Tycho 0.23.1.
>
>
>Although the complete RCP application is fairly large, for this initial
>experiment involves just two application plugins.  These are bundled as a
>feature, and this feature feeds into the product build.
>
>
>Complete details are available on github in branch "scratch/mavenize" of
>project  github.com:google/depan.git.  It should be possible to recreate
>my experience by downloading this branch and running Tools/buildDepan.sh
>script.
>
>
>Any insight on ensuring the platforms SWT is bundled will be appreciated.
>
>
>Thanks
>- Lee
>
>
>-------------------
>Partial output from
>
>
> mvn -Dtycho.debug.resolver=true -X -f depan-win64-release
>
>
>
>
>
>[DEBUG] Resolved IUs:
>  com.google.devtools.depan 0.0.8.201510110322
>  org.eclipse.core.runtime 3.10.0.v20140318-2214
>  org.eclipse.ui 3.106.1.v20141002-1150
>  org.eclipse.core.resources 3.9.1.v20140825-1431
>  org.eclipse.ui.ide 3.10.2.v20141118-1227
>  org.eclipse.ui.views 3.7.0.v20140408-0703
>  org.eclipse.jface.text 3.9.2.v20141003-1326
>  org.eclipse.ui.navigator.resources 3.4.700.v20140407-1004
>  org.eclipse.ui.navigator 3.5.401.v20140724-1117
>  org.eclipse.ui.editors 3.8.200.v20140401-1310
>  org.eclipse.ui.workbench.texteditor 3.9.0.v20140411-1521
>  com.google.devtools.depan.core 1.0.5.201510110322
>  com.google.guava 18.0.0
>  depan-jogl-library 0.0.1.SNAPSHOT
>  depan-jung-library 0.0.1.SNAPSHOT
>  depan-xstream-library 0.0.1.SNAPSHOT
>  joda-time 2.5.0
>  com.pnambic.depan.platform.feature.group 1.0.0.201510110322
>  com.pnambic.depan.platform.feature.jar 1.0.0.201510110322
>  com.pnambic.depan.win64.feature.feature.group 1.0.0.201510110322
>  com.pnambic.depan.win64.feature.feature.jar 1.0.0.201510110322
>  com.pnambic.depan.win64.release 1.0.0.qualifier
>  org.eclipse.equinox.executable.feature.group 3.6.102.v20150204-1316
>  config.a.jre.javase 1.7.0
>  a.jre.javase 1.7.0
>  javax.annotation 1.2.0.v201401042248
>  javax.xml 1.3.4.v201005080400
>  org.eclipse.osgi 3.10.2.v20150203-1939
>  org.apache.batik.css 1.7.0.v201011041433
>  org.apache.batik.util 1.7.0.v201011041433
>  org.w3c.dom.events 3.0.0.draft20060413_v201105210656
>  org.w3c.css.sac 1.3.1.v200903091627
>  org.w3c.dom.svg 1.1.0.v201011041433
>  org.apache.batik.util.gui 1.7.0.v200903091627
>  org.eclipse.osgi.services 3.4.0.v20140312-2051
>  org.eclipse.compare 3.5.501.v20140817-1445
>  org.eclipse.core.expressions 3.4.600.v20140128-0851
>  org.eclipse.ui.forms 3.6.100.v20140422-1825
>  org.eclipse.compare.core 3.5.400.v20130903-0736
>  com.ibm.icu 52.1.1.v201501240615
>  org.eclipse.core.commands 3.6.100.v20140528-1422
>  org.eclipse.equinox.common 3.6.200.v20130402-1505
>  org.eclipse.core.contenttype 3.4.200.v20140207-1251
>  org.eclipse.equinox.preferences 3.5.200.v20140224-1527
>  org.eclipse.equinox.registry 3.5.400.v20140428-1507
>  org.eclipse.core.databinding 1.4.2.v20140729-1044
>  org.eclipse.core.databinding.observable 1.4.1.v20140210-1835
>  org.eclipse.core.databinding.property 1.4.200.v20140214-0004
>  org.eclipse.core.filebuffers 3.5.400.v20140127-1516
>  org.eclipse.text 3.5.300.v20130515-1451
>  org.eclipse.core.filesystem 1.4.100.v20140514-1614
org.eclipse.core.jobs <http://org.eclipse.core.jobs/>
>3.6.1.v20141014-1248
>  org.eclipse.equinox.app 1.3.200.v20130910-1609
>  org.eclipse.e4.core.commands 0.10.2.v20140424-2344
>  org.eclipse.e4.core.di 1.4.0.v20140414-1837
>  javax.inject 1.0.0.v20091030
>  org.eclipse.e4.core.contexts 1.3.100.v20140407-1019
>  org.eclipse.e4.core.services 1.2.1.v20140808-1251
>  org.eclipse.e4.core.di.extensions 0.12.0.v20140417-2033
>  org.eclipse.e4.ui.bindings 0.10.200.v20140424-2042
>  org.eclipse.swt 3.103.2.v20150203-1313
>  org.eclipse.jface 3.10.2.v20141021-1035
>  org.eclipse.e4.ui.css.core 0.10.100.v20140424-2042
>  org.eclipse.e4.ui.css.swt 0.11.101.v20140818-1343
>  org.eclipse.e4.ui.css.swt.theme 0.9.300.v20141126-1957
>  org.eclipse.e4.ui.di 1.0.0.v20140328-2112
>  org.eclipse.e4.ui.model.workbench 1.1.0.v20140512-1820
>  org.eclipse.emf.ecore 2.10.2.v20150123-0348
>  org.eclipse.e4.ui.services 1.1.0.v20140328-1925
>  org.eclipse.e4.ui.widgets 1.0.0.v20140514-1823
>  org.eclipse.e4.ui.workbench 1.2.2.v20141212-1259
>  org.eclipse.emf.ecore.change 2.10.0.v20150123-0348
>  org.eclipse.emf.ecore.xmi 2.10.2.v20150123-0348
>  org.eclipse.e4.ui.workbench.addons.swt 1.1.2.v20141126-1310
>  org.eclipse.e4.ui.workbench.renderers.swt 0.12.2.v20150204-1353
>  org.eclipse.e4.ui.workbench.swt 0.12.100.v20141126-1150
>  org.eclipse.jface.databinding 1.6.200.v20140528-1422
>  org.eclipse.e4.ui.workbench3 0.12.0.v20140227-2118
>  org.eclipse.equinox.ds 1.4.200.v20131126-2331
>  org.eclipse.emf.common 2.10.1.v20150123-0348
>  org.eclipse.equinox.bidi 0.10.0.v20130327-1442
>  org.eclipse.equinox.util 1.0.500.v20130404-1337
>  org.eclipse.equinox.launcher 1.3.0.v20140415-2008
>  org.eclipse.equinox.launcher.win32.win32.x86_64 1.1.200.v20150204-1316
>  org.eclipse.equinox.executable.feature.jar 3.6.102.v20150204-1316
>  org.eclipse.equinox.executable_root.win32.win32.x86_64
>3.6.102.v20150204-1316
>  org.eclipse.equinox.p2.core 2.3.0.v20131211-1531
>  org.eclipse.equinox.p2.engine 2.3.0.v20140506-1720
>  org.eclipse.equinox.p2.metadata 2.2.0.v20131211-1531
>  org.eclipse.equinox.p2.metadata.repository 1.2.100.v20131209-2144
>  org.eclipse.equinox.p2.repository 2.3.0.v20131211-1531
>  org.eclipse.equinox.security 1.2.0.v20130424-1801
>  org.eclipse.help 3.6.0.v20130326-1254
>  org.eclipse.ltk.core.refactoring 3.6.101.v20140817-1500
>  org.eclipse.ltk.ui.refactoring 3.7.100.v20140324-1358
>  org.eclipse.team.core 3.7.0.v20130514-1224
>  org.eclipse.team.ui 3.7.100.v20130710-1213
>  org.eclipse.ui.workbench 3.106.2.v20150204-1030
>  org.eclipse.ui.views.properties.tabbed 3.6.0.v20140519-0906
>  org.w3c.dom.smil 1.0.0.v200806040011
>  org.eclipse.swt.win32.win32.x86_64 3.103.2.v20150203-1351
>

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top