Bug 865 : ClassNotFoundException when running a sketch on Mac OS X 10.5
Last modified: 2008-10-20 08:42




Status:
RESOLVED
Resolution:
INVALID -
Priority:
P2
Severity:
normal

 

Reporter:
tylerweir
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2008-08-04 09:12
I having the same issue as:
http://dev.processing.org/bugs/show_bug.cgi?id=863 - which has been closed.

"java.lang.ClassNotFoundException: Temporary_712_3422"

This occurs with 0135, 0142, 0143 and building from SVN. It also occurs
when attempting to run from within P5 and exporting.

I repaired my permissions and I still encounter:

java.lang.ClassNotFoundException: Temporary_712_3422
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:316)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at processing.core.PApplet.main(PApplet.java:6923)

I'm on 10.5.4, MacBook Pro, both Java 1.5 and 1.6 fail.
Additional Comment #1 From fry 2008-08-06 13:13
Check your /tmp folder, are there a handful of build234352.tmp (the numbers
in the middle are random) folders?

Is there anything you've done with your Java setup, e.g. installed
developer releases?

I've tested on two 10.5 setups and not seen anything like this.
Additional Comment #2 From tylerweir 2008-08-06 16:16
> Check your /tmp folder, are there a handful of build234352.tmp (the
> numbers in the middle are random) folders?

There are a bunch of untitled*.tmp, console*.tmp and build*.tmp directories.

And I do a lot of scala development and installed jdk1.6 from Apple for
testing.
Additional Comment #3 From fry 2008-08-10 09:16
Hrm.. Anything at all that you can think of? Any other Java programs
running at the same time? I wonder if we're getting bit by the newer
ClassLoader stuff... (It's currently using the older Class.forName() syntax.)
Additional Comment #4 From tylerweir 2008-08-23 14:56
Hi Ben, just letting you know that with 0148 and n8than's port of P5 to
scala, aka spde, I still get this:
java.lang.ClassNotFoundException: Flocking
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:316)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at processing.core.PApplet.main(PApplet.java:6923)

I have removed any trace of java 1.6 from my machine and I'm running this
version:
$ java -version
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)

Building P5 from source leads to the same error.

If I can do anything else to help sort this out, please let me know I'd be
glad to help. I love to get back to using p5 at home.

Thanks.
Additional Comment #5 From fry 2008-08-24 11:57
You haven't answered the two questions in my last response: "Anything at
all that you can think of? Any other Java programs running at the same time?"
Additional Comment #6 From tylerweir 2008-08-24 12:57
Playing with the examples on the p5 site all work. And the site that I
visited from the exhibition, like
http://gromina.googlepages.com/shootingwiththeburdeninggame, all worked.
The JOGL test worked: https://jogl-demos.dev.java.net/applettest-joal.html

Eclipse 3 runs with out an issue as do the Nightlies from NetBeans.

I can't think of anything else to test to try and replicate the issue. If
there is anything you'd suggest, I'll try it.

Additional Comment #7 From fry 2008-08-24 13:04
This is getting funny.

A third time: Are you running any other Java programs at the same time?

(Make sure you've quit out of browsers, Limewire, Eclipse, etc. first...
Just trying to isolate the problem.)
Additional Comment #8 From fry 2008-08-24 13:25
Also, if you have SVN working, try updating and building again (do an rm
-rf work before ./make.sh first) and post the result here (a new exception,
or perhaps it may work).
Additional Comment #9 From tylerweir 2008-08-24 14:05
I just quit everything, browsers, itunes, quicksilver, etc.
Opened p5 0148 and opened the Brightness example, I get the same problem.

If I build from source, same thing.

If I modify the Info.plist to include this in an attempt to force 64bit mode:
<key>JVMArchs</key>
<array>
<string>x86_64</string>
</array>

Here is the error for all scenarios:
java.lang.ClassNotFoundException: LightsGL
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:316)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at processing.core.PApplet.main(PApplet.java:6923)

I appear to be a corner case, as I don't see anything else about this. As
a short term fix, I will build a linux box.

Thanks
Additional Comment #10 From fry 2008-08-24 17:11
But it doesn't appear that you did an svn update like I asked--I made a
change specifically for this situation to use another mechanism besides
Class.forName(), so the line that it's reporting in the Exception doesn't
exist in the code any longer.

I'm really trying to help you here, because I'd like to find a fix. But I
need you to do the following:

1. cd to the root of the Processing source
2. Do an svn update
3. cd build/macosx
4. rm -rf work
5. ./make.sh
6. ./run.sh
Additional Comment #11 From fry 2008-10-15 07:17
no response, closing bug. hopefully this is fixed in more recent releases.
Additional Comment #12 From tylerweir 2008-10-20 08:42
Hello Fry,

As a follow-up, I rebuilt my machine with a clean install of Leopard and
Processing runs as it should.

I compared the 2 installs and I don't know what the issue is. I messed
with my Java install quite a bit and more than likely screwed it up.

Thanks for the help, I agree with marking this closed/invalid.

Tyler