Welcome! Log In Create A New Profile

Advanced

unable to install reprap-host on java6-Sun under Ubuntu 8.10

Posted by gerard94 
Hello,

When I type ./reprap-host.sh in my terminal, I get:

gerard@hermes:~/Installations/RepRap/reprap-host-20080523$ ./reprap-host.sh
Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/PortInUseException
Caused by: java.lang.ClassNotFoundException: gnu.io.PortInUseException
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
Could not find the main class: org.reprap.Main. Program will exit.

Could you help me?

G
Everyone -

This message could be from me to - exact same system with the exact same problem. I've tried re-installing everything and all seems well, however for some reason the main thread isn't finding or gaining access to the serial port.

Anybody got any ideas?

Leland
Re: unable to install reprap-host on java6-Sun under Ubuntu 8.10
November 26, 2008 11:28AM
Yeah, me too! Of course I just wasn't sure it was cause I was an idiot...was trying to fudge around it myself but not having any luck.

As to the moduser thing...that parts been bugging me for a while. Thanks for posting the real command!

Demented
Do you think there is a problem with java6? The docu uses java5.

G
Re: unable to install reprap-host on java6-Sun under Ubuntu 8.10
November 28, 2008 04:43AM
I run on Java 6 all the time but on Debian not Ubuntu. The problems looks like it can not find the RXTX jar file in the classpath. Are you sure you put the RXTX jar in the right place, and that the JNI .so file is also in the right place?

One thing to check is that you have not updated your java since putting the RXTX code into the /lib/ext directory. Each move changes the directory that gets used.

Really putting the code into the JVM directories is the wrong thing to do. I am working on a new directory layout (at least for Linux) which removes the need to do this completely, and means we can distribute a binary image which will run out of the box.

David
emt
Re: unable to install reprap-host on java6-Sun under Ubuntu 8.10
November 28, 2008 10:13AM
Hi David

You say at least for linux. Is windows generally a problem with Java?


Regards

Ian
Re: unable to install reprap-host on java6-Sun under Ubuntu 8.10
November 28, 2008 05:16PM
No, the directory structure is the same, I just do not know how to write the BAT file equivalent of the shell script that builds the classpath. This code would not be necessary for Java 6 as it has a wildcard capability for the classpath, but we can not use Java 6 due to problems on the Mac I am told. The shell script code finds all the JAR files in a directory and builds the classpath from all of them.

David
emt
Re: unable to install reprap-host on java6-Sun under Ubuntu 8.10
November 29, 2008 03:54AM
I have a little experience of writing DOS bat install file so I would be interested in trying to replicate the shell script. My problem is I probably would not understand the shell script and I know little about Java but I would be willing to have a go. Maybe just one line at a time to start with if someone would help with explaining the shell script action in words.


Regards

Ian
I can't still make it work.

In the readme file of reprap-host-20080523.zip, I can read:

"The software is now run so it can find the libraries it needs at
a fixed location (/usr/share/java in Linux)"

Could you explain which libraries should be placed there, and in which subdirs? Thanks.

G
I've double checked my installation and all the Java stuff is where it's supposed to be, along with the rxtx files, etc. I still get the same list of errors.

I'm pretty much stumped. I've tried everything I can think of.

Is there any way to get more error reporting or a diagnostic mode or anything that will help sort this out?

Thanks,

Leland
Re: unable to install reprap-host on java6-Sun under Ubuntu 8.10
December 04, 2008 06:01AM
Modify the shell script to echo the commands it is producing (set -x) and also add the -verbose:class option to the java invocation. That will tell you exactly which class is failing to load, and which ones have loaded.

David
Re: unable to install reprap-host on java6-Sun under Ubuntu 8.10
December 04, 2008 07:43PM
I'm having the same problem, well most of the items are the same. Any other suggestions? I just installed JRE6 and all the files in the places indicated.

One of the post above point out this in the readme file:

"The software is now run so it can find the libraries it needs at
a fixed location (/usr/share/java in Linux)"

I can't find this directory structure in any of the JAVA and RepRap stuff. Where should these be, what's before the /usr/.

Here is what I get:

C:\Program Files\reprap-host-20080523>rem reprap-host -- runs Reprap Java host c
ode with an appropriate classpath

C:\Program Files\reprap-host-20080523>rem Amount of RAM to allow Java VM to use
C:\Program Files\reprap-host-20080523>set RAM_SIZE=384M
C:\Program Files\reprap-host-20080523>rem reprap.jar file and stl file
C:\Program Files\reprap-host-20080523>set REPRAP_DIR=C:\Program Files\Reprap
C:\Program Files\reprap-host-20080523>rem Java3D and j3d.org libraries
C:\Program Files\reprap-host-20080523>set JAVA_LIBRARY_DIR=C:\Program Files\Java\shared
C:\Program Files\reprap-host-20080523>rem cd so we can find the reprap-wv.stl file. Can we avoid this??
C:\Program Files\reprap-host-20080523>IF NOT EXIST reprap-wv.stl cd "C:\Program
Files\Reprap"
C:\Program Files\reprap-host-20080523>java -cp ".;.\reprap.jar;C:\Program Files\
Reprap\;C:\Program Files\Reprap\reprap.jar;C:\Program Files\Java\shared\*" -Xmx3
84M org/reprap/Main
Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/PortInUseException
Caused by: java.lang.ClassNotFoundException: gnu.io.PortInUseException
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.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: org/reprap/Main. Program will exit.

C:\Program Files\reprap-host-20080523>if ERRORLEVEL 1 pause
Press any key to continue . . .
Re: unable to install reprap-host on java6-Sun under Ubuntu 8.10
December 05, 2008 11:41AM
I tried a different computer and have some different errors. I runs something but the command window puffs away pretty quick, but I was able to select and copy the text. Here it is:

C:\Program Files\reprap-host-20080523>java -cp ".;.\reprap.jar;C:\Program Files\
Reprap\;C:\Program Files\Reprap\reprap.jar;C:\Program Files\Java\shared\*" -Xmx3
84M org/reprap/Main
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/vec
math/Color3f
at org.reprap.Preferences.(Unknown Source)
at org.reprap.Main.initComms(Unknown Source)
at org.reprap.Main.access$2200(Unknown Source)
at org.reprap.Main$22.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javax.vecmath.Color3f
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.ClassLoader.loadClassInternal(Unknown Source)
... 12 more

Any suggestions with this one?
Re: unable to install reprap-host on java6-Sun under Ubuntu 8.10
December 05, 2008 02:20PM
You seem to be missing vecmath.jar.
I am having a similar problem, although the error messages sound different. I doublechecked the java installation and redid everything in the reprap howto, but nothing changes -> i am posting the errors i got with 0.81, 0.82 had one error more, 0.9 had many errors and never returned...
here goes:
loonquawl@lqlaptop:~/reprap-host-0.8.1$ ./reprap-host.sh
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)
Caused by: java.lang.ClassNotFoundException: org.j3d.renderer.java3d.loaders.STLLoader
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 16 more



could anybody point me to some diagnostics i could run?

thanks a lot
Re: unable to install reprap-host on java6-Sun under Ubuntu 8.10
December 06, 2008 06:52PM
Re: unable to install reprap-host on java6-Sun under Ubuntu 8.10
December 06, 2008 11:25PM
Loonquawl
I had the same errors as you earlier, including the Vectmath. I searched for the files that say it was "caused by" Which seem to be in Java3D\lib\ext, then I copied those files in the JRE\lib\ext. If there are others then copy them to the same JRE directory structure as where you find them. After that I got the BOT console to work. I haven't hooked it up to anything yet, but we shall see.

Thanks guys for the help
Schultz
Re: unable to install reprap-host on java6-Sun under Ubuntu 8.10
December 07, 2008 01:35AM
My laptop is running Ubuntu 8.10. Here's what I did to start the host (0.9)...

1. get the host zip from here [sourceforge.net] and unzip into /usr/lib/reprap
2. use synaptic package manager to install rxtx and libvecmath
3. get the linux java3d zip from here [java3d.dev.java.net] drill down to j3d-jre.zip and extract the .jar files to /usr/share/java and the .so files to /lib
4. get the .jar files from here [reprap.svn.sourceforge.net] here [reprap.svn.sourceforge.net] and here [reprap.svn.sourceforge.net] and put them in /usr/share/java
5. use preferences->appearance to turn off visual effects
6. run /usr/lib/reprap/reprap-host

There's probably an easier way but this happened to work. I got an exception because I don't have a serial port on my laptop and a nullpointer exception related to ImageIcon but neither prevented the app from coming up. The reprap.properties file ended up in .reprap under my home directory.
Re: unable to install reprap-host on java6-Sun under Ubuntu 8.10
December 07, 2008 02:04AM
To run the latest host within eclipse on the same laptop, I did this:
- use eclipse's svn perspective to connect to [reprap.svn.sourceforge.net]
- grab trunk->reprap->host
- switch to java perspective and add all the jars and zips I could find within the project
- run org.reprap.Main

Just for good measure, I deleted reprap.properties and let the app generate a new one.

This version of the host has known bugs. I wouldn't recommend using it unless you're keen on debugging.
I found the solution! (to my problem, at least...) i am a total linux noob (as if that had no been apparent... ) so it took me a long time to realize that the files jd3-org-.....jar were all, for some reason owned by root, while everything else was owned by me -
sudo chown [name] [files] did the trick.

now, the application starts, i can load pieces. there is an error-message, still, that tells me i am using an old open gl, but it does not seem to break anything
Thanks to all, and specially to Steve DeGroof. His solution was good for me, and now my reprap app works (perhaps it would be a good thing to update the docu...).
I get still some errors:

Experimental: JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
Exception in thread "GUI Poll" java.lang.NullPointerException
at org.reprap.gui.botConsole.GenericExtruderTabPanel.refreshTemperature(Unknown Source)
at org.reprap.gui.botConsole.GenericExtruderTabPanel.access$100(Unknown Source)
at org.reprap.gui.botConsole.GenericExtruderTabPanel$1.run(Unknown Source)
Exception in thread "GUI Poll" java.lang.NullPointerException
at org.reprap.gui.botConsole.GenericExtruderTabPanel.refreshTemperature(Unknown Source)
at org.reprap.gui.botConsole.GenericExtruderTabPanel.access$100(Unknown Source)
at org.reprap.gui.botConsole.GenericExtruderTabPanel$1.run(Unknown Source)
Exception in thread "RepRap" java.lang.NullPointerException
at javax.swing.ImageIcon.(ImageIcon.java:155)
at org.reprap.gui.botConsole.PrintTabPanel.initComponents(Unknown Source)
at org.reprap.gui.botConsole.PrintTabPanel.(Unknown Source)
at org.reprap.gui.botConsole.BotConsoleFrame.initComponents(Unknown Source)
at org.reprap.gui.botConsole.BotConsoleFrame.(Unknown Source)
at org.reprap.gui.botConsole.BotConsoleFrame$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)
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)

Only one window is displayed (the one with XYZ axes), while the docu shows two windows. Is it normal? Is it important?
Re: unable to install reprap-host on java6-Sun under Ubuntu 8.10
March 11, 2011 01:09AM
Any solutions for Windows XP?
Sorry, only registered users may post in this forum.

Click here to login