We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › pdf export error
Page Index Toggle Pages: 1
pdf export error (Read 2180 times)
pdf export error
Jan 18th, 2007, 8:03pm
 
I can't seem to find anyone else talking about this specific problem but appolgies if this thread is better placed elsewhere.

Basically i'm having problems exporting any kind of vector file out of processing 0123 on an intel macbook. as soon as i add the appropriate information into the size() parentheses i get the error:

Exception in thread "Thread-2" java.lang.NoClassDefFoundError: processing/core/PGraphics2

at java.lang.ClassLoader.defineClass2(Native Method)

this happens with the pdf export and the svg export (using the prosvg library). Even when using the code examples taken from the library section of this site.

I wonder if this might be a more globabl problem with the java settings in the OS. But i'm certainly no expert, if anyone can shed any light on this i'd be most grateful.

I can post the code if it'll help, but as I say, even the examples from the library section of this site aren't working on my machine.

many thanks
Re: pdf export error
Reply #1 - Jan 19th, 2007, 3:33am
 
that will happen with the svg library, because its author hasn't updated it for newer releases of processing.

however it should not be the case for the pdf library that's included with processing, unless you have an old version of it somewhere in your sketchbook or libraries folder.
Re: pdf export error
Reply #2 - Jan 19th, 2007, 11:23am
 
Thanks for your response, i've cleaned everything out and reinstalled 0123 and it seems to be fine.

Incidentally the example in the Library-PDF folder called MousePress has a little error:

void setup() {
 size(600, 600);
 framerate(24);
}

should be:

void setup() {
 size(600, 600);
 frameRate(24);
}

I think...

Anyways, many thanks again for you quick reply. Keep up the good work!
Re: pdf export error
Reply #3 - Jan 19th, 2007, 7:59pm
 
good to know, i've filed a bug for it here:
http://dev.processing.org/bugs/show_bug.cgi?id=489
so casey can fix it next time he re-exports the examples.
Re: pdf export error
Reply #4 - Apr 28th, 2007, 1:05pm
 
fry wrote on Jan 19th, 2007, 3:33am:
that will happen with the svg library, because its author hasn't updated it for newer releases of processing.

however it should not be the case for the pdf library that's included with processing, unless you have an old version of it somewhere in your sketchbook or libraries folder.




this works

http://bezier.de/processing/prosvg_p0123.zip

(by fjen)
Re: pdf export error
Reply #5 - Aug 28th, 2007, 3:11pm
 
Great! Work perfectly with 125 on a intel mac.
Thank you very much.
Re: pdf export error
Reply #6 - Nov 24th, 2007, 8:56pm
 
I get the same thing, on two different computers, a macbook and an iMac.

Exception in thread "Thread-2" java.lang.NoClassDefFoundError: processing/core/PGraphics2
at java.lang.ClassLoader.defineClass2(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:719)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:160)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:254)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
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:268)



I tried reinstalling P5 to no avail. I ran 133 and now on 135 I get the same error. Did I miss something? I don't have the library in my sketch folder, where else could I look?

Any solutions ?
Re: pdf export error
Reply #7 - Nov 29th, 2007, 8:24pm
 
that error is coming from a bad library either in your sketchbook folder or in your processing libraries folder.
Re: pdf export error
Reply #8 - Nov 30th, 2007, 9:23am
 
yes, you said that, but I don't have any library in my sketch folder and I reinstalled P5.
Re: pdf export error
Reply #9 - Nov 30th, 2007, 2:20pm
 
empty the contents of your sketchbook folder, or change the sketchbook folder location, then restart processing, and open a pdf example. it will work.

the PGraphics2 stuff is because something is picking up an old copy of a library. i've seen this with 1) the illustrator export library, 2) when someone put an entire copy of processing in their sketchbook, 3) some kinds of exported applications.

the svg library *will* cause this error (perhaps even if it's not being used). the pdf library will not.
Re: pdf export error
Reply #10 - Dec 1st, 2007, 2:42pm
 
Oooooohh, I finally tracked the problem. Like you said, there was a PDF library inmy sketchbook folder somewhere, but not in my sketch.

Thanks a lot and sorry for being a little thick Cheesy



Page Index Toggle Pages: 1