LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Listener (https://www.linuxquestions.org/questions/linux-newbie-8/java-lang-noclassdeffounderror-org-eclipse-swt-widgets-listener-847008/)

ZogDog 11-28-2010 05:09 AM

java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Listener
 
Linux newbie, but not ignorant. Followed steps to this point, can't get client.jnlp from "http://www.campusbuyback.com/download.html" to work.

Here's what I've done so far to make sure java was enable and installed correctly:

Code:

sudo apt-get install xubuntu-restricted-extras
Code:

sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
accepted the license, completed the install. Every time I try and launch the app from the listed site above, I get an application error with the following data showing:

Launch File

Code:

<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Descriptor 6.0//EN" "http://java.sun.com/dtd/JNLP-6.0.dtd">
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="6.0+" version="3812" codebase="http://prod.webstart.ucentive.net/webstart/"  href="client.jnlp">
        <information>
                <title>UCentive Client</title>
                <vendor>UCentive</vendor>
            <shortcut online="true">
                      <desktop/>
                      <menu submenu="UCentive" />
              </shortcut>
        </information>

        <security>
                <all-permissions/>
        </security>

        <update check="always" policy="always" />

        <resources>
                <java version="1.6+" initial-heap-size="256M" max-heap-size="1024M" />

                <!-- Client -->
                <jar href="client.jar" />
                <jar href="lib/commons-codec-1.4.jar" />
                <jar href="lib/commons-httpclient-3.1.jar" />
                <jar href="lib/entities-jpa.jar" />
                <jar href="lib/jersey-apache-client-1.1.5.jar" />
                <jar href="lib/jersey-client-1.1.5.jar" />
                <jar href="lib/jersey-core-1.1.5.jar" />
                <jar href="lib/jsr311-api-1.1.jar" />
                <jar href="lib/ucentive-common.jar" />
                <jar href="lib/ucentive-utils.jar" />

                <!-- Reports -->
                <jar href="lib/report/commons-beanutils.jar" />
                <jar href="lib/report/commons-collections.jar" />
                <jar href="lib/report/commons-digester-1.8.jar" />
                <jar href="lib/report/commons-logging.jar" />
                <jar href="lib/report/jasperreports-3.7.4.jar" />
                <jar href="lib/report/JasperReportUtil-client.jar" />
                <jar href="lib/report/report-plugin-client.jar" />

        </resources>

        <resources os="Linux" arch="x86_64">
                <java version="1.6+" />
                <jar href="lib/swt/swt-3.6-gtk-linux-x86_64.jar" />
        </resources>

        <resources os="Linux" arch="amd64">
                <java version="1.6+" />
                <jar href="lib/swt/swt-3.6-gtk-linux-x86_64.jar" />
        </resources>

        <resources os="Linux" arch="x86">
                <java version="1.6+" />
                <jar href="lib/swt/swt-3.6-gtk-linux-x86.jar" />
        </resources>

        <resources os="Mac OS X" arch="x86_64">
                <java version="1.6+" java-vm-args="-XstartOnFirstThread -d64" />
                <jar href="lib/swt/swt-3.6-cocoa-macosx-x86_64.jar" />
        </resources>

        <resources os="Mac OS X" arch="x86">
                <java version="1.6+" java-vm-args="-XstartOnFirstThread -d32" />
                <jar href="lib/swt/swt-3.6-cocoa-macosx.jar" />
        </resources>

        <resources os="Windows" arch="x86_64">
                <java version="1.6+" />
                <jar href="lib/swt/swt-3.6-win32-win32-x86_64.jar" />
        </resources>

        <resources os="Windows" arch="amd64">
                <java version="1.6+" />
                <jar href="lib/swt/swt-3.6-win32-win32-x86_64.jar" />
        </resources>

        <resources os="Windows" arch="x86">
                <java version="1.6+" />
                <jar href="lib/swt/swt-3.6-win32-win32-x86.jar" />
        </resources>

        <application-desc main-class="net.ucentive.client.ClientApp">
                <argument>http://prod.apps.ucentive.net/production/</argument>
        </application-desc>
</jnlp>

Exception

Code:

java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Listener
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.getMethod0(Unknown Source)
        at java.lang.Class.getMethod(Unknown Source)
        at com.sun.javaws.Launcher.executeApplication(Launcher.java:1788)
        at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1745)
        at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1507)
        at com.sun.javaws.Launcher.run(Launcher.java:129)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Listener
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:332)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 9 more

Console
Code:

Java Web Start 1.6.0_21
Using JRE version 1.6.0_22-b04 Java HotSpot(TM) Server VM
User home directory = /home/clayton
----------------------------------------------------
c:  clear console window
f:  finalize objects on finalization queue
g:  garbage collect
h:  display this help message
m:  print memory usage
o:  trigger logging
p:  reload proxy configuration
q:  hide console
r:  reload policy configuration
s:  dump system and deployment properties
t:  dump thread list
v:  dump thread stack
0-5: set trace level to <n>
----------------------------------------------------
Could not launch from cache. Will try online mode. [Some of required resources are not cached.]
#### Java Web Start Error:
#### java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Listener

Any suggestions on what I need to do to get the application working? This is critical for my friends bookstore to get going on Monday.

Thank you

ZogDog 11-28-2010 10:57 AM

Anyone?

pga123 09-03-2013 04:50 PM

jnlp file needs rearranging
 
When javaws reads the os and arch properties in your resource tags, it stops as soon as it finds a match. So if the os is Windows and the architecture is x86 it will accept os="Windows" arch="x86_64" as a match. This will cause the wrong file to be loaded and potentially cause your problem. You need to put x86 before x86_64 to avoid this.


All times are GMT -5. The time now is 01:35 AM.