More specifically, the Sun JVM has an implementation limit of 64k per classfile. This is almost never exceeded in "normal" functions, but can easily be exceeded by generated code, or by very, very large literals. Either break generated chunks of code into smaller bits or separate data from code, respectively.

- Chas

On Jul 20, 2010, at 9:38 PM, Kevin Downey wrote:

your functions are way too big, write more smaller functions

On Tue, Jul 20, 2010 at 6:35 PM, Praki <praki.prak...@gmail.com> wrote:
Hi,

I am getting this error when trying to load one of my modules. Does
anybody know if the compiler checks for method lengths? Has anyone run
into this issue and have suggestions on how to work around this?

Thanks,
Praki

Compiling singularis.repo.bucket to /home/pprakash/projects/gwave/ repo/
target/classes
Exception in thread "main" java.lang.ClassFormatError: Invalid method
Code length 65693 in class file singularis/repo/proto__init
       at java.lang.ClassLoader.defineClass1(Native Method)
       at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java: 283)
       at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java: 301)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:247)
       at clojure.lang.RT.loadClassForName(RT.java:1572)
       at clojure.lang.RT.load(RT.java:399)
       at clojure.lang.RT.load(RT.java:381)

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en



--
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to