Jump to content
Mongo

Problem launching Energia Mint 12 Linux. Java error.

Recommended Posts

Hi folks,

 

I've tried to install the binary version as well as compiling via github repository using this tutorial:

 

http://elabz.com/msp430-in-64-bit-ubuntu-12-04-linux-the-arduino-way/

 

No matter what I try I get this error in the console:

 

 

 

 

twmaster@Dallas:~/electronics/energia$ ./energia
Exception in thread "main" java.lang.NoClassDefFoundError: processing/app/Base
Caused by: java.lang.ClassNotFoundException: processing.app.Base
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: processing.app.Base.  Program will exit.

 

While I am not a new user to Linux I cannot code my way out of a wet paper sack... So, I'm stumped. I've searched Google and only found hits relating to the Arduino and other Java stuff that is well over my head.

 

Help appreciated.

 

--

Mongo

 

Share this post


Link to post
Share on other sites

Hi,

 

Yes I used the 0009 binaries. I cannot remember if Mint has a live CD or not. Been a while since I've needed a live CD.... 

 

And I am running 64 bit. Kernel 3.0.0-12-generic

Share this post


Link to post
Share on other sites
java.lang.UnsatisfiedLinkError: /home/liran/energia-0101E0009/lib/librxtxSerial.so: /home/liran/energia-0101E0009/lib/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/liran/energia-0101E0009/lib/librxtxSerial.so: /home/liran/energia-0101E0009/lib/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1675)
	at java.lang.Runtime.loadLibrary0(Runtime.java:840)
	at java.lang.System.loadLibrary(System.java:1047)
	at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
	at processing.app.Editor.populateSerialMenu(Editor.java:967)
	at processing.app.Editor.buildToolsMenu(Editor.java:695)
	at processing.app.Editor.buildMenuBar(Editor.java:476)
	at processing.app.Editor.<init>(Editor.java:205)
	at processing.app.Base.handleOpen(Base.java:714)
	at processing.app.Base.handleOpen(Base.java:679)
	at processing.app.Base.handleNew(Base.java:575)
	at processing.app.Base.<init>(Base.java:315)
	at processing.app.Base.main(Base.java:199)

I'm using Arch 64bit and I get this message while trying to run latest energia.

Any fix for that?

Share this post


Link to post
Share on other sites

I just gave this a try in a virtual machine with Mint 12 and it runs fine with both openjdk 1.6 and 1.7.

What's the output of java -version on your machine?

 

Does the Arduino 1.0.2 environment run OK? (http://arduino.googlecode.com/files/arduino-1.0.2-linux64.tgz)

 

Here is my Java output:

 

 

 

 

twmaster@Dallas:~$ java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~11.10.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

 

I have not tried the Arduino 1.x IDE yet as I've been using the 0022 version for months with no issues. (don't fix what ain't broke!)

Share this post


Link to post
Share on other sites

 

java.lang.UnsatisfiedLinkError: /home/liran/energia-0101E0009/lib/librxtxSerial.so: /home/liran/energia-0101E0009/lib/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/liran/energia-0101E0009/lib/librxtxSerial.so: /home/liran/energia-0101E0009/lib/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1675)
	at java.lang.Runtime.loadLibrary0(Runtime.java:840)
	at java.lang.System.loadLibrary(System.java:1047)
	at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
	at processing.app.Editor.populateSerialMenu(Editor.java:967)
	at processing.app.Editor.buildToolsMenu(Editor.java:695)
	at processing.app.Editor.buildMenuBar(Editor.java:476)
	at processing.app.Editor.<init>(Editor.java:205)
	at processing.app.Base.handleOpen(Base.java:714)
	at processing.app.Base.handleOpen(Base.java:679)
	at processing.app.Base.handleNew(Base.java:575)
	at processing.app.Base.<init>(Base.java:315)
	at processing.app.Base.main(Base.java:199)

I'm using Arch 64bit and I get this message while trying to run latest energia.

Any fix for that?

 

Sure, delete /home/liran/energia-0101E0009/lib/librxtxSerial.so and then rename /home/liran/energia-0101E0009/lib/librxtxSerial64.so to /home/liran/energia-0101E0009/lib/librxtxSerial.so

Share this post


Link to post
Share on other sites

Sure, delete /home/liran/energia-0101E0009/lib/librxtxSerial.so and then rename /home/liran/energia-0101E0009/lib/librxtxSerial64.so to /home/liran/energia-0101E0009/lib/librxtxSerial.so

Awesome, it worked!

This should be mentioned on energia's site.

Share this post


Link to post
Share on other sites

Hi,

I followed the above discussion and renamed all the files as mentioned and also installed openjre as mentioned.

I have recently migrated to ubuntu (12.04 LTS 64Bit) from windows 7. On Windows its pretty straight to get energia running..

When i ran the command in terminal as

energia/energia

 

i got the following error:

Exception in thread "main" java.lang.ExceptionInInitializerError
    at processing.app.Base.main(Base.java:122)
Caused by: java.awt.HeadlessException
    at sun.awt.HeadlessToolkit.getMenuShortcutKeyMask(HeadlessToolkit.java:234)
    at processing.core.PApplet.<clinit>(Unknown Source)
    ... 1 more

doing a version check for java i got

 

rohit@rohit-Lenovo-H530:~$ java -version
java version "1.7.0_51"
OpenJDK Runtime Environment (IcedTea 2.4.4) (7u51-2.4.4-0ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

Then i sort of gave up and did it the old way by using mspgcc and mspdebug just to check if there was any issue with the installation of gcc/debug

The program for blinky compiled and i had it flashed and debuged successfully.

 

Thinking to get some serial running. I followed this:

https://github.com/capnm/LaunchPad

 

Then i got the error (:/)

** compile the cdcacm kernel modulemake -C /lib/modules/3.8.0-35-generic/build M=/home/rohit/LaunchPad/cdc-acm/fix-msp430lp-serial modulesmake[1]: Entering directory `/usr/src/linux-headers-3.8.0-35-generic'  CC [M]  /home/rohit/LaunchPad/cdc-acm/fix-msp430lp-serial/cdcacm.o/home/rohit/LaunchPad/cdc-acm/fix-msp430lp-serial/cdcacm.c: In function 

Share this post


Link to post
Share on other sites

I have seen this error before although I was never able to reproduce it, it seems to have to do with trying to run Energia on a headless system. This error is thrown when code that is dependent on a keyboard, display, or mouse is called in an environment that does not support a keyboard, display, or mouse. It could be that the jre/jdk you have installed is the server version and that jre/jdk does not have support for mouse/keyboard.

 

Your java -version tells me:

"OpenJDK 64-Bit Server VM"

On Ubuntu 12.10 I am able to run Energia with openjdk-6 and openjdk-7. Following is how I installed the jdk. Would you please try this and let us know if that get's it working?

 

apt-get install openjdk-6-jre
apt-get install openjdk-7-jre

then switch between them using:

update-java-alternatives -s java-1.6.0-openjdk-i386
update-java-alternatives -s java-1.7.0-openjdk-i386

Share this post


Link to post
Share on other sites

Hi,

Thanks a lot! Finally the IDE Showed up..I can compile all but those with serial dont show up on the Serial monitor and it gives the following error!

Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyACM0: File exists
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyACM0: File exists
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyACM0: File exists
RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyACM0
processing.app.SerialNotFoundException: Serial port 'COM1' not found. Did you select the right one from the Tools > Serial Port menu?
    at processing.app.Serial.<init>(Serial.java:165)
    at processing.app.Serial.<init>(Serial.java:92)
    at processing.app.SerialMonitor.openSerialPort(SerialMonitor.java:209)
    at processing.app.Editor.handleSerial(Editor.java:2630)
    at processing.app.Editor$20.actionPerformed(Editor.java:777)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:374)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:829)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:873)
    at java.awt.Component.processMouseEvent(Component.java:6288)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6053)
    at java.awt.Container.processEvent(Container.java:2045)
    at java.awt.Component.dispatchEventImpl(Component.java:4649)
    at java.awt.Container.dispatchEventImpl(Container.java:2103)
    at java.awt.Component.dispatchEvent(Component.java:4475)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227)
    at java.awt.Container.dispatchEventImpl(Container.java:2089)
    at java.awt.Component.dispatchEvent(Component.java:4475)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:675)
    at java.awt.EventQueue.access$300(EventQueue.java:96)
    at java.awt.EventQueue$2.run(EventQueue.java:634)
    at java.awt.EventQueue$2.run(EventQueue.java:632)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:108)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:119)
    at java.awt.EventQueue$3.run(EventQueue.java:648)
    at java.awt.EventQueue$3.run(EventQueue.java:646)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:108)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:645)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

You can see the screenshot as well!

I also worked the other way around after spending the whole day trying to figure out the issue and configured geany to code MSP430 in just 3 keystrokes! Its here on my blog

 

I think i am only left with the Serial Issue! :D

 

TIA

Regards,

Rohit

 

Update:I played with it , the IDE sort of Hangs and has to be killed. Dont know why? The Serial Port option is also unavailable as it its there but it doesnt get highlighted when i hover over it.

post-33640-0-47593300-1392725932_thumb.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...