LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-28-2010, 06:09 AM   #1
ZogDog
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
Exclamation 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
 
Old 11-28-2010, 11:57 AM   #2
ZogDog
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Anyone?
 
Old 09-03-2013, 05:50 PM   #3
pga123
LQ Newbie
 
Registered: Sep 2013
Posts: 1

Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Yet another java classpath question --- java.lang.NoClassDefFoundError Jama raequin Programming 1 12-29-2009 02:04 PM
Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/Signature canonas Linux - Software 3 06-16-2008 05:00 AM
eclipse "main" java.lang.NoClassDefFoundError: sefaklc Programming 1 10-08-2007 05:35 PM
java.lang.NoClassDefFoundError robbbert Programming 6 07-16-2006 07:47 AM
java.lang.NoclassDefFoundError rlnd Programming 5 02-18-2006 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration