Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Error, Need Help
Error, Need Help [message #1044061] Thu, 18 April 2013 12:57 Go to next message
Rawz . is currently offline Rawz .Friend
Messages: 3
Registered: April 2013
Junior Member
Hi guys, i'm currently working on Eclipse and i'm facing many errores like this one



java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
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 sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethod(Unknown Source)
at java.awt.Component.isCoalesceEventsOverriden(Unknown Source)
at java.awt.Component.access$500(Unknown Source)
at java.awt.Component$3.run(Unknown Source)
at java.awt.Component$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Component.checkCoalescing(Unknown Source)
at java.awt.Component.<init>(Unknown Source)
at java.awt.Container.<init>(Unknown Source)
at java.awt.Panel.<init>(Unknown Source)
at java.awt.Panel.<init>(Unknown Source)
at java.applet.Applet.<init>(Unknown Source)
at processing.core.PApplet.<init>(PApplet.java:156)
at Chauffe.<init>(Chauffe.java:9)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener
at java.net.URLClassLoader$1.run(Unknown Source)
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 sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 38 more


I've searched for a while but can't find anything to help me, found some answers but just can't do it so i came here to ask for your help Smile

Re: Error, Need Help [message #1044166 is a reply to message #1044061] Thu, 18 April 2013 15:06 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3265
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 4/18/2013 8:47 AM, Morabit Souleyman wrote:
> Hi guys, i'm currently working on Eclipse and i'm facing many errores
> like this one
>
>
> [snip]
> Caused by: java.lang.ClassNotFoundException: gnu.io.SerialPortEventListener
> [snip]

(You're using Eclipse, right?)

This only means that you've not added the JAR that furnishes Java class
gnu.io.SerialPortEventListener to your project via Java Build Path.

You must find this JAR, copy it into your project (many ways to do
this), right-click your project root in the Package or Project Explorer
view, choose Build Path and then click on Add JARs... in the dialog, etc.

Come back here and ask a more specific question if you get stuck.

Hope this helps.
Re: Error, Need Help [message #1044167 is a reply to message #1044166] Thu, 18 April 2013 15:09 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3265
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 4/18/2013 9:06 AM, Russell Bateman wrote:
> On 4/18/2013 8:47 AM, Morabit Souleyman wrote:
>> Hi guys, i'm currently working on Eclipse and i'm facing many errores
>> like this one
>>
>>
>> [snip]
>> Caused by: java.lang.ClassNotFoundException:
>> gnu.io.SerialPortEventListener
>> [snip]
>
> (You're using Eclipse, right?)
>
> This only means that you've not added the JAR that furnishes Java class
> gnu.io.SerialPortEventListener to your project via Java Build Path.
>
> You must find this JAR, copy it into your project (many ways to do
> this), right-click your project root in the Package or Project Explorer
> view, choose Build Path and then click on Add JARs... in the dialog, etc.
>
> Come back here and ask a more specific question if you get stuck.
>
> Hope this helps.
>

By the way, I typed "gnu.io.SerialPortEventListener" into Google and
found this link:

http://forum.processing.org/topic/classnotfoundexception-gnu-io-serialporteventlistener
Re: Error, Need Help [message #1044168 is a reply to message #1044061] Thu, 18 April 2013 15:10 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1351
Registered: July 2009
Senior Member
Your question really belongs in a general Java programming forum and not in the Eclipse forums.

Your program is trying to load a class called SerialPortEventListener from the gnu.io package. This class can't be found on the programs classpath. You need to add the class to the classpath. Normally this would be accomplished by adding a jar file to the classpath. I'm not familiar with the gni.io package, so can't provide much more information other then to suggest you study about how the Java classpath works and how to specify the classpath.
Re: Error, Need Help [message #1044749 is a reply to message #1044167] Fri, 19 April 2013 09:35 Go to previous messageGo to next message
Rawz . is currently offline Rawz .Friend
Messages: 3
Registered: April 2013
Junior Member
Russell Bateman wrote on Thu, 18 April 2013 11:09
On 4/18/2013 9:06 AM, Russell Bateman wrote:


By the way, I typed "gnu.io.SerialPortEventListener" into Google and
found this link




Yeah I found it too, but it didn't work so i thought i would come here

Russell Bateman wrote on Thu, 18 April 2013 11:06


(You're using Eclipse, right?)


You must find this JAR, copy it into your project (many ways to do
this), right-click your project root in the Package or Project Explorer
view, choose Build Path and then click on Add JARs... in the dialog, etc.


Hope this helps.



It helped a lot indeed, thanks to you guys, it did solve this problem but now i have a new one, and yeah i'm using Eclipse Smile



java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\Java\jre6\bin\rxtxSerial.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform thrown while loading gnu.io.RXTXCommDriver
java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\Java\jre6\bin\rxtxSerial.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
at processing.serial.Serial.list(Serial.java:632)
at Chauffe.setup(Chauffe.java:44)
at processing.core.PApplet.handleDraw(PApplet.java:2241)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:243)
at processing.core.PApplet.run(PApplet.java:2140)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Animation Thread" java.lang.RuntimeException: Error inside Serial.ports()
at processing.serial.Serial.errorMessage(Serial.java:666)
at processing.serial.Serial.list(Serial.java:647)
at Chauffe.setup(Chauffe.java:44)
at processing.core.PApplet.handleDraw(PApplet.java:2241)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:243)
at processing.core.PApplet.run(PApplet.java:2140)
at java.lang.Thread.run(Unknown Source)



I really think that it's a bout the version of Eclipse and my windows but the eclipse 64 bit doesn't works so i'm kind of stuck.


David Wegener wrote on Thu, 18 April 2013 11:10

Your question really belongs in a general Java programming forum and not in the Eclipse forums.

I'm not familiar with the gni.io package, so can't provide much more information other then to suggest you study about how the Java classpath works and how to specify the classpath.


Anyway thanks for replying, and i've studied thos yesterday during 4 hours nothing really helped Smile
Re: Error, Need Help [message #1044889 is a reply to message #1044749] Fri, 19 April 2013 13:12 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3265
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 4/19/2013 3:35 AM, Rawz . wrote:
> [snip]
> It helped a lot indeed, thanks to you guys, it did solve this problem
> but now i have a new one, and yeah i'm using Eclipse :)
>
>
> java.lang.UnsatisfiedLinkError: C:\Program Files
> (x86)\Java\jre6\bin\rxtxSerial.dll: Can't load IA 32-bit .dll on a AMD
> 64-bit platform thrown while loading gnu.io.RXTXCommDriver
> java.lang.UnsatisfiedLinkError: C:\Program Files
> (x86)\Java\jre6\bin\rxtxSerial.dll: Can't load IA 32-bit .dll on a AMD
> 64-bit platform
> at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> [snip]

You're mixing 32-bit and 64-bit, aren't you? This is a no-no. All one or
all the other, but no mixing.
Re: Error, Need Help [message #1059932 is a reply to message #1044889] Wed, 22 May 2013 08:34 Go to previous message
Rawz . is currently offline Rawz .Friend
Messages: 3
Registered: April 2013
Junior Member
Ok, I think I get it, thanks all for your help
Previous Topic:Cannot resolve an eclipse JDI error
Next Topic:Documentation print topic and all subtopics problem
Goto Forum:
  


Current Time: Fri Dec 19 15:22:43 GMT 2014

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

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