Welcome! Log In Create A New Profile

Advanced

Stupid STLLoader error message

Posted by reece.arnott 
Stupid STLLoader error message
November 12, 2007 01:06AM
I've tried to install the reprap software on my computer now that I've put Ubuntu Gutsy on it and have run into this stupid error message again:
Exception in thread "RepRap" java.lang.NoClassDefFoundError: org/j3d/renderer/java3d/loaders/STLLoader
at org.reprap.gui.STLObject.(Unknown Source)
at org.reprap.gui.RepRapBuild.createSceneBranchGroup(Unknown Source)
at org.reprap.gui.Panel3D.initJava3d(Unknown Source)
at org.reprap.gui.Panel3D.initialise(Unknown Source)
at org.reprap.gui.RepRapBuild.(Unknown Source)
at org.reprap.Main.createAndShowGUI(Unknown Source)
at org.reprap.Main.access$2400(Unknown Source)
at org.reprap.Main$23.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

I know that means it can't find the j3d-org-java3d-all.jar but I did a very basic install really.

In total the commands I ran (after downloading the files and copying them to /tmp) were:

Install JDK
===========
sudo apt-get install sun-java5-jdk
sudo update-java-alternatives --set java-1.5.0-sun
sudo update-alternatives --config java

Install Java3D and RXTX
=======================
cd /usr/lib/jvm/java-1.5.0-sun/jre
sudo sh /tmp/java3d-1_5_1-linux-i586.bin
cd lib/ext/
sudo cp /tmp/j3d-org-java3d-all.jar .
sudo unzip -j -o /tmp/rxtx-2.1-7-bins-r2.zip rxtx-2.1-7-bins-r2/RXTXcomm.jar
cd ../i386
sudo unzip -j -o /tmp/rxtx-2.1-7-bins-r2.zip rxtx-2.1-7-bins-r2/Linux/i686-unknown-linux-gnu/*.so

Then I just unzipped the 0.8.1 host and tried to run it.

Its some simple java configuration thing I'm sure but I just don't know what it is.

I also noticed that gutsy comes with java6 as well but I copied the files into the appropriate java6 folders as well. I also did this on my Feisty LiveCD and have the identical problem (actually thats why I tried it on my Gutsy partition).

I tried some of the suggestions on the 'Wheres my JRE?' wiki page and everything seems to be pointing in the correct places.

I've also tried setting the classpath environment variable but I may have done that wrong.

Any suggestions. I'm sure its something simple. I think its just that I'm just not familiar enough with java environment variables to see the solution.
Re: Stupid STLLoader error message
November 12, 2007 08:54AM
Ah,
I can save you many hours of pain and difficulty. As for I was in this same situation last week.

1st install everything from the non Devolopers install the way they mentioned to do it using the same software.. ( there are a few new packages but for the most part follow the instructions.) this will include jre, rxtx, and java 3d. you do not need the host yet but it would help to make sure everything is working..

2nd then go to the Devolopers insatll page and install subversion from the package installer.. ( you wont need the rest of the packages ie (kdebase...... unless you are going to install kcad, pikdev etc...)


3rd install Eclipse from the add remove tab under applications install eclipe (I have found this seems to get it to work the best with the newest release of eclipse.)

4th install subclipse from the instructions that the link goes to..

5th set up the link to sourceforge and download the reprap host file to your workspace..

6th now the part I found open terminal and go to your workspace where the host file is located (mine was /workspace/Reprap and run the host-package-release script by using sudo sh host-package-release once you have done this it will not only create a reprap-host-current date.zip which is the stand alone host package you can share with your friend from the host package you just downloaded which will be now current it will also allow ( in some mysterious way) the host package to compile and run in eclipse....

Good luck and let me know how you make out....

Bruce Wattendorf
Re: Stupid STLLoader error message
November 12, 2007 06:08PM
That seems to imply that either the 0.8.1 reprap-host zip file available on sourceforge is flawed and just doesn't work or that one of the extra steps adds/changes something to make it work properly.

Unless someone else knows, I'll have a play around with this over the next few days and see if I can get a definitive answer. I'd be surprised if it was the reprap-host software as I'm fairly sure I've had it working before.

My guess would be that Eclipse sets some environment variables/paths etc. that are needed to find the j3d-org-java3d-all.jar file, so I'll try just installing that first and re-running the 0.8.1 reprap-host.sh script.

Hey, theres another advantage of a LiveCD: I can do any number of these steps and find out exactly what it is, then reboot and try it again without having any of the confusion having to undo each of the other steps first. Greta troubleshooting tool (if quite slow).
Re: Stupid STLLoader error message
November 15, 2007 01:52AM
Nope. I followed all those instructions and had the same issue when trying to compile and run the source code from within Eclipse. But when I tried to run the host-package-release script I got an error saying:

[javac] error: error reading /usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/ext/j3d-org-java3d-all.jar; error in opening zip file
I figured that indicated that it was either a rights issue or a corrupt file. I deleted the file and copied a new one into the same place from the workspace/Reprap/lib folder and it worked!

Now I just have to make sure that fixes the issue on the LiveCD and its onwards to the next issue!

Edited 1 time(s). Last edit at 11/15/2007 02:57AM by reece.arnott.
Re: Stupid STLLoader error message
November 16, 2007 01:54AM
After a bit of playing around it looks like the default file rights for the j3d-org-java3d-all.jar may be wrong for the 0.9 version zip file I downloaded from their homepage.

The 0.8 version has the rights as -rw-r--r-- but the 0.9 version is -rwxrwx---

As this file is copied into place via a sudo command this means its assigned user and group as root so the normal user has no rights to it, hence the error, Simple fix for that is to run the following command in the java lib/ext directory afterwards:

sudo chmod 644 j3d-org-java3d-all.jar

Unfortuately this doesn't seem to be the issue with my LiveCD, it still isn't working. I must have done something else in the process of installing all the extra developer tools.

Edited 2 time(s). Last edit at 11/16/2007 02:05AM by reece.arnott.
Re: Stupid STLLoader error message
November 16, 2007 04:09PM
Finally! The problem with my LiveCD was not just the permissions but also that somehow I had a corrupted version of the j3d-org-java3d-all.jar file. It was around 6KB when it was supposed to be around 400.

How I did that and didn't notice especially as I was actually thinking the file might be corrupt I don't know.

At this point I have a number of copies and versions of this file floating around on my computers and pendrives so I'll have to delete most of them to make sure I don't have this happen again.

I would have thought if I was going to get corrupted files it would be on my keydrive or going between the computer and keydrive but as far as I can figure out, all those are fine, the problem may have been a corrupt download or a the corruption may have happened when I copied the downloaded file to another folder.

As long as its fixed now and I know what the correct one looks like.

The version I'm using comes from the j3d-org-code-0.9.zip file available for download from [code.j3d.org] and is 407487 bytes.
Re: Stupid STLLoader error message
November 19, 2007 12:06AM
its good to see progress happening on this! keep up the good work =)
Re: Stupid STLLoader error message
November 26, 2007 10:35PM
reece.arnott,

You are the smartest person in the world!!! (big googly eyes of wonder stare upon you) I was having this horrible problem, searched the forums for answers, and lo, you had solved it. We should update the instructions so people can get the file that they need instead of the corrupt one you and I got. Very annoying. Keep on keepin on!

Demented
Re: Stupid STLLoader error message
November 27, 2007 04:31AM
I think I know where the corrupt file came from!

I just tried to download the file referenced in the wiki instructions by right clicking on the link and it downloaded a file of the correct name. But, it was 6.7KB and when I went to look at it with a text editor I found it was a html file.

So, I went back and actually clicked on the link and found that it gives you a list of the latest revisions to choose which one you want to download.

Could somebody with wiki access please change the instructions to say something like:

There is an additional 3D utility library needed to be able to open and work with STL files. Go here for a list of the most recent versions you can save using either wget or your web browser, and save it in your home directory.

(with the here being the link of course).

Edited 2 time(s). Last edit at 11/27/2007 04:45AM by reece.arnott.
Re: Stupid STLLoader error message
January 17, 2008 11:40PM
Thanks for solving this I was beginning to pull my hair out.
Sorry, only registered users may post in this forum.

Click here to login