Welcome! Log In Create A New Profile

Advanced

RepRap software errors

Posted by Andy D. 
RepRap software errors
April 23, 2008 07:23PM
Hi. I am fairly new to the RepRap project, but plan to build one soon. I am going through the steps at [reprap.org], but ran into a brick wall at the following instruction:

"Now you can run the RepRap software. As you, not the superuser, open Eclipse, open the RepRap project, go to src -> org.reprap and right-mouse-click on Main.java. Select Run as -> Java application."

When I do that, it asks me if I want to proceed even there are a ton of errors. In fact, there seems to be 822 errors currently. Therein lies my problem.

One clue might be the following words that come up when I start eclipse:

"
searching for compatible vm...
testing /usr/lib/jvm/java-gcj...found
WARNING: Error loading security provider org.bouncycastle.jce.provider.BouncyCastleProvider: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/lib/eclipse/startup.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
WARNING: Error loading security provider gnu.crypto.jce.GnuCrypto: java.lang.ClassNotFoundException: gnu.crypto.jce.GnuCrypto not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/lib/eclipse/startup.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
"

Specifically, the 'testing...java-gcj" part. I am trying to use java-6-sun, and have several times set the alternatives to use java-6-sun using the following commands:

sudo update-java-alternatives --set java-6-sun
sudo update-alternatives --config java (and then I choose java-6-sun and press enter)

Do you think eclipse is still using java-gcj, or that it's just probing things and is actually using java-6-sun? Either way, what do you think the cause of my errors might be?

P.S. When I was installing the initial packages, there were a couple I had problems with and found alternatives for (libgcj7-awt and libsdl). I have another posting about that topic though, but these might be related.

P.P.S. I'm running Ubuntu gusty.
Re: RepRap software errors
April 24, 2008 01:47AM
I did a quick search for the bouncycastle error and came across this:
-------------------------------------------------------------------------------------
It seems that the default extensions directory has been moved
to /usr/share/java/ext (as opposed to java-ext). You could try the
following:

$ sudo ln -s /usr/share/java-ext/bouncycastle-jdk1.4/bcprov.jar \
/usr/share/java/ext/bcprov.jar

----------------------------------------------------------------------------------------------------

Check that out first. There are a number of other known issues associated with this error so I'd do a google search for the bouncycastle error "Error loading security provider org.bouncycastle" and see if its one of these. The other one that seems to be common is an install of Azureus seems to break java in some instances.

Also, Eclipse can set its own java environment variables so you'll need to check them out. The easiest way is to take Eclipse out of the equation and just try to run the Reprap.jar file. If that works, then its probably one of Eclipses weird settings that you'll need to play around with.

BTW, the instructions you're referencing are specifically for developers who are wanting to contribute code etc. so if thats not you, don't worry about it. I'll be finding/fixing the same issues with the new Ubuntu Hardy Heron in a week or two as I try to get a new LiveCD created.
Re: RepRap software errors
April 24, 2008 11:33PM
Thank you for your help!

I do not have a /usr/sjare/java/ext directory.

Also, a 'locate bouncycastle' returned only a couple configuration files in /etc/java/security/security.d/...

I then did a 'apt-cache search bouncycastle' and found a package libbcprov-java that I thought might help?

"libbcprov-java - Bouncy Castle Java Cryptographic Service Provider"

So, I installed it, and now running eclipse only gives these messages on startup.

"searching for compatible vm...
testing /usr/lib/jvm/java-gcj...found
WARNING: Error loading security provider gnu.crypto.jce.GnuCrypto: java.lang.ClassNotFoundException: gnu.crypto.jce.GnuCrypto not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/lib/eclipse/startup.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
"

You mentioned I should run Reprap.jar, but a "find . -iname '*Reprap.jar*'" from the eclipse workspace directory finds no results. Are you sure I am supposed to have that file? If I only have part of the code, that might be the problem. smiling smiley I tried to follow the directions and thought I had all of the svn code, but I could be wrong.

Aren't the instructions at [reprap.org] for anyone who is building a RepRap and wants software to run it?

Thanks for your help!
Re: RepRap software errors
April 25, 2008 12:06PM
sudo apt-get install libgnucrypto-javat
Thank you...
April 27, 2008 06:10PM
Thank you batman. That solved the eclipse-start warning. Eclipse is now starting cleanly, but it doesn't appear to be solving the other problem.

I am still getting a ton of errors when eclipse compiles the reprap project. I should have done this earlier, but here are a few of them: I have warnings too, but I would guess they're less important.

Maybe I messed up some part of the install process or don't have a library I should have? Do you recognize any of the errors and/or understand what library functions they are complaining about not having?

Thanks for your help! smiling smiley



------------------------


Severity and Description Path Resource Location Creation Time Id
BranchGroup cannot be resolved to a type repRap/src/org/reprap Attributes.java line 30 1209333352453 1
BranchGroup cannot be resolved to a type repRap/src/org/reprap Attributes.java line 51 1209333352453 3
BranchGroup cannot be resolved to a type repRap/src/org/reprap Attributes.java line 83 1209333352453 7
BranchGroup cannot be resolved to a type repRap/src/org/reprap Attributes.java line 126 1209333352453 13
BranchGroup cannot be resolved to a type repRap/src/org/reprap Printer.java line 246 1209333352698 43
BranchGroup cannot be resolved to a type repRap/src/org/reprap/geometry LayerProducer.java line 89 1209333353036 103
BranchGroup cannot be resolved to a type repRap/src/org/reprap/geometry LayerProducer.java line 229 1209333353036 104
BranchGroup cannot be resolved to a type repRap/src/org/reprap/geometry Producer.java line 174 1209333353044 109
BranchGroup cannot be resolved to a type repRap/src/org/reprap/geometry/polygons STLSlice.java line 434 1209333353695 149
BranchGroup cannot be resolved to a type repRap/src/org/reprap/geometry/polygons STLSlice.java line 582 1209333353717 159
BranchGroup cannot be resolved to a type repRap/src/org/reprap/geometry/polygons STLSlice.java line 589 1209333353717 161
BranchGroup cannot be resolved to a type repRap/src/org/reprap/geometry/polygons STLSlice.java line 591 1209333353717 162
BranchGroup cannot be resolved to a type repRap/src/org/reprap/geometry/polygons STLSlice.java line 591 1209333353717 163
BranchGroup cannot be resolved to a type repRap/src/org/reprap/geometry/polygons STLSlice.java line 675 1209333353717 164
BranchGroup cannot be resolved to a type repRap/src/org/reprap/geometry/polygons STLSlice.java line 1314 1209333353718 174
BranchGroup cannot be resolved to a type repRap/src/org/reprap/gui MouseObject.java line 69 1209333353807 211
BranchGroup cannot be resolved to a type repRap/src/org/reprap/gui MouseObject.java line 113 1209333353808 245
BranchGroup cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 86 1209333353881 345
BranchGroup cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 86 1209333353881 346
BranchGroup cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 97 1209333353881 348
BranchGroup cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 101 1209333353881 350
BranchGroup cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 106 1209333353881 352
BranchGroup cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 401 1209333353883 403
BranchGroup cannot be resolved to a type repRap/src/org/reprap/gui PreviewPanel.java line 17 1209333353946 412
BranchGroup cannot be resolved to a type repRap/src/org/reprap/gui PreviewPanel.java line 18 1209333353946 413
BranchGroup cannot be resolved to a type repRap/src/org/reprap/gui PreviewPanel.java line 19 1209333353946 414
BranchGroup cannot be resolved repRap/src/org/reprap/gui MouseObject.java line 121 1209333353808 247
BranchGroup cannot be resolved repRap/src/org/reprap/gui PreviewPanel.java line 100 1209333353947 450
BranchGroup cannot be resolved repRap/src/org/reprap/gui PreviewPanel.java line 143 1209333353948 462
BranchGroup cannot be resolved repRap/src/org/reprap/gui PreviewPanel.java line 268 1209333353954 485
BranchGroup cannot be resolved repRap/src/org/reprap/gui PreviewPanel.java line 270 1209333353954 488
BranchGroup cannot be resolved repRap/src/org/reprap/gui PreviewPanel.java line 276 1209333353954 497
BranchGroup cannot be resolved repRap/src/org/reprap/gui STLObject.java line 104 1209333354045 602
BranchGroup cannot be resolved repRap/src/org/reprap/gui STLObject.java line 111 1209333354046 614
Bounds cannot be resolved to a type repRap/src/org/reprap/gui MouseObject.java line 78 1209333353807 215
Bounds cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 98 1209333353881 349
Bounds cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 192 1209333353882 381
Bounds cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 279 1209333353883 390
Bounds cannot be resolved to a type repRap/src/org/reprap/gui PreviewPanel.java line 85 1209333353947 434
Bounds cannot be resolved to a type repRap/src/org/reprap/gui RepRapBuild.java line 268 1209333354030 541
BoundingSphere cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 193 1209333353882 383
BoundingBox cannot be resolved to a type repRap/src/org/reprap/gui STLObject.java line 87 1209333354037 592
black cannot be resolved repRap/src/org/reprap Preferences.java line 75 1209333352694 38
black cannot be resolved repRap/src/org/reprap Preferences.java line 75 1209333352694 39
black cannot be resolved repRap/src/org/reprap/devices GenericExtruder.java line 403 1209333352888 75
black cannot be resolved repRap/src/org/reprap/devices GenericExtruder.java line 403 1209333352888 76
black cannot be resolved repRap/src/org/reprap/gui Panel3D.java line 166 1209333353882 370
black cannot be resolved repRap/src/org/reprap/gui Panel3D.java line 166 1209333353882 372
black cannot be resolved repRap/src/org/reprap/gui Panel3D.java line 175 1209333353882 378
black cannot be resolved repRap/src/org/reprap/gui Panel3D.java line 175 1209333353882 380
bgColour cannot be resolved repRap/src/org/reprap/gui Panel3D.java line 142 1209333353882 357
bgColour cannot be resolved repRap/src/org/reprap/gui PreviewPanel.java line 45 1209333353947 420
bgColour cannot be resolved repRap/src/org/reprap/gui RepRapBuild.java line 235 1209333354029 527
below cannot be resolved repRap/src/org/reprap/geometry/polygons STLSlice.java line 539 1209333353695 154
below cannot be resolved repRap/src/org/reprap/geometry/polygons STLSlice.java line 1314 1209333353718 173
below cannot be resolved repRap/src/org/reprap/geometry/polygons STLSlice.java line 1316 1209333353718 175
below cannot be resolved repRap/src/org/reprap/geometry/polygons STLSlice.java line 1350 1209333353718 192
bbox cannot be resolved repRap/src/org/reprap/gui STLObject.java line 132 1209333354047 642
Background cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 104 1209333353881 351
Background cannot be resolved to a type repRap/src/org/reprap/gui PreviewPanel.java line 44 1209333353947 417
Background cannot be resolved to a type repRap/src/org/reprap/gui PreviewPanel.java line 45 1209333353947 418
Background cannot be resolved to a type repRap/src/org/reprap/gui PreviewPanel.java line 45 1209333353947 419
Background cannot be resolved to a type repRap/src/org/reprap/gui RepRapBuild.java line 234 1209333354029 524
Background cannot be resolved to a type repRap/src/org/reprap/gui RepRapBuild.java line 235 1209333354029 525
Background cannot be resolved to a type repRap/src/org/reprap/gui RepRapBuild.java line 235 1209333354029 526
applicationBounds cannot be resolved repRap/src/org/reprap/gui Panel3D.java line 193 1209333353882 382
Appearance cannot be resolved to a type repRap/src/org/reprap Attributes.java line 35 1209333352453 2
Appearance cannot be resolved to a type repRap/src/org/reprap Attributes.java line 51 1209333352453 4
Appearance cannot be resolved to a type repRap/src/org/reprap Attributes.java line 88 1209333352453 9
Appearance cannot be resolved to a type repRap/src/org/reprap Attributes.java line 132 1209333352453 15
Appearance cannot be resolved to a type repRap/src/org/reprap Extruder.java line 174 1209333352487 20
Appearance cannot be resolved to a type repRap/src/org/reprap Preferences.java line 61 1209333352694 32
Appearance cannot be resolved to a type repRap/src/org/reprap Preferences.java line 73 1209333352694 35
Appearance cannot be resolved to a type repRap/src/org/reprap Preferences.java line 73 1209333352694 36
Appearance cannot be resolved to a type repRap/src/org/reprap/devices GenericExtruder.java line 282 1209333352888 68
Appearance cannot be resolved to a type repRap/src/org/reprap/devices GenericExtruder.java line 402 1209333352888 72
Appearance cannot be resolved to a type repRap/src/org/reprap/devices GenericExtruder.java line 1232 1209333352888 77
Appearance cannot be resolved to a type repRap/src/org/reprap/devices NullExtruder.java line 213 1209333352971 93
Appearance cannot be resolved to a type repRap/src/org/reprap/devices NullExtruder.java line 563 1209333352971 96
Appearance cannot be resolved to a type repRap/src/org/reprap/devices NullExtruder.java line 587 1209333352971 97
Appearance cannot be resolved to a type repRap/src/org/reprap/devices NullExtruder.java line 605 1209333352971 98
Appearance cannot be resolved to a type repRap/src/org/reprap/geometry/polygons STLSlice.java line 1325 1209333353718 176
Appearance cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 83 1209333353881 343
Appearance cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 84 1209333353881 344
Appearance cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 165 1209333353882 366
Appearance cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 174 1209333353882 374
Appearance cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 415 1209333353883 405
Appearance cannot be resolved to a type repRap/src/org/reprap/gui Panel3D.java line 449 1209333353883 406
Appearance cannot be resolved to a type repRap/src/org/reprap/gui STLObject.java line 269 1209333354047 648
Appearance cannot be resolved to a type repRap/src/org/reprap/gui STLObject.java line 447 1209333354048 666
Appearance cannot be resolved to a type repRap/src/org/reprap/gui STLObject.java line 471 1209333354048 667
app cannot be resolved repRap/src/org/reprap Attributes.java line 56 1209333352453 6
app cannot be resolved repRap/src/org/reprap Attributes.java line 88 1209333352453 10
app cannot be resolved repRap/src/org/reprap Attributes.java line 111 1209333352453 11
app cannot be resolved repRap/src/org/reprap Attributes.java line 132 1209333352453 16
AmbientLight cannot be resolved to a type repRap/src/org/reprap/gui PreviewPanel.java line 87 1209333353947 436
AmbientLight cannot be resolved to a type repRap/src/org/reprap/gui PreviewPanel.java line 87 1209333353947 437
AmbientLight cannot be resolved to a type repRap/src/org/reprap/gui RepRapBuild.java line 270 1209333354030 543
AmbientLight cannot be resolved to a type repRap/src/org/reprap/gui RepRapBuild.java line 270 1209333354030 544
aat.trans cannot be resolved or is not a field repRap/src/org/reprap/geometry/polygons STLSlice.java line 1330 1209333353718 179
<ignore message>
April 27, 2008 06:25PM
______________________________________________
Re: RepRap software errors
April 27, 2008 06:27PM
By the way, Andy D. = Andromodon. I made an account for myself. smiling smiley
Re: RepRap software errors
April 28, 2008 04:15AM
It looks like some issues I had when Eclipse is compiling using the wrong version of Java.

Two places to put the correct java classpath: in the eclipse workspace and in the reprap project itself.

So:
1. Click on the Window menu and choose Preferences. Under Java-> Installed JREs, add or edit java-6-sun as appropriate. To make things simple, delete any other JREs.

2. Click on Project menu and go to Properties. Click on the Java Build Path and under both the 'Libraries' and 'Order and Export' tabs make sure the correct java is listed (java-6-sun).

If you're not wanting to actually edit the software and just want to run it you can follow the cut down instructions at [www.reprap.org] and download the already compiled software from [sourceforge.net]

This is a zip file with a few files that are simply the Reprap.jar and a couple of files to run a java virtual machine using it.

Edited 1 time(s). Last edit at 04/28/2008 04:40AM by reece.arnott.
Re: RepRap software errors
April 28, 2008 09:18AM
Fantastic! That was precisely my problem. Eclipse was using java-sun-1.5, which doesn't have all of the 3d libraries installed in it. That seems kind of silly, though, for eclipse to have its own java selector. That's what update-alternatives is for! Am I missing something?

BTW, I changed it to java-6-sun, which is where I have all of the 3d libraries.

Anyway, that change cut down my number of errors by at least a factor of a hundred. I have three left:

Severity and Description Path Resource Location Creation Time Id
STLLoader cannot be resolved to a type repRap/src/org/reprap/gui STLObject.java line 144 1209388262255 1160
STLLoader cannot be resolved to a type repRap/src/org/reprap/gui STLObject.java line 144 1209388262255 1161
The import org.j3d cannot be resolved repRap/src/org/reprap/gui STLObject.java line 64 1209388262255 1159

The last one seems to say that j3d isn't in the right spot. Do you concur?

I do, however have j3d-org-java3d-all.jar in /usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/ext. Can you think of anything else? smiling smiley
Re: RepRap software errors
April 28, 2008 10:03AM
Eclipse does not use the normal Java compiler, it has its own. This is why you only need the JRE to run it, not the JDK.

You need to add this library to the Build Path on the project.
Re: RepRap software errors
April 28, 2008 07:01PM
How, exactaly, do I do that? I thought that every .jar file in /usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/ext was in the build path. j3d-org-java3d-all.jar is in that directory.

Thanks for your help, but specifics would be of great use to me at this point.
Re: RepRap software errors
April 29, 2008 01:13AM
I would think it is an issue with j3d. I had a similar problem, see [forums.reprap.org] The core part being

"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. "

I got a different error message so it may be a different issue.

As to JRE vs JDK etc. the way I understand it (not being much into the theory behind it all this could be a little off the mark) is as follows...

The JDK is all sorts of cool already compiled tools to mix and match. These are mostly in .jar files (Java archives).

The JRE is the environment you need to have to compile any actual source code. You can also have a separate JRE associated with actually running the compiled programs.

The build path in Eclipse is needed to know where any files (normally .jar) are to be found that are referenced in the source code in order to compile. Again, there is a separate build path which is needed if there are any external files needed for the compiled program to run.
Re: RepRap software errors
April 29, 2008 05:23AM
Eclipse happens to be written in Java, and is therefore started by starting an external JVM. From there on FORGET that JVM.

Internally Eclipse runs its own compiler, which can be set to emit code for a variety of java versions.

Each project has its own environment, JARs etc are not shared between them unless you explicitly tell it to.

If you select the project, and select Build Path from the menu, and Configure Build Path, you will find a set of panels that allow you to select which JARs etc are used for this compilation. Of course you only need those JARs that are directly referenced, so for instance in the case of JDBC access you need the basic JDBC support, not the specific JDBC driver you are going to use.

If you run or debug code within Eclipse, then you will need to specify those extra JARs (such as the JDBC driver in the example above) in the Classpath pane of the Debug or Run Dialog. You can also select the external JRE to be used to run this code at this point.
Re: RepRap software errors
April 29, 2008 08:35AM
LOL, recee.arnott! smiling smiley You're right smack on. My j3d-org-java3d-all.jar is an HTML file. LAME! If there is a link referring to a 'bla.jar', and saving it gives you a file called 'bla.jar', the dang file should be a jar file! I cry foul! That should be fixed in the wiki instructions. Just a "(must click. save-as doesn't work)" should suffice.

Thanks for your help, recee! Unfortunately, I still have the same three errors:

Severity and Description Path Resource Location Creation Time Id
STLLoader cannot be resolved to a type repRap/src/org/reprap/gui STLObject.java line 144 1209472440375 1360
STLLoader cannot be resolved to a type repRap/src/org/reprap/gui STLObject.java line 144 1209472440375 1361
The import org.j3d cannot be resolved repRap/src/org/reprap/gui STLObject.java line 64 1209472440375 1359

Also, thanks to davidgoodenough for the java clarification. smiling smiley
Re: RepRap software errors
April 29, 2008 06:20PM
It may be the security settings on the j3d file, depending on where you got it from. Again quoting from the same thread as above:
"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 "

If its not that then it is almost certainly the Eclipse can't see it for some reason, which points to a build path issue.

The brute force approach is the scattergun approach: put a copy of the j3d into any and all folders that may be in the build path.

The better way is to check and re-check any and all build paths you can find in Eclipse and make sure they're pointing in the right place. I'm fairly sure that the build path isn't recursive (i.e. you can't put in /foldera and it will find something in /foldera/folderb) so if the folder isn't in the path, it isn't being used.

Be very careful when you read the path. I had an issue where I concentrated on getting the last couple of subfolders letter perfect and missed the fact that the first part was pointing to the wrong part of the filesystem (I think it was /usr/local instead of /usr/lib or something).
Re: RepRap software errors
April 29, 2008 09:14PM
Great! You guys are like psychics! Once again you were smack-on. My permissions were over-restrictive. Again, I think this is something that should be mentioned in the wiki. When almost everything else is copy and paste, it gets confusing when we have to start thinking by ourselves. smiling smiley

I've started eclipse, and it now builds with 0 errors. Whoohoo! I assume I don't have to worry about the 138 warnings it has...

Thanks for your help, Reece! smiling smiley You have earned much Karma.

Peace,
Andromodon
Re: RepRap software errors
May 10, 2008 03:41AM
I had a conversation with one of the local gurus at the local LUG meeting a couple of days ago and he mentioned that Java 6 has a number of issues at present and that Java 5 should be used wherever possible.

This was brought up when I mentioned the bug in Java6 I stumbled across here:
[bugs.launchpad.net]

You may want to downgrade to Java5 if/when you have any more issues.
Sorry, only registered users may post in this forum.

Click here to login