You may get this error if a generated Java proxy file exceeds the maximum length of byte code that a Java compiler can handle. For example, SUN's JDK 1.4.2_01 has a constraint that the length (in bytes) of a Java code cannot exceed 65535 bytes.
For example, consider TaskProxy.java generated from Microsoft Project 2003 C:\Program Files\Microsoft Office\OFFICE11\MSPRJ.OLB. To increase the memory for your Java compiler, you will need to use the -J-mx128m and -J-ms128m options.
However, compilation causes a "code too large" error at compile time:
The solution is to remove the methods you don't need from the Java class. You can download a slimmed down version of TaskProxy.java here.