Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Web Start Eclipse Platform failing
Web Start Eclipse Platform failing [message #43408] Sat, 31 January 2009 22:01 Go to next message
Tim Stephenson is currently offline Tim StephensonFriend
Messages: 18
Registered: July 2009
Junior Member
Web Start Eclipse Platform not working

Hi,

Can anyone help me understand what is wrong with my attempt to start
Eclipse Platform (product: org.eclipse.platform.ide) using Java Web Start?
Since all the plugins of this feature are all I was hopeful that I would
be able to web start it - am I wrong?

Below is the detail of what I tried and the errors I got, thanks in
adavnce for your help!
tim

I read the help here:

http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/java_web_start.htm

Step 1: I created a wrapper feature that lists only the eclipse platform
feature and the equinox launcher plugin. Feature.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.tibco.xpd.webstart"
label="Webstart Eclipse Platform Feature"
version="1.0.0.qualifier"
provider-name="ACME Inc.">

<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>

<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>

<license url="http://www.example.com/license">
[Enter License Description here.]
</license>


<includes
id="org.eclipse.platform"
version="0.0.0"/>

<plugin
id="org.eclipse.equinox.launcher"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>

Step 2: I exported and signed the deployable feature

Step 3: I copied the sample JNLP file and replaced as specified, it looks
like this:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp
spec="1.0+"
codebase="http://localhost:8080/studio"
href="studio.jnlp">
<!-- URL to the site containing the jnlp application. It should
match the value used on export. Href, the name of this file -->
<information>
<!-- user readable name of the application -->
<title> Title </title>
<!-- vendor name -->
<vendor> Vendor </vendor>
<!-- vendor homepage -->
<homepage href="http://www.acme.com/" />
<!-- product description -->
<description> description </description>
<icon kind="splash" href="splash_ganymede.png"/>
</information>

<!--request all permissions from the application. This does not
change-->
<security>
<all-permissions/>
</security>

<!-- The name of the main class to execute. This does not change-->
<application-desc
main-class="org.eclipse.equinox.launcher.WebStartMain">
<argument>-nosplash</argument>
<argument>-product org.eclipse.platform.ide</argument>
</application-desc>

<resources>
<!-- Reference to the launcher jar. The version segment must be
updated to the version being used-->
<jar
href=" plugins/org.eclipse.equinox.launcher_1.0.100.v20080509-1800. jar "/>

<!-- Reference to all the plugins and features constituting the
application -->
<!-- Here we are referring to the wrapper feature since it
transitively refers to all the other plug-ins necessary -->
<extension
name="Wrapper feature"
href="features/com.acme.webstart_1.0.0.200901302240.jnlp"/ >

<!-- Information usually specified in the config.ini -->
<property
name="osgi.instance.area"
value="@user.home/workspace"/>
<property
name="osgi.configuration.area"
value="@user.home/studio"/>
<property
name="osgi.instance.area"
value="@user.home/studio"/>

<!-- The id of the product to run, like found in the overview page
of the product editor -->
<property
name="eclipse.product"
value="org.eclipse.platform.ide"/>
</resources>

<!-- Indicate on a platform basis which JRE to use -->
<resources os="Mac">
<j2se version="1.5+" java-vm-args="-XstartOnFirstThread"/>
</resources>
<resources os="Windows">
<j2se version="1.5+"/>
</resources>
<resources os="Linux" java-vm-args="-Xms256m -Xmx512m
-XX:MaxPermSize=256m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass">
<j2se version="1.5+"/>
</resources>

<!-- When an eclipse application is started with Web Start on Linux
the default windowing system is motif. -->
<resources os="Linux">
<property name="osgi.ws" value="gtk"/>
</resources>

</jnlp>

On starting up webstart downloads some jars (too few I am guessing judging
by the time taken) and then reports this in the eclipse log in
@user.home/studio
!SESSION Sat Jan 31 07:15:20 GMT 2009
------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2009-01-31 07:15:20.713
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.io.IOException: Unable to initialize osgi.frameworkClassPath
at org.eclipse.equinox.launcher.Main.addBaseJars(Main.java:786)
at org.eclipse.equinox.launcher.Main.getDevPath(Main.java:683)
at org.eclipse.equinox.launcher.Main.getBootPath(Main.java:870)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:488)
at
org.eclipse.equinox.launcher.WebStartMain.basicRun(WebStartM ain.java:70)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at
org.eclipse.equinox.launcher.WebStartMain.main(WebStartMain. java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

So I read the system properties docs here:
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. platform.doc.isv/reference/misc/runtime-options.html

And then added this to the JNLP
<property
name="osgi.frameworkClassPath"
value="plugins/org.eclipse.osgi_3.4.0.v20080605-1900.jar/>

The error changes to this:
!SESSION Sat Jan 31 20:40:54 GMT 2009
------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2009-01-31 20:40:54.514
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException:
org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 546)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at
org.eclipse.equinox.launcher.WebStartMain.basicRun(WebStartM ain.java:70)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at
org.eclipse.equinox.launcher.WebStartMain.main(WebStartMain. java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Re: Web Start Eclipse Platform failing [message #43474 is a reply to message #43408] Sun, 01 February 2009 19:49 Go to previous message
Tim Stephenson is currently offline Tim StephensonFriend
Messages: 18
Registered: July 2009
Junior Member
My post yesterday was against 3.4.0 and by updating the
org.eclipse.equinox.launcher plugin to the one shipped in 3.4.1 fixed at
least part of the issue.

Searching through the CVS history it may be that this fixed it: bug 240500
- Java 6 Update 7 breaks OSGI over Webstart

However the webstart still did not work due to:
java.lang.NoClassDefFoundError: org/eclipse/swt/SWTError.

Perhaps it was a lucky guess that I thought of the fact that SWT has
native library dependencies and sure enough I tracked down that the JNLP
file generated by PDE for the RCP feature specifies platform-specific jars
like this example:

<resources os="Linux" arch="x86">
<jar
href="plugins/org.eclipse.swt.gtk.linux.x86_3.4.0.v3448f.jar "/>
</resources>

My understanding of web start was that native libraries had to be listed
as nativelib elements rather than jar but SWT apparently handles this:
(see http://www.eclipse.org/swt/jws/) for SWT 3.3 and higher.

Finally, I discovered by reading section 4.1 of "JSR-000056 Java Network
Launching Protocol and API 6.0.10 MRel2 specification" that "arch
attribute: Specifies the architecture for which the resources element
should be considered. If the value is a prefix of the os.arch system
property, then the resources element can be used."

Therefore the jnlp generated by Eclipse is wrong since os.arch on my
machine (Linux running Sun JRE 6 u11) is i386 not x86 thus preventing all
SWT native libraries from loading.

So changing all the arch="x86" to arch="i386" fixes the problem. After
this I just had to remove the motif libraries which web start appears to
try to load even when I specify that it be loaded lazily AND that osgi
should prefer GTK.

hope this helps someone,
tim
Re: Web Start Eclipse Platform failing [message #590893 is a reply to message #43408] Sun, 01 February 2009 19:49 Go to previous message
Tim Stephenson is currently offline Tim StephensonFriend
Messages: 18
Registered: July 2009
Junior Member
My post yesterday was against 3.4.0 and by updating the
org.eclipse.equinox.launcher plugin to the one shipped in 3.4.1 fixed at
least part of the issue.

Searching through the CVS history it may be that this fixed it: bug 240500
- Java 6 Update 7 breaks OSGI over Webstart

However the webstart still did not work due to:
java.lang.NoClassDefFoundError: org/eclipse/swt/SWTError.

Perhaps it was a lucky guess that I thought of the fact that SWT has
native library dependencies and sure enough I tracked down that the JNLP
file generated by PDE for the RCP feature specifies platform-specific jars
like this example:

<resources os="Linux" arch="x86">
<jar
href="plugins/org.eclipse.swt.gtk.linux.x86_3.4.0.v3448f.jar "/>
</resources>

My understanding of web start was that native libraries had to be listed
as nativelib elements rather than jar but SWT apparently handles this:
(see http://www.eclipse.org/swt/jws/) for SWT 3.3 and higher.

Finally, I discovered by reading section 4.1 of "JSR-000056 Java Network
Launching Protocol and API 6.0.10 MRel2 specification" that "arch
attribute: Specifies the architecture for which the resources element
should be considered. If the value is a prefix of the os.arch system
property, then the resources element can be used."

Therefore the jnlp generated by Eclipse is wrong since os.arch on my
machine (Linux running Sun JRE 6 u11) is i386 not x86 thus preventing all
SWT native libraries from loading.

So changing all the arch="x86" to arch="i386" fixes the problem. After
this I just had to remove the motif libraries which web start appears to
try to load even when I specify that it be loaded lazily AND that osgi
should prefer GTK.

hope this helps someone,
tim
Previous Topic:Problem : Indirect referenced from required .class files
Next Topic:How to exclude test directory in Export
Goto Forum:
  


Current Time: Sun Jun 20 21:45:53 GMT 2021

Powered by FUDForum. Page generated in 0.02278 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top