Try 512.
If that doesn't work, try 768. Then 1024.

Wayne

On 5/17/06, Zhi <[EMAIL PROTECTED]> wrote:
Thanks Thorsten!

Yes. I tried set MAVEN_OPTS=-Xmx256m just now. Unfortunately, it makes no 
difference. The exception message are still the same.

Is there anybody can read the exception stack?

java.nio.BufferOverflowException
        at java.nio.Buffer.nextPutIndex(Buffer.java:419)
        at java.nio.HeapCharBuffer.put(HeapCharBuffer.java:145)
        at com.sun.tools.javac.parser.Scanner.decode(Scanner.java:405)
        at com.sun.tools.javac.parser.Scanner.<init>(Scanner.java:304)
        at com.sun.tools.javac.parser.Scanner.<init>(Scanner.java:238)
        at 
com.sun.tools.javac.parser.Scanner$Factory.newScanner(Scanner.java:72)
        at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:254)
        at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:281)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:398)
        at com.sun.tools.javac.main.Main.compile(Main.java:592)
        at com.sun.tools.javac.main.Main.compile(Main.java:544)
        at com.sun.tools.javac.Main.compile(Main.java:85)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:400)
        at 
org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:136)
        at 
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:483)
        at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)


----- Original Message -----
From: "Thorsten Heit" <[EMAIL PROTECTED]>
To: "Maven Users List" <[email protected]>
Sent: Wednesday, May 17, 2006 7:54 PM
Subject: Re: Compilation failure of java.nio.BufferOverflowException


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
>> I am trying replace ANT with MAVEN to build my project. In ant, I
>> also met the memory overflow problem when execute the "javac" task.
>> Finally the problem is solved by set memoryMaximumSize property like
>> this,
>>
>> <javac destdir="${classes.dir}" srcdir="${src.dir}"
>> memoryMaximumSize="100m">
>>
>> I am not sure whether it is the same reason, which makes the javac
>> compiler not work. I have searched google, sun's bug database, and
>> maven user list forum, but no hint found.
>>
>> Is there any friend can tell me why, or solve the problem? Thanks in
>> advance.
>
> Have you tried to set the environment variable "MAVEN_OPTS"?
>
> MAVEN_OPTS=<parameters for the Java executable>
>
> for example: MAVEN_OPTS=-Xmx256m
>
>
> Regards
>
> Thorsten
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (MingW32)
>
> iD8DBQFEaw71QvObkgCcDe0RAsOtAJ4kNCf2nrmgo5920a5nHOevfzB3pgCfXlBP
> JH2AF/Gypwttxoe/fmoRkEo=
> =Lson
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to